From: Matthias Schmidt Date: Thu, 24 Dec 2015 11:51:34 +0000 (+0100) Subject: Add image selector for boxes X-Git-Tag: 3.0.0_Beta_1~2030^2~205 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56eb7314ae15956efc633f07fe99e6b332c619a3;p=GitHub%2FWoltLab%2FWCF.git Add image selector for boxes --- diff --git a/com.woltlab.wcf/templates/mediaJavaScript.tpl b/com.woltlab.wcf/templates/mediaJavaScript.tpl new file mode 100644 index 0000000000..960d9f0665 --- /dev/null +++ b/com.woltlab.wcf/templates/mediaJavaScript.tpl @@ -0,0 +1,22 @@ +{if $__wcf->session->getPermission('admin.content.cms.canUseMedia')} + require(['Language', 'Permission'], function(Language, Permission) { + Language.addObject({ + 'wcf.global.button.insert': '{lang}wcf.global.button.insert{/lang}', + + 'wcf.media.insert': '{lang}wcf.media.insert{/lang}', + 'wcf.media.insert.imageSize': '{lang}wcf.media.insert.imageSize{/lang}', + 'wcf.media.insert.imageSize.small': '{lang __literal=true}wcf.media.insert.imageSize.small{/lang}', + 'wcf.media.insert.imageSize.medium': '{lang __literal=true}wcf.media.insert.imageSize.medium{/lang}', + 'wcf.media.insert.imageSize.large': '{lang __literal=true}wcf.media.insert.imageSize.large{/lang}', + 'wcf.media.insert.imageSize.original': '{lang __literal=true}wcf.media.insert.imageSize.original{/lang}', + 'wcf.media.manager': '{lang}wcf.media.manager{/lang}', + 'wcf.media.edit': '{lang}wcf.media.edit{/lang}', + 'wcf.media.imageDimensions.value': '{lang __literal=true}wcf.media.imageDimensions.value{/lang}', + 'wcf.media.button.insert': '{lang}wcf.media.button.insert{/lang}', + 'wcf.media.search.filetype': '{lang}wcf.media.search.filetype{/lang}', + 'wcf.media.search.noResults': '{lang}wcf.media.search.noResults{/lang}' + }); + + Permission.add('admin.content.cms.canManageMedia', {if $__wcf->session->getPermission('admin.content.cms.canManageMedia')}true{else}false{/if}); + }); +{/if} diff --git a/com.woltlab.wcf/templates/mediaListItems.tpl b/com.woltlab.wcf/templates/mediaListItems.tpl index 1621bd5ccb..45007323dd 100644 --- a/com.woltlab.wcf/templates/mediaListItems.tpl +++ b/com.woltlab.wcf/templates/mediaListItems.tpl @@ -1,7 +1,7 @@ {foreach from=$mediaList item=media}
  • - {@$media->getElementTag(96)} + {@$media->getElementTag(144)}
    @@ -21,9 +21,15 @@
  • {/if} -
  • - -
  • + {if $mode == 'editor'} +
  • + +
  • + {elseif $mode == 'select'} +
  • + +
  • + {/if} diff --git a/com.woltlab.wcf/templates/mediaManager.tpl b/com.woltlab.wcf/templates/mediaManager.tpl index 6f53d90ff4..2c33b79d9d 100644 --- a/com.woltlab.wcf/templates/mediaManager.tpl +++ b/com.woltlab.wcf/templates/mediaManager.tpl @@ -1,16 +1,19 @@ -