Commit | Line | Data |
---|---|---|
5fb04245 | 1 | <div class="jsOnly formAttachmentContent container containerPadding" id="attachments_{if $wysiwygSelector|isset}{$wysiwygSelector}{else}text{/if}"> |
d45eaff6 MW |
2 | <ul class="formAttachmentList clearfix"{if !$attachmentHandler->getAttachmentList()|count} style="display: none"{/if}> |
3 | {foreach from=$attachmentHandler->getAttachmentList() item=$attachment} | |
ebe4194f | 4 | <li class="box48" data-object-id="{@$attachment->attachmentID}"> |
d45eaff6 MW |
5 | {if $attachment->tinyThumbnailType} |
6 | <img src="{link controller='Attachment' object=$attachment}tiny=1{/link}" alt="" class="attachmentTinyThumbnail" /> | |
7 | {else} | |
8 | <span class="icon icon48 icon-paper-clip"></span> | |
9 | {/if} | |
10 | ||
11 | <div> | |
12 | <div> | |
13 | <p><a href="{link controller='Attachment' object=$attachment}{/link}"{if $attachment->isImage} title="{$attachment->filename}" class="jsImageViewer"{/if}>{$attachment->filename}</a></p> | |
14 | <small>{@$attachment->filesize|filesize}</small> | |
15 | </div> | |
16 | ||
17 | <ul> | |
18 | <li><span class="icon icon16 icon-remove pointer jsTooltip jsDeleteButton " title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$attachment->attachmentID}" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}"></span></li> | |
e98fa3dd | 19 | <li><span class="icon icon16 icon-paste pointer jsTooltip jsButtonInsertAttachment" title="{lang}wcf.attachment.insert{/lang}" data-object-id="{@$attachment->attachmentID}"></span></li> |
d45eaff6 MW |
20 | </ul> |
21 | </div> | |
22 | </li> | |
23 | {/foreach} | |
24 | </ul> | |
25 | ||
26 | <dl class="wide"> | |
3c40741f | 27 | <dt></dt> |
d45eaff6 | 28 | <dd> |
2a0e77ce | 29 | <div data-max-size="{@$attachmentHandler->getMaxSize()}"></div> |
d45eaff6 MW |
30 | <small>{lang}wcf.attachment.upload.limits{/lang}</small> |
31 | </dd> | |
32 | </dl> | |
33 | ||
34 | {event name='fields'} | |
35 | </div> | |
36 | ||
9543d9fe | 37 | <script data-relocate="true"> |
d45eaff6 MW |
38 | //<![CDATA[ |
39 | $(function() { | |
40 | WCF.Language.addObject({ | |
41 | 'wcf.attachment.upload.error.invalidExtension': '{lang}wcf.attachment.upload.error.invalidExtension{/lang}', | |
42 | 'wcf.attachment.upload.error.tooLarge': '{lang}wcf.attachment.upload.error.tooLarge{/lang}', | |
43 | 'wcf.attachment.upload.error.reachedLimit': '{lang}wcf.attachment.upload.error.reachedLimit{/lang}', | |
44 | 'wcf.attachment.upload.error.reachedRemainingLimit': '{lang}wcf.attachment.upload.error.reachedRemainingLimit{/lang}', | |
45 | 'wcf.attachment.upload.error.uploadFailed': '{lang}wcf.attachment.upload.error.uploadFailed{/lang}', | |
d45eaff6 | 46 | 'wcf.attachment.insert': '{lang}wcf.attachment.insert{/lang}', |
5b2bda56 | 47 | 'wcf.attachment.insertAll': '{lang}wcf.attachment.insertAll{/lang}', |
d45eaff6 MW |
48 | 'wcf.attachment.delete.sure': '{lang}wcf.attachment.delete.sure{/lang}' |
49 | }); | |
50 | ||
5fb04245 | 51 | new WCF.Attachment.Upload($('#attachments_{if $wysiwygSelector|isset}{$wysiwygSelector}{else}text{/if} > dl > dd > div'), $('#attachments_{if $wysiwygSelector|isset}{$wysiwygSelector}{else}text{/if} > ul'), '{@$attachmentObjectType}', '{@$attachmentObjectID}', '{$tmpHash|encodeJS}', '{@$attachmentParentObjectID}', {@$attachmentHandler->getMaxCount()}, '{@$wysiwygContainerID}'); |
d45eaff6 MW |
52 | new WCF.Action.Delete('wcf\\data\\attachment\\AttachmentAction', '.formAttachmentList > li'); |
53 | }); | |
54 | //]]> | |
55 | </script> | |
56 | ||
57 | <input type="hidden" name="tmpHash" value="{$tmpHash}" /> |