From 99960f9c76a3a9cb7abf515eb66cb0aedf1a316f Mon Sep 17 00:00:00 2001 From: spiderr Date: Sat, 20 Jul 2019 09:51:20 -0400 Subject: fix attachment display with dropdown selection and modern html --- templates/edit_storage_list.tpl | 158 +++++++++++++++++----------------------- 1 file changed, 68 insertions(+), 90 deletions(-) (limited to 'templates/edit_storage_list.tpl') diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl index f8cb488..c8e8f87 100644 --- a/templates/edit_storage_list.tpl +++ b/templates/edit_storage_list.tpl @@ -5,44 +5,65 @@ {/if} {if $gContent->mStorage}
- - - - - - - + {formlabel label="Attachments"} + {foreach from=$gContent->mStorage item=storage key=attachmentId name=atts} - - - - - - {if $gBitThemes->isJavascriptEnabled()} - {capture name=inputhelp} - - - - {/capture} - - - - - - - - {/if} + + + {/foreach} {if $uploadTab} - - - - + {/if} + -
{tr}Thumbnail{/tr}{tr}Inclusion Code{/tr}{tr}Actions{/tr}
+ +
+
{if $storage.is_mime} {include file=$gLibertySystem->getMimeTemplate('storage',$storage.attachment_plugin_guid) 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} -
{$storage.filename} {$storage.file_size|display_bytes} - {if $smarty.foreach.atts.first} - {formhelp note="click to see large preview"} - {/if} - {/if} -
-
{tr}Attachment ID{/tr}: {$storage.attachment_id}
- {if $gBitThemes->isJavascriptEnabled()} - - - {else} - {$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} +
+ {tr}ID:{/tr} {$storage.attachment_id}
+ {$storage.filename} {$storage.file_size|display_bytes} +
{/if} -
{if $uploadTab} {* these radio buttons can not be displayed twice in the same form due to interference in $_REQUEST *} - -
+ {/if} + +
+ {forminput} + + {formhelp note="Wiki Code"} + {/forminput} + + {forminput} + + {formhelp note="HTML `$size`"} + {/forminput} + + +
+
+ + +
+ +
+
+
{if $gBitUser->isAdmin() || ($storage.user_id == $gBitUser->mUserId) } {capture name=urlArgs}{$attachmentBaseArgs}content_id={$gContent->mContentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}{/capture} {if $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'} @@ -58,73 +79,30 @@ {booticon iname="icon-trash" ipackage="icons" iexplain="Delete"} {/if} {/if} -
- {formhelp note="copy this code into your edit window to embed the file into your text"} -
  +
-
{/if} {if !$gBitThemes->isAjaxRequest()} -- cgit v1.3