From 91d0ba3f8bbf1de752d91f9f8b229efe423287d2 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Mon, 15 Sep 2008 10:32:09 +0000 Subject: move mime templates to their own dir to clean up liberty/templates a bit --- templates/mime/application/view.tpl | 9 +++++ templates/mime/audio/edit.tpl | 47 ++++++++++++++++++++++ templates/mime/audio/inline.tpl | 29 ++++++++++++++ templates/mime/audio/player.tpl | 28 +++++++++++++ templates/mime/audio/view.tpl | 79 +++++++++++++++++++++++++++++++++++++ templates/mime/default/inline.tpl | 33 ++++++++++++++++ templates/mime/default/upload.tpl | 30 ++++++++++++++ templates/mime/default/view.tpl | 20 ++++++++++ templates/mime/flash/inline.tpl | 17 ++++++++ templates/mime/flash/view.tpl | 25 ++++++++++++ templates/mime/flv/edit.tpl | 24 +++++++++++ templates/mime/flv/inline.tpl | 28 +++++++++++++ templates/mime/flv/player.tpl | 23 +++++++++++ templates/mime/flv/view.tpl | 63 +++++++++++++++++++++++++++++ templates/mime/image/edit.tpl | 11 ++++++ templates/mime/image/inline.tpl | 52 ++++++++++++++++++++++++ templates/mime/image/view.tpl | 36 +++++++++++++++++ templates/mime/pbase/upload.tpl | 11 ++++++ 18 files changed, 565 insertions(+) create mode 100644 templates/mime/application/view.tpl create mode 100644 templates/mime/audio/edit.tpl create mode 100644 templates/mime/audio/inline.tpl create mode 100644 templates/mime/audio/player.tpl create mode 100644 templates/mime/audio/view.tpl create mode 100644 templates/mime/default/inline.tpl create mode 100644 templates/mime/default/upload.tpl create mode 100644 templates/mime/default/view.tpl create mode 100644 templates/mime/flash/inline.tpl create mode 100644 templates/mime/flash/view.tpl create mode 100644 templates/mime/flv/edit.tpl create mode 100644 templates/mime/flv/inline.tpl create mode 100644 templates/mime/flv/player.tpl create mode 100644 templates/mime/flv/view.tpl create mode 100644 templates/mime/image/edit.tpl create mode 100644 templates/mime/image/inline.tpl create mode 100644 templates/mime/image/view.tpl create mode 100644 templates/mime/pbase/upload.tpl (limited to 'templates/mime') diff --git a/templates/mime/application/view.tpl b/templates/mime/application/view.tpl new file mode 100644 index 0000000..a7261fa --- /dev/null +++ b/templates/mime/application/view.tpl @@ -0,0 +1,9 @@ +{strip} +
+ {assign var=size value=$smarty.request.size|default:icon} + + + +
+{/strip} +{include file="bitpackage:liberty/mime_meta_inc.tpl"} diff --git a/templates/mime/audio/edit.tpl b/templates/mime/audio/edit.tpl new file mode 100644 index 0000000..1e2d98f --- /dev/null +++ b/templates/mime/audio/edit.tpl @@ -0,0 +1,47 @@ +{strip} +
+ {formlabel label="Title" for="title"} + {forminput} + + {/forminput} +
+ +
+ {formlabel label="Album" for="audio_album"} + {forminput} + + {/forminput} +
+ +
+ {formlabel label="Artist" for="audio_artist"} + {forminput} + + {/forminput} +
+ +
+ {formlabel label="Year" for="audio_year"} + {forminput} + + {/forminput} +
+ +
+ {formlabel label="Genre" for="audio_genre"} + {forminput} + + {/forminput} +
+ +{if $attachment.source_file} +
+ {formlabel label="Remove Original" for="remove_original"} + {forminput} + + {formhelp note="This will permanently remove the original file from the server. This will still allow you to listen to the audio file but not download it."} + {/forminput} +
+{/if} + +{/strip} diff --git a/templates/mime/audio/inline.tpl b/templates/mime/audio/inline.tpl new file mode 100644 index 0000000..91f17ec --- /dev/null +++ b/templates/mime/audio/inline.tpl @@ -0,0 +1,29 @@ +{strip} +{if $display_type == "attachment_plugin"} + {if $wrapper.output == 'desc' || $wrapper.output == 'description'} + {if $attachment.display_url}{/if} + {$wrapper.description|escape|default:$attachment.filename} + {if $attachment.display_url}{/if} + {else} + <{$wrapper.wrapper|default:'div'} class="mimeaudio {$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}"> + {if $attachment.media_url} + {include file="bitpackage:liberty/mime_audio_player_inc.tpl"} + {/if} + {if $wrapper.display_url}{/if} + {$wrapper.description|escape|default:$attachment.meta.title|default:"{tr}Full Details{/tr}"} + {if $wrapper.display_url}{/if} + + {/if} +{else} +
+ {if $attachment.media_url} + {include file="bitpackage:liberty/mime_audio_player_inc.tpl"} + {/if} + + {if $display_type eq "storage_thumbs"} + {if $attachment.meta.title}{$attachment.meta.title}
{/if} + {tr}Full Details{/tr} + {/if} +
+{/if} +{/strip} diff --git a/templates/mime/audio/player.tpl b/templates/mime/audio/player.tpl new file mode 100644 index 0000000..7f4234c --- /dev/null +++ b/templates/mime/audio/player.tpl @@ -0,0 +1,28 @@ +{strip} +{if $attachment.media_url} + {assign var=id value="audio_`$display_type``$attachment.attachment_id`"} + {if $uploadTab}{assign var=id value="`$id`_tab"}{/if} + + {* album covers are usually square - scrollbar is 20px high *} + {if $thumbsize eq "small"} + {assign var=width value=160} + {assign var=height value=180} + {else} + {assign var=width value=400} + {assign var=height value=420} + {/if} +
Get the Flash Player to see this video.
+ +{/if} +{/strip} diff --git a/templates/mime/audio/view.tpl b/templates/mime/audio/view.tpl new file mode 100644 index 0000000..f01c5de --- /dev/null +++ b/templates/mime/audio/view.tpl @@ -0,0 +1,79 @@ +{strip} +{if $attachment.media_url} +
+ {include file="bitpackage:liberty/mime_audio_player_inc.tpl"} +
+{/if} + +{if $attachment.meta.title} +
+ {formlabel label="Title" for=""} + {forminput} + {$attachment.meta.title} + {/forminput} +
+{/if} + +{if $attachment.meta.album} +
+ {formlabel label="Album" for=""} + {forminput} + {$attachment.meta.album} + {/forminput} +
+{/if} + +{if $attachment.meta.artist} +
+ {formlabel label="Artist" for=""} + {forminput} + {$attachment.meta.artist} + {/forminput} +
+{/if} + +{if $attachment.meta.year} +
+ {formlabel label="Year" for=""} + {forminput} + {$attachment.meta.year} + {/forminput} +
+{/if} + +{if $attachment.meta.playtimestring} +
+ {formlabel label="Duration" for=""} + {forminput} + {$attachment.meta.playtimestring} + {/forminput} +
+{/if} + +{if $attachment.meta.genre} +
+ {formlabel label="Genre" for=""} + {forminput} + {$attachment.meta.genre} + {/forminput} +
+{/if} + +{if $attachment.download_url} +
+ {formlabel label="Filename" for=""} + {forminput} + {$attachment.filename|escape} ({$attachment.mime_type}) + {/forminput} +
+ +
+ {formlabel label="Filesize" for=""} + {forminput} + {$attachment.file_size|display_bytes} + {/forminput} +
+{/if} + +{attachhelp legend=1 hash=$attachment} +{/strip} diff --git a/templates/mime/default/inline.tpl b/templates/mime/default/inline.tpl new file mode 100644 index 0000000..0e16369 --- /dev/null +++ b/templates/mime/default/inline.tpl @@ -0,0 +1,33 @@ +{strip} +{if $display_type == "attachment_plugin"} + {if $wrapper.output == 'desc' || $wrapper.output == 'description'} + {if $attachment.display_url}{/if} + {$wrapper.description|escape|default:$attachment.filename} + {if $attachment.display_url}{/if} + {else} + <{$wrapper.wrapper|default:'div'} class="{$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}"> + {if $wrapper.display_url}{/if} + {if $thumbsize == 'original'} + {$attachment.filename} + {elseif $attachment.thumbnail_url.$thumbsize} + {$attachment.filename} + {/if} +
{$wrapper.description|escape} + {if $wrapper.display_url}
{/if} + + {/if} +{else} +
+ {assign var=thumbsize value=$thumbsize|default:'small'} + {if $attachment.thumbnail_url.$thumbsize} + {if !$attachment.is_primary or ( $attachment.is_primary and !$hideprimary )} + + {$attachment.filename} + + {/if} + {else} + {tr}No thumbnail for {$attachment.source_url}{/tr} + {/if} +
+{/if} +{/strip} diff --git a/templates/mime/default/upload.tpl b/templates/mime/default/upload.tpl new file mode 100644 index 0000000..be8eb9b --- /dev/null +++ b/templates/mime/default/upload.tpl @@ -0,0 +1,30 @@ +{strip} +{if $gBitUser->hasPermission('p_liberty_attach_attachments') } +
+ {formlabel label="Upload File(s)"} + {forminput} + {if $gBitSystem->getConfig("liberty_attachment_style") == "multiple"} +
+ + + {formhelp note='After selecting the file you want to upload, please return to the edit area and click the save button.'} + {elseif $gBitSystem->getConfig("liberty_attachment_style") == "ajax"} + + {include file="bitpackage:liberty/attachment_uploader_inc.tpl"} + {formhelp note='After selecting the file you want to upload, please return to the edit area and click the save button.'} + + {else} + + {formhelp note='After selecting the file you want to upload, please return to the edit area and click the save button.'} + {/if} + {/forminput} +
+{/if} +{/strip} diff --git a/templates/mime/default/view.tpl b/templates/mime/default/view.tpl new file mode 100644 index 0000000..1b39bfe --- /dev/null +++ b/templates/mime/default/view.tpl @@ -0,0 +1,20 @@ +{strip} +
+ {assign var=size value=$smarty.request.size|default:medium} + +
+ +{if !$attachment.thumbnail_is_mime} + +{/if} +{/strip} +{include file="bitpackage:liberty/mime_meta_inc.tpl"} diff --git a/templates/mime/flash/inline.tpl b/templates/mime/flash/inline.tpl new file mode 100644 index 0000000..d2d1eba --- /dev/null +++ b/templates/mime/flash/inline.tpl @@ -0,0 +1,17 @@ +
+ {* this should really get a max h or w and base size on the bounding box -or- even better would be to thumbnail swfs for list views*} + {assign var=height value=$attachment.preferences.height} + {assign var=width value=$attachment.preferences.width} + {assign var=size value=$smarty.request.size|default:medium} + {assign var=swfwidth value=$gThumbSizes.$thumbsize.width} + {math assign=multiplier equation="$swfwidth/$width"} + {math assign=swfheight equation="round($height*$multiplier)"} + + + + + + +
+ View SWF +
diff --git a/templates/mime/flash/view.tpl b/templates/mime/flash/view.tpl new file mode 100644 index 0000000..87d06fe --- /dev/null +++ b/templates/mime/flash/view.tpl @@ -0,0 +1,25 @@ +{strip} +
+ {* this should really get a max h or w and base size on the bounding box *} + {assign var=height value=$attachment.preferences.height} + {assign var=width value=$attachment.preferences.width} + {assign var=size value=$smarty.request.size|default:medium} + {assign var=swfwidth value=$gThumbSizes.$size.width} + {math assign=multiplier equation="$swfwidth/$width"} + {math assign=swfheight equation="round($height*$multiplier)"} + + + + + + +
+ +{/strip} +{include file="bitpackage:liberty/mime_meta_inc.tpl"} diff --git a/templates/mime/flv/edit.tpl b/templates/mime/flv/edit.tpl new file mode 100644 index 0000000..19f8e40 --- /dev/null +++ b/templates/mime/flv/edit.tpl @@ -0,0 +1,24 @@ +{strip} +{assign var=tv value=1.33333333333} +{assign var=ana value=1.55555555556} +{assign var=wide value=1.77777777778} +{assign var=puter value=1.6} +{assign var=cin1 value=1.85} +{assign var=cin2 value=2.39} + +
+ {formlabel label="Set Aspect Ratio" for="aspect"} + {forminput} + + {formhelp note="Here you can override the initially set aspect ratio. Please note that the displayed aspect aspect ratio might not correspond to the set value."} + {/forminput} +
+{/strip} diff --git a/templates/mime/flv/inline.tpl b/templates/mime/flv/inline.tpl new file mode 100644 index 0000000..4f6a3f7 --- /dev/null +++ b/templates/mime/flv/inline.tpl @@ -0,0 +1,28 @@ +{strip} +{if $display_type == "attachment_plugin"} + {if $wrapper.output == 'desc' || $wrapper.output == 'description'} + {if $attachment.display_url}{/if} + {$wrapper.description|escape|default:$attachment.filename} + {if $attachment.display_url}{/if} + {else} + <{$wrapper.wrapper|default:'div'} class="mimeflv {$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}"> + {if $attachment.media_url} + {include file="bitpackage:liberty/mime_flv_player_inc.tpl"} + {/if} + {if $wrapper.display_url}{/if} + {$wrapper.description|escape|default:"{tr}Full Details{/tr}"} + {if $wrapper.display_url}{/if} + + {/if} +{else} +
+ {if $attachment.media_url} + {include file="bitpackage:liberty/mime_flv_player_inc.tpl"} + {/if} + + {if $display_type eq "storage_thumbs"} + {tr}Full Details{/tr} + {/if} +
+{/if} +{/strip} diff --git a/templates/mime/flv/player.tpl b/templates/mime/flv/player.tpl new file mode 100644 index 0000000..2a47f3a --- /dev/null +++ b/templates/mime/flv/player.tpl @@ -0,0 +1,23 @@ +{strip} +{if $attachment.media_url} + {assign var=id value="video_`$display_type``$attachment.attachment_id`"} + {if $uploadTab}{assign var=id value="`$id`_tab"}{/if} +
Get the Flash Player to see this video.
+ +{/if} +{/strip} diff --git a/templates/mime/flv/view.tpl b/templates/mime/flv/view.tpl new file mode 100644 index 0000000..5990457 --- /dev/null +++ b/templates/mime/flv/view.tpl @@ -0,0 +1,63 @@ +{strip} +{if $attachment.media_url} +
+ {include file="bitpackage:liberty/mime_flv_player_inc.tpl"} +
+ + +{elseif $attachment.status.processing} +
+ + {assign var=size value=$gBitSystem->getConfig('treasury_item_view_thumb')} + {$gContent->getTitle()} +
{$gContent->getTitle()|escape} +
+
+ {formfeedback warning="{tr}The video is being processed. please try to reload in a couple of minutes.{/tr}"} +{elseif $attachment.status.error} +
+ + {assign var=size value=$gBitSystem->getConfig('treasury_item_view_thumb')} + {$gContent->getTitle()} +
{$gContent->getTitle()|escape} +
+
+ {formfeedback error="{tr}The Video could not be processed. You can upload a different version of the film or simply leave as is.{/tr}"} +{/if} + +{if $attachment.meta.duration} +
+ {formlabel label="Duration" for=""} + {forminput} + {$attachment.meta.duration|display_duration} + {/forminput} +
+{/if} + +{if $attachment.download_url} +
+ {formlabel label="Filename" for=""} + {forminput} + {$attachment.filename|escape} +   ({$attachment.mime_type}) + {/forminput} +
+ +
+ {formlabel label="Filesize" for=""} + {forminput} + {$attachment.file_size|display_bytes} + {/forminput} +
+{/if} + +{attachhelp legend=1 hash=$attachment} +{/strip} diff --git a/templates/mime/image/edit.tpl b/templates/mime/image/edit.tpl new file mode 100644 index 0000000..ae2511d --- /dev/null +++ b/templates/mime/image/edit.tpl @@ -0,0 +1,11 @@ +{strip} +{if $gBitSystem->isFeatureActive( 'mime_image_panoramas' )} +
+ {formlabel label="Panorama Image" for="panorama"} + {forminput} + + {formhelp note="If this image is a 360° panoramic image with equirectangular projection, check this box. This works best for images with a 360° by 180° field of view (FOV)"} + {/forminput} +
+{/if} +{/strip} diff --git a/templates/mime/image/inline.tpl b/templates/mime/image/inline.tpl new file mode 100644 index 0000000..f84bbe9 --- /dev/null +++ b/templates/mime/image/inline.tpl @@ -0,0 +1,52 @@ +{strip} +{if $display_type == "attachment_plugin" && $attachment.thumbnail_url.panorama} + {if $wrapper.output == 'desc' || $wrapper.output == 'description'} + {if $attachment.display_url}{/if} + {$wrapper.description|escape|default:$attachment.filename} + {if $attachment.display_url}{/if} + {else} + <{$wrapper.wrapper|default:'div'} class="{$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style}{/if}"> + + + + + + + + + {if $wrapper.display_url}{/if} + {$wrapper.description|escape}
+ {if $wrapper.display_url}
{/if} + + + {tr}Image Controls{/tr} + + {/if} +{else} + {include file=$gLibertySystem->getMimeTemplate('inline', $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER)} +{/if} +{/strip} diff --git a/templates/mime/image/view.tpl b/templates/mime/image/view.tpl new file mode 100644 index 0000000..70450f9 --- /dev/null +++ b/templates/mime/image/view.tpl @@ -0,0 +1,36 @@ +{if $attachment.thumbnail_url.panorama} + + + + + + + + + {include file="bitpackage:liberty/mime_meta_inc.tpl"} +
+ {formlabel label="Keyboard Controls"} + {forminput} + + {/forminput} +
+ +
+ {formlabel label="Mouse Controls"} + {forminput} + + {/forminput} +
+{else} + {include file=$gLibertySystem->getMimeTemplate('view', $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER)} +{/if} diff --git a/templates/mime/pbase/upload.tpl b/templates/mime/pbase/upload.tpl new file mode 100644 index 0000000..2a0012c --- /dev/null +++ b/templates/mime/pbase/upload.tpl @@ -0,0 +1,11 @@ +{strip} +{if $gBitUser->hasPermission('p_liberty_attach_attachments') } +
+ {formlabel label="PBase image ID"} + {forminput} + + {formhelp note='Use the ID number in the URL of the image on PBase.'} + {/forminput} +
+{/if} +{/strip} -- cgit v1.3