blob: cc2b10ad8e582b80861e58b56e2435571a0d5396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
{strip}
{if $gContent->mStorage}
<div class="row">
<table class="data" summary="List of attached files">
{if $attachmentBrowser}
<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>
{/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>
</tr>
<tr>
<td style="text-align:center;">{formhelp note="click to see large preview"}</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">{formhelp note="copy this code into your edit window to embed the image into your text"}</td>
</tr>
{foreach from=$gContent->mStorage item=storage key=attachmentId}
<tr class="{cycle values="odd,even"}">
<td style="text-align:center;"><a href="{$storage.source_url}"><img src="{$storage.thumbnail_url.avatar}" alt="{$storage.filename}" /></a></td>
<td>
Attachment ID: {$attachmentId}
<br />
Filename: {$storage.filename}
<br />
Actions:
{if ($gBitUser->isAdmin() || $gBitUser->hasPermission( 'p_liberty_detach_attachment' ) || $storage.user_id == $gBitUser->mUserId) && !empty($gContent->mContentId)}
{if $attachmentBrowser}
{if in_array($gContent->mContentId, $storage.attached_to)}
<a href="javascript:ajax_updater('attbrowser', '{$attachmentActionBaseURL}', 'content_id={$gContent->mContentId}&detachAttachment={$attachmentId}')">{biticon ipackage=icons iname="edit-cut" iexplain="detach"}</a>
{/if}
{elseif $libertyUploader or $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'}
<a href="javascript:ajax_updater('edit_storage_list_div', '{$attachmentActionBaseURL}', 'content_id={$gContent->mContentId}&detachAttachment={$attachmentId}');">{biticon ipackage=icons iname="edit-cut" iexplain="detach"}</a>
{else}
<a href="{$attachmentActionBaseURL}&content_id={$gContent->mContentId}&detachAttachment={$attachmentId}">{biticon ipackage=icons iname="edit-cut" iexplain="detach"}</a>
{/if}
{/if}
{if $gBitUser->isAdmin() || $storage.user_id == $gBitUser->mUserId}
{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}&deleteAttachment={$attachmentId}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a>
{/if}
{/if}
</td>
<td style="text-align:center; width:30%">
{ldelim}attachment id={$attachmentId}{rdelim}
</td>
</tr>
{/foreach}
</table>
</div>
{/if}
{/strip}
|