diff options
| author | Christian Fowler <spider@viovio.com> | 2009-04-28 15:43:24 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2009-04-28 15:43:24 +0000 |
| commit | 6b821f193967dee3ae2346c7b021522931e008d7 (patch) | |
| tree | 06ec640eb2137a05db8722033a2fc7fe4fb49a57 | |
| parent | f5690ac28d689009acbd3cab89bc62e5f9547d83 (diff) | |
| download | liberty-6b821f193967dee3ae2346c7b021522931e008d7.tar.gz liberty-6b821f193967dee3ae2346c7b021522931e008d7.tar.bz2 liberty-6b821f193967dee3ae2346c7b021522931e008d7.zip | |
make storage_thumbs listing more like a true listing of attachments
| -rw-r--r-- | templates/storage_thumbs.tpl | 88 |
1 files changed, 69 insertions, 19 deletions
diff --git a/templates/storage_thumbs.tpl b/templates/storage_thumbs.tpl index e5695ed..8b4efa3 100644 --- a/templates/storage_thumbs.tpl +++ b/templates/storage_thumbs.tpl @@ -1,36 +1,86 @@ {strip} {if $gContent->mStorage} - {if !$gBitSystem->isFeatureActive( 'site_help_popup' )} - {popup_init src="`$smarty.const.UTIL_PKG_URL`javascript/libs/overlib.js"} - {/if} - <div class="storage"> - {assign var=thumbsize value=$gBitSystem->getConfig('liberty_auto_display_attachment_thumbs')} - {if !$thumbsize} - {assign var=thumbsize value=small} - {/if} +{assign var=thumbsize value=$gBitSystem->getConfig('liberty_auto_display_attachment_thumbs')} +{if !$thumbsize} + {assign var=thumbsize value=small} +{/if} + +<div class="storage"> + <table class="data"> + <caption> + {tr}Files attached to this page{/tr} + </caption> + <thead> + <tr> + <th></th> + <th >{tr}File{/tr}</th> + <th >{tr}Type{/tr}</th> + <th >{tr}Size{/tr}</th> + <th >{tr}Last Modified{/tr}</th> + <th >{tr}Uploaded by{/tr}</th> + </tr> + </thead> + <tbody> + {foreach from=$gContent->mStorage item=attachment key=id} + <tr class="{cycle values="odd,even"}" > + <td> + {if $attachment.source_url}<a href="{$attachment.source_url}">{/if} + <img class="thumb" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$attachment.filename}" title="{$attachment.filename}" {popup fullhtml=1 center=1 text=$smarty.capture.popup|escape:"javascript"|escape:"html"} /> + {if $attachment.source_url}</a>{/if} + </td> + <td style="text-align:left;"> + <h3> + {if $attachment.source_url}<a href="{$attachment.source_url}">{/if} + {$attachment.filename} + {if $attachment.source_url}</a>{/if} + </h3> + + </td> + <td class="attachmenttype"> + {$attachment.mime_type} + </td> + <td class="attachmentsize"> + {$attachment.file_size|display_bytes} + </td> + <td class="lastmodified"> + {$attachment.last_modified|bit_short_datetime} + </td> + <td class="uploadedby"> + {displayname user_id=$attachment.user_id} + </td> + </tr> + {/foreach} + </tbody> + </table> + +{* {foreach from=$gContent->mStorage item=attachment key=id} - {* TODO: this should not be necessary anymore as soon as we've faded out old attachment plugins *} + {* TODO: this should not be necessary anymore as soon as we've faded out old attachment plugins * } {if $attachment.is_mime} {include file=$gLibertySystem->getMimeTemplate('storage',$attachment.attachment_plugin_guid) preferences=$gContent->mStoragePrefs.$id} {else} - {* TODO: get rid of old plugin system *} + {* TODO: get rid of old plugin system * } {capture name="size"}{$attachment.file_size|display_bytes}{/capture} {capture name="popup"}{include file="bitpackage:kernel/popup_box.tpl" content="`$attachment.filename`<br />{tr}Size{/tr}: `$smarty.capture.size`" noclose=true}{/capture} - <div class="item"> - {if $attachment.thumbnail_url.$thumbsize} - {* by setting hideprimary, you can hide the primary thumbnail *} - {if !$attachment.is_primary or ( $attachment.is_primary and !$hideprimary )} + {if $attachment.thumbnail_url.$thumbsize} + {* by setting hideprimary, you can hide the primary thumbnail * } + {if !$attachment.is_primary or ( $attachment.is_primary and !$hideprimary )} + <div class="item"> + <h3> {if $attachment.source_url}<a href="{$attachment.source_url}">{/if} <img class="thumb" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$attachment.filename}" title="{$attachment.filename}" {popup fullhtml=1 center=1 text=$smarty.capture.popup|escape:"javascript"|escape:"html"}/> + {$attachment.filename} {if $attachment.source_url}</a>{/if} - {/if} - {else} - {tr}No thumbnail for{/tr} {$attachment.source_url} + </h3> + </div> {/if} - </div> + {/if} {/if} {/foreach} - </div> +*} + +</div> + {/if} {/strip} |
