summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-06-01 09:50:53 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-06-01 09:50:53 +0000
commit4220ed1fa41526c945d5259d80f5434e41b38bf1 (patch)
treeeee7ebcdf8a38b6db56bb6993b19c2daabf18149 /templates
parentb0029c413b9c9f8f962d0f4e2fe5b5215bd0e47c (diff)
downloadliberty-4220ed1fa41526c945d5259d80f5434e41b38bf1.tar.gz
liberty-4220ed1fa41526c945d5259d80f5434e41b38bf1.tar.bz2
liberty-4220ed1fa41526c945d5259d80f5434e41b38bf1.zip
get the attachment browser working with libertymime plugins
Diffstat (limited to 'templates')
-rw-r--r--templates/edit_storage_list.tpl22
1 files changed, 15 insertions, 7 deletions
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl
index 1f398e1..cb09cf2 100644
--- a/templates/edit_storage_list.tpl
+++ b/templates/edit_storage_list.tpl
@@ -15,23 +15,28 @@
<tr>
<td></td><td></td>
- {if $uploadTab }
+ {if $uploadTab}
<td class="actionicon">
<label>
{tr}No {$primary_label|default:"Primary"}{/tr}:&nbsp;
<input type="radio" name="liberty_attachments[primary]" value="none" {if empty($gContent->mInfo[primary])}checked="checked"{/if} />
</label>
</td>
+ {assign var=area value=upload_tab}
{/if}
- <tr>
+ </tr>
{foreach from=$gContent->mStorage item=storage key=attachmentId name=atts}
<tr class="{cycle values="odd,even"}">
<td style="text-align:center;">
- {jspopup href=$storage.source_url title=$storage.title|default:$storage.filename notra=1 img=$storage.thumbnail_url.avatar}
- <br />{$storage.filename} <span class="date">{$storage.file_size|display_bytes}</span>
- {if $smarty.foreach.atts.first}
- {formhelp note="click to see large preview"}
+ {if $storage.is_mime}
+ {include file=$gContent->getMimeTemplate('inline',$storage.attachment_plugin_guid) area=$area thumbsize=small preferences=$gContent->mStoragePrefs.$attachmentId attachment=$storage}
+ {else}
+ {jspopup href=$storage.source_url title=$storage.title|default:$storage.filename notra=1 img=$storage.thumbnail_url.avatar}
+ <br />{$storage.filename} <span class="date">{$storage.file_size|display_bytes}</span>
+ {if $smarty.foreach.atts.first}
+ {formhelp note="click to see large preview"}
+ {/if}
{/if}
</td>
<td style="text-align:center;">
@@ -55,7 +60,10 @@
{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}
</a>
{else}
- <a href="{$smarty.server.PHP_SELF}?{$smarty.capture.urlArgs}&amp;deleteAttachment={$attachmentId}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
+ {if $storage.is_mime}
+ <a href="{$smarty.const.LIBERTY_PKG_URL}mime_view.php?attachment_id={$attachmentId}">{biticon ipackage="icons" iname="document-open" iexplain="View"}</a>
+ {/if}
+ <a href="{$smarty.server.PHP_SELF}?{$smarty.capture.urlArgs}&amp;deleteAttachment={$attachmentId}">{biticon ipackage="icons" iname="edit-delete" iexplain="Delete"}</a>
{/if}
{/if}
</td>