summaryrefslogtreecommitdiff
path: root/templates/view_image.tpl
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2006-10-06 18:36:57 +0000
committerChristian Fowler <spider@viovio.com>2006-10-06 18:36:57 +0000
commit5a63eb6abf70329e31a8edf883dfdefcb92532dd (patch)
tree1bcc6718e46ed62108ca44e0528686a60ef0cc52 /templates/view_image.tpl
parent9929ae7612b654b3de7623fb6a67c35922647b50 (diff)
downloadfisheye-5a63eb6abf70329e31a8edf883dfdefcb92532dd.tar.gz
fisheye-5a63eb6abf70329e31a8edf883dfdefcb92532dd.tar.bz2
fisheye-5a63eb6abf70329e31a8edf883dfdefcb92532dd.zip
major clean up view_image with escapes, proper accessor methods, remove deprecated stuff
Diffstat (limited to 'templates/view_image.tpl')
-rw-r--r--templates/view_image.tpl30
1 files changed, 11 insertions, 19 deletions
diff --git a/templates/view_image.tpl b/templates/view_image.tpl
index 51f0c4d..bdaf8dd 100644
--- a/templates/view_image.tpl
+++ b/templates/view_image.tpl
@@ -2,34 +2,26 @@
{include file="bitpackage:fisheye/gallery_nav.tpl"}
<div class="display fisheye">
- <div class="floaticon">
- {if $gBitSystem->isPackageActive( 'pdf' ) && $gContent->hasUserPermission( 'p_pdf_generation' )}
- {if $structureInfo.root_structure_id}
- <a title="{tr}create PDF{/tr}" href="{$smarty.const.PDF_PKG_URL}index.php?structure_id={$structureInfo.root_structure_id}">{biticon ipackage="pdf" iname="pdf" iexplain="PDF"}</a>
- {else}
- <a title="{tr}create PDF{/tr}" href="{$smarty.const.PDF_PKG_URL}index.php?content_id={$gContent->mContentId}">{biticon ipackage="pdf" iname="pdf" iexplain="PDF"}</a>
- {/if}
- {/if}
- {if $gContent->hasUserPermission('p_admin')}
- <a title="{tr}Edit{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?image_id={$gContent->mImageId}">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit Image"}</a>
- <a title="{tr}Delete{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?image_id={$gContent->mImageId}&amp;delete=1">{biticon ipackage="icons" iname="edit-delete" iexplain="Delete Image"}</a>
- {/if}
+ <div class="header">
+ <div class="floaticon">
+ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon' serviceHash=$gContent->mInfo}
+ {if $gContent->hasUserPermission('p_fisheye_edit')}
+ <a title="{tr}Edit{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?image_id={$gContent->mImageId}">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit Image"}</a>
+ <a title="{tr}Delete{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?image_id={$gContent->mImageId}&amp;delete=1">{biticon ipackage="icons" iname="edit-delete" iexplain="Delete Image"}</a>
+ {/if}
+ </div>
</div>
{formfeedback hash=$feedback}
<div class="header">
- <h1>{$gGallery->mInfo.title|escape}</h1>
+ <h1>{$gGallery->getTitle()|default:$gContent->mInfo.image_file.filename|escape}</h1>
</div>
<div class="body">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo}
{box class="box image"}
- <img src="{$gContent->mInfo.display_url}{$refresh}" alt="{$gContent->mInfo.title|escape|default:$gContent->mInfo.image_file.filename}" title="{$gContent->mInfo.data|default:$gContent->mInfo.filename}" />
-
- {if $gBitSystem->isFeatureActive( 'fisheye_image_list_title' )}
- <h1>{$gContent->mInfo.title|escape|default:$gContent->mInfo.image_file.filename}</h1>
- {/if}
+ <img src="{$gContent->mInfo.display_url}{$refresh}" alt="{$gContent->getTitle()|default:$gContent->mInfo.image_file.filename|escape}" title="{$gContent->mInfo.data|default:$gContent->mInfo.filename|escape}" />
{if $gBitSystem->isFeatureActive('fisheye_image_list_description') and $gContent->mInfo.data ne ''}
<p>{$gContent->mInfo.data}</p>
@@ -43,7 +35,7 @@
{if $url != $gContent->mInfo.display_url}<a href="{$gContent->getDisplayUrl(0,$size)|escape}">{/if}{$size}{if $url != $gContent->mInfo.display_url}</a>{/if}&nbsp;&bull;&nbsp;
{/foreach}
{if $gContent->hasEditPermission() || $gGallery && $gGallery->getPreference('link_original_images')}
- <a href="{$gContent->mInfo.image_file.source_url}">Original</a>
+ <a href="{$gContent->mInfo.image_file.source_url|escape}">Original</a>
{if $gContent->mInfo.width && $gContent->mInfo.height}
&nbsp;{$gContent->mInfo.width}x{$gContent->mInfo.height}
{/if}