summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2008-06-17 17:05:16 +0000
committerLester Caine <lester@lsces.co.uk>2008-06-17 17:05:16 +0000
commit63588ccd6389b692586461e98a24d897c6941bf2 (patch)
treec5dfe7ac5bfeffd813afbc426c4493e96e222d4a /templates
parenta0db2d11ec03972889fc0a27fc1b0a36155e6761 (diff)
downloadfisheye-63588ccd6389b692586461e98a24d897c6941bf2.tar.gz
fisheye-63588ccd6389b692586461e98a24d897c6941bf2.tar.bz2
fisheye-63588ccd6389b692586461e98a24d897c6941bf2.zip
Converted to LibertyMime
image_data 'flattened' into mInfo for compatability with treasury/mime templates simple_list view added to gallery options. parallels addig grids to treasury, but different ways of managing galleries are not compatible.
Diffstat (limited to 'templates')
-rw-r--r--templates/edit_gallery.tpl4
-rw-r--r--templates/edit_image.tpl12
-rw-r--r--templates/edit_image_inc.tpl10
-rw-r--r--templates/image_order.tpl2
-rw-r--r--templates/view_gallery_images_inc.tpl108
-rw-r--r--templates/view_image.tpl33
6 files changed, 128 insertions, 41 deletions
diff --git a/templates/edit_gallery.tpl b/templates/edit_gallery.tpl
index 12b8e95..12e492e 100644
--- a/templates/edit_gallery.tpl
+++ b/templates/edit_gallery.tpl
@@ -83,6 +83,10 @@ function updateGalleryPagination() {
{formhelp note="This option allows you to designate each specific image on each page. The image order number entered on the Image Order page will determine the exact location of each image. Fractional numbers indicate PAGE.POSITION and will specifiy variable images per page, such as: 1.1, 1.2, 2.1, 3.1, 3.2, 3.3"}
</div>
+ <div id="simple_list-pagination">
+ {formhelp note="This option allows a single column display of images with mime details where available."}
+ </div>
+
{/forminput}
</div>
diff --git a/templates/edit_image.tpl b/templates/edit_image.tpl
index b937867..5122be3 100644
--- a/templates/edit_image.tpl
+++ b/templates/edit_image.tpl
@@ -36,7 +36,7 @@
</div>
<div class="row">
- {if $gContent->mInfo.image_file.source_url}
+ {if $gContent->mInfo.source_url}
{formfeedback warning="{tr}Uploading a new image will replace the currently existing one.{/tr}"}
{assign var=repl value=Replacement}
{/if}
@@ -49,14 +49,14 @@
<div class="row">
{formlabel label="Current Image"}
{forminput}
- {if $gContent->mInfo.image_file.storage_path}
- <img src="{$gContent->mInfo.image_file.thumbnail_url.medium}?{math equation="1 + rand(1,9999)"}" alt="{$gContent->mInfo.title|escape}" />
+ {if $gContent->mInfo.storage_path}
+ <img src="{$gContent->mInfo.thumbnail_url.medium}?{math equation="1 + rand(1,9999)"}" alt="{$gContent->mInfo.title|escape}" />
<br />
<small>
{if $gContent->mInfo.width && $gContent->mInfo.height}
- {tr}Full size{/tr} - <a href="{$gContent->mInfo.image_file.source_url}">{$gContent->mInfo.width} x {$gContent->mInfo.height}</a>
- {elseif $gContent->mInfo.image_file.source_url}
- <a href="{$gContent->mInfo.image_file.source_url}">{tr}Full size{/tr}</a>
+ {tr}Full size{/tr} - <a href="{$gContent->mInfo.source_url}">{$gContent->mInfo.width} x {$gContent->mInfo.height}</a>
+ {elseif $gContent->mInfo.source_url}
+ <a href="{$gContent->mInfo.source_url}">{tr}Full size{/tr}</a>
{/if}
</small>
{else}
diff --git a/templates/edit_image_inc.tpl b/templates/edit_image_inc.tpl
index 38943b0..7508032 100644
--- a/templates/edit_image_inc.tpl
+++ b/templates/edit_image_inc.tpl
@@ -21,14 +21,14 @@
<div class="row">
{formlabel label="Current Image"}
{forminput}
- {if $gContent->mInfo.image_file.storage_path}
- <img src="{$gContent->mInfo.image_file.thumbnail_url.medium}" alt="{$gContent->mInfo.title|escape}" />
+ {if $gContent->mInfo.storage_path}
+ <img src="{$gContent->mInfo.thumbnail_url.medium}" alt="{$gContent->mInfo.title|escape}" />
<br />
<small>
{if $gContent->mInfo.width && $gContent->mInfo.height}
- {tr}Full size{/tr} - <a href="{$gContent->mInfo.image_file.source_url}">{$gContent->mInfo.width} x {$gContent->mInfo.height}</a>
- {elseif $gContent->mInfo.image_file.source_url}
- <a href="{$gContent->mInfo.image_file.source_url}">{tr}Full size{/tr}</a>
+ {tr}Full size{/tr} - <a href="{$gContent->mInfo.source_url}">{$gContent->mInfo.width} x {$gContent->mInfo.height}</a>
+ {elseif $gContent->mInfo.source_url}
+ <a href="{$gContent->mInfo.source_url}">{tr}Full size{/tr}</a>
{/if}
</small>
{else}
diff --git a/templates/image_order.tpl b/templates/image_order.tpl
index 43c26b9..8dde982 100644
--- a/templates/image_order.tpl
+++ b/templates/image_order.tpl
@@ -46,7 +46,7 @@
<strong>{tr}Photo Date{/tr}</strong>: {$galItem->mInfo.event_time|bit_short_datetime}<br />
{/if}
<strong>{tr}Uploaded{/tr}</strong>: {$galItem->mInfo.created|bit_short_datetime}<br />
- <strong>{tr}File name{/tr}</strong>: {$galItem->mInfo.image_file.filename} <br />
+ <strong>{tr}File name{/tr}</strong>: {$galItem->mInfo.filename} <br />
{if $galItem->mInfo.user_id == $gBitUser->mUserId || $gBitUser->isAdmin()}
<strong>{tr}Edit Image{/tr}</strong>: <a href="javascript:void(0);" onclick="BitAjax.updater( 'imgedit', '{$smarty.const.FISHEYE_PKG_URL}edit_image.php', 'ajax=true&amp;content_id={$galItem->mInfo.content_id}&amp;gallery_id={$gContent->mGalleryId}' );">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit Details"}</a>
<noscript><div><a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit Image"}</a></div></noscript>
diff --git a/templates/view_gallery_images_inc.tpl b/templates/view_gallery_images_inc.tpl
index 6a8792d..4416fbc 100644
--- a/templates/view_gallery_images_inc.tpl
+++ b/templates/view_gallery_images_inc.tpl
@@ -8,9 +8,7 @@
{foreach from=$gContent->mItems item=galItem key=itemContentId}
{box class="box `$gContent->mInfo.thumbnail_size`-thmb `$galItem->mInfo.content_type_guid`"}
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini}
- <a href="{$galItem->getDisplayUrl()|escape}">
- <img class="thumb" src="{$galItem->getThumbnailUri()}" alt="{$galItem->mInfo.title|escape|default:'image'}" />
- </a>
+ {include file=$gLibertySystem->getMimeTemplate('view',$galItem->mInfo.attachment_plugin_guid) attachment=$galItem->mInfo}
{if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )}
<h2>{$galItem->mInfo.title|escape}</h2>
{/if}
@@ -26,6 +24,110 @@
</td></tr></table>
{/if}
<div class="clear"></div>
+{elseif $gContent->getLayout() == 'simple_list'}
+ {assign var=thumbsize value='small'}
+ <table class="data">
+ <caption>{tr}List of files{/tr} <span class="total">[ {$galInfo.total_records|default:0} ]</span></caption>
+ <tr>
+ {if $thumbsize}
+ <th style="width:1%"></th>
+ {/if}
+ <th style="width:60%">
+ {smartlink ititle=Name isort=title icontrol=$galInfo structure_id=$gContent->mStructureId}
+ </th>
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_date' ) || $gBitSystem->isFeatureActive( 'fisheye_item_list_creator' )}
+ <th style="width:10%">
+ {smartlink ititle=Uploaded isort=created iorder=desc idefault=1 icontrol=$galInfo structure_id=$gContent->mStructureId}
+ </th>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_size' )}
+ <th style="width:10%">{tr}Size{/tr} /<br />{tr}Duration{/tr}</th>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_hits' )}
+ <th style="width:10%">
+ {smartlink ititle=Downloads isort="lch.hits" icontrol=$galInfo structure_id=$gContent->mStructureId}
+ </th>
+ {/if}
+ <th style="width:20%">{tr}Actions{/tr}</th>
+ </tr>
+ {foreach from=$gContent->mItems item=item}
+ <tr class="{cycle values="odd,even"}">
+ {if $thumbsize}
+ <td style="text-align:center;">
+ {if $gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
+ {if $gContent->hasEditPermission() || $gGallery && $gGallery->getPreference( 'link_original_images' )}
+ <a href="{$item->mInfo.source_url|escape}">
+ {else}
+ <a href="{$item->mInfo.thumbnail_url.large}">
+ {/if}
+ {/if}
+ <img src="{$item->mInfo.thumbnail_url.$thumbsize}" alt="{$item->mInfo.title|escape}" title="{$item->mInfo.title|escape}" />
+ {if $gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
+ </a>
+ {/if}
+ </td>
+ {/if}
+ <td>
+ <h3><a href="{$item->mInfo.display_url}">{$item->mInfo.title|escape}</a></h3>
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_desc' ) && $item->mInfo.data}
+ {$item->mInfo.parsed_data}
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_attid' )}
+ <small>{$item->mInfo.wiki_plugin_link}</small>
+ {assign var=br value=1}
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_name' )}
+ {if $br}<br />{/if}
+ {if $gBitUser->hasPermission( 'p_treasury_view_item' )}
+ <a href="{$item->mInfo.display_url}">
+ {/if}
+ {$item->mInfo.filename} <small>({$item->mInfo.mime_type})</small>
+ {if $gBitUser->hasPermission( 'p_treasury_view_item' )}
+ </a>
+ {/if}
+ {/if}
+ </td>
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_date' ) || $gBitSystem->isFeatureActive( 'fisheye_item_list_creator' )}
+ <td>
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_date' )}
+ {$item->mInfo.created|bit_short_date}<br />
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_creator' )}
+ {tr}by{/tr}: {displayname hash=$item->mInfo}
+ {/if}
+ </td>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_size' )}
+ <td style="text-align:right;">
+ {if $item->mInfo.download_url}
+ {$item->mInfo.file_size|display_bytes}
+ {/if}
+ {if $item->mInfo.prefs.duration}
+ {if $item->mInfo.download_url} / {/if}{$item->mInfo.prefs.duration|display_duration}
+ {/if}
+ </td>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'fisheye_item_list_hits' )}
+ <td style="text-align:right;">
+ {$item->mInfo.hits|default:"{tr}none{/tr}"}
+ </td>
+ {/if}
+ <td class="actionicon">
+ {if $gBitUser->hasPermission( 'p_treasury_download_item' ) && $item->mInfo.download_url}
+ <a href="{$item->mInfo.download_url}">{biticon ipackage="icons" iname="emblem-downloads" iexplain="Download File"}</a>
+ {/if}
+ {if $gBitUser->hasPermission( 'p_treasury_view_item' )}
+ <a href="{$item->mInfo.display_url}">{biticon ipackage="icons" iname="document-open" iexplain="View File"}</a>
+ {/if}
+ {if $gContent->isOwner( $item->mInfo ) || $gBitUser->isAdmin()}
+ <a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$item->mInfo.content_id}&amp;action=edit">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit File"}</a>
+ <a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$item->mInfo.content_id}&amp;delete=1">{biticon ipackage="icons" iname="edit-delete" iexplain="Remove File"}</a>
+ {/if}
+ </td>
+ </tr>
+ {/foreach}
+ </table>
+
{else}
<table class="thumbnailblock">
{counter assign="imageCount" start="0" print=false}
diff --git a/templates/view_image.tpl b/templates/view_image.tpl
index b786e91..bba064f 100644
--- a/templates/view_image.tpl
+++ b/templates/view_image.tpl
@@ -16,7 +16,7 @@
{formfeedback hash=$feedback}
<div class="header">
- <h1>{$gContent->getTitle()|default:$gContent->mInfo.image_file.filename|escape}</h1>
+ <h1>{$gContent->getTitle()|default:$gContent->mInfo.filename|escape}</h1>
</div>
<div class="body">
@@ -24,44 +24,25 @@
{box class="box image"}
{if $gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
{if $gContent->hasEditPermission() || $gGallery && $gGallery->getPreference( 'link_original_images' )}
- <a href="{$gContent->mInfo.image_file.source_url|escape}">
+ <a href="{$gContent->mInfo.source_url|escape}">
{else}
- <a href="{$gContent->mInfo.image_file.thumbnail_url.large}">
+ <a href="{$gContent->mInfo.thumbnail_url.large}">
{/if}
{/if}
- <img src="{$gContent->getThumbnailUri()}{$refresh}" alt="{$gContent->getTitle()|default:$gContent->mInfo.image_file.filename|escape}" title="{$gContent->mInfo.data|default:$gContent->mInfo.filename|escape}" />
+ {include file=$gLibertySystem->getMimeTemplate('view',$gContent->mInfo.attachment_plugin_guid) attachment=$gContent->mInfo}
{if $gBitSystem->isFeatureActive('fisheye_image_list_description') and $gContent->mInfo.data ne ''}
- <p class="description">{$gContent->mInfo.data|escape}</p>
+ <p class="description">{$gContent->mInfo.parsed_data}</p>
{/if}
{if $gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
</a>
{/if}
- {/box}
-
- {if !$liberty_preview}
- <div class="pagination">
- {if !$gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
- {tr}View other sizes{/tr}<br />
- {foreach name=size key=size from=$gContent->mInfo.image_file.thumbnail_url item=url}
- {if $url != $gContent->mInfo.display_url}<a href="{$gContent->getDisplayUrl(0,$size)|escape}">{/if}{tr}{$size}{/tr}{if $url != $gContent->mInfo.display_url}</a>{/if}
- {if !$smarty.foreach.size.last} &nbsp;&bull;&nbsp;{/if}
- {/foreach}
- {/if}
+ </div><!-- end .body -->
- {if ( $gContent->hasEditPermission() || $gGallery && $gGallery->getPreference( 'link_original_images' )) && !$gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
- &nbsp;&bull;&nbsp;
- <a href="{$gContent->mInfo.image_file.source_url|escape}">{tr}Original{/tr}</a>
- {if $gContent->mInfo.width && $gContent->mInfo.height}
- &nbsp;{$gContent->mInfo.width}x{$gContent->mInfo.height}
- {/if}
- {/if}
- </div>
+ {/box}
- {attachhelp hash=$gContent->mInfo.image_file}
- {/if}
</div> <!-- end .body -->
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='view' serviceHash=$gContent->mInfo}