summaryrefslogtreecommitdiff
path: root/templates/edit_storage_list.tpl
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-09-15 11:34:32 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-09-15 11:34:32 +0000
commitf7c06b9a340348d4152f86757624379fce2a12a4 (patch)
treef851b7eea360d19ed53b6be2d2f3fd154a90bd91 /templates/edit_storage_list.tpl
parent625d7516c880c7734a173105ab9803cb1515eaa0 (diff)
downloadliberty-f7c06b9a340348d4152f86757624379fce2a12a4.tar.gz
liberty-f7c06b9a340348d4152f86757624379fce2a12a4.tar.bz2
liberty-f7c06b9a340348d4152f86757624379fce2a12a4.zip
make it possible to set a primary attachment with a simply radio button. U comment attachment browser for now as well. UI needs lots more work but we will probably have to discuss on what we want to have visible and what wethe attachments tab is supposed to do
Diffstat (limited to 'templates/edit_storage_list.tpl')
-rw-r--r--templates/edit_storage_list.tpl44
1 files changed, 24 insertions, 20 deletions
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl
index 449cc39..96dbb2c 100644
--- a/templates/edit_storage_list.tpl
+++ b/templates/edit_storage_list.tpl
@@ -4,44 +4,48 @@
<div class="row">
<table class="data" summary="List of attached files">
{if $attachmentBrowser}
- <caption>{tr}Your Attachments{/tr}</caption>
+ <caption>{tr}Your Attachments{/tr}</caption>
{else}
- <caption>{tr}Items {if $libertyUploader && empty($gContent->mContentId)}That Will Be{/if} Attached Directly to this Content{/tr}</caption>
+ <caption>{tr}Items {if $libertyUploader && empty($gContent->mContentId)}That Will Be{/if} Attached Directly to this Content{/tr}</caption>
{/if}
<tr>
- <th scope="col" title="{tr}Thumbnail{/tr}">{tr}Thumbnail{/tr}</th>
- <th scope="col" title="{tr}File Properties{/tr}">{tr}File Properties{/tr}</th>
- <th scope="col" title="{tr}Inclusion Code{/tr}">{tr}Inclusion Code{/tr}</th>
+ <th scope="col" style="width:30%:" title="{tr}Thumbnail{/tr}">{tr}Thumbnail{/tr}</th>
+ <th scope="col" style="width:40%:" title="{tr}Inclusion Code{/tr}">{tr}Inclusion Code{/tr}</th>
+ <th scope="col" style="width:30%:" title="{tr}Actions{/tr}">{tr}Actions{/tr}</th>
</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}
{if $smarty.foreach.atts.first}
{formhelp note="click to see large preview"}
{/if}
</td>
- <td>
- {tr}Attachment ID{/tr}: {$attachmentId} {if $gContent->mInfo.primary_attachment_id eq $attachmentId}({tr}Primary{/tr}){/if} <br />
- {tr}Filename{/tr}: {$storage.filename} <br />
- {tr}Actions{/tr}:
- {if $gBitUser->isAdmin() || ($storage.user_id == $gBitUser->mUserId && $gBitUser->hasPermission('p_liberty_delete_attachments') ) }
- {if $attachmentBrowser}
- <a href="javascript:ajax_updater('attbrowser', '{$attachmentActionBaseURL}', 'deleteAttachment={$attachmentId}');">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
- {elseif $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'}
- <a href="javascript:ajax_updater('edit_storage_list_div', '{$attachmentActionBaseURL}', 'deleteAttachment={$attachmentId}');">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
- {else}
- <a href="{$attachmentActionBaseURL}&amp;deleteAttachment={$attachmentId}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
- {/if}
- {/if}
- </td>
- <td style="text-align:center; width:30%">
+ <td style="text-align:center;">
{$storage.wiki_plugin_link}
{if $smarty.foreach.atts.first}
{formhelp note="copy this code into your edit window to embed the file into your text"}
{/if}
</td>
+ <td class="actionicon">
+ {if $uploadTab}
+ {if $gBitUser->isAdmin() || ($storage.user_id == $gBitUser->mUserId && $gBitUser->hasPermission('p_liberty_delete_attachments') ) }
+ {if $attachmentBrowser}
+ <a href="javascript:ajax_updater('attbrowser', '{$attachmentActionBaseURL}', 'deleteAttachment={$attachmentId}');">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
+ {elseif $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'}
+ <a href="javascript:ajax_updater('edit_storage_list_div', '{$attachmentActionBaseURL}', 'deleteAttachment={$attachmentId}');">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
+ {else}
+ <a href="{$attachmentActionBaseURL}&amp;deleteAttachment={$attachmentId}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
+ {/if}
+ {/if}
+ {else}
+ {* these radio buttons can not be displayed twice in the same form due to interference in $_REQUEST *}
+ <label>{tr}{$primary_label|default:"Primary"}{/tr}: <input type="radio" name="liberty_attachments[primary]" value="{$attachmentId}"{if $storage.is_primary eq 'y'} checked="checked"{/if}/></label>
+ <br />
+ {/if}
+ </td>
</tr>
{/foreach}
</table>