From: Matthias Schmidt Date: Tue, 22 Dec 2015 16:07:05 +0000 (+0100) Subject: Add media management (WIP) X-Git-Tag: 3.0.0_Beta_1~2030^2~207^2~3^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=59ab4d0f66ddd21bc800b49ebbedcd91e6ae0c5c;p=GitHub%2FWoltLab%2FWCF.git Add media management (WIP) --- diff --git a/com.woltlab.wcf/acpMenu.xml b/com.woltlab.wcf/acpMenu.xml index 65f790266e..e0f5acc146 100644 --- a/com.woltlab.wcf/acpMenu.xml +++ b/com.woltlab.wcf/acpMenu.xml @@ -617,7 +617,6 @@ wcf.acp.menu.link.cms admin.content.cms.canManagePage - wcf.acp.menu.link.cms.page.list @@ -630,7 +629,6 @@ wcf.acp.menu.link.cms admin.content.cms.canManageMenu - wcf.acp.menu.link.cms.menu.list @@ -643,12 +641,23 @@ wcf.acp.menu.link.cms admin.content.cms.canManageBox - wcf.acp.menu.link.cms.box.list admin.content.cms.canManageBox fa-plus + + + + wcf.acp.menu.link.cms + admin.content.cms.canManageMedia + + + + wcf.acp.menu.link.cms.media.list + admin.content.cms.canManageMedia + fa-plus + diff --git a/com.woltlab.wcf/clipboardAction.xml b/com.woltlab.wcf/clipboardAction.xml index c91192b202..d633a98d87 100644 --- a/com.woltlab.wcf/clipboardAction.xml +++ b/com.woltlab.wcf/clipboardAction.xml @@ -83,5 +83,26 @@ + + + + + 1 + + + + + + + + 2 + + + + + diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index dc9c8000aa..e9b0d6f37a 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -12,6 +12,11 @@ com.woltlab.wcf.clipboardItem + + com.woltlab.wcf.media + com.woltlab.wcf.clipboardItem + + diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index be74404b4e..f09b7fd1da 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -244,6 +244,16 @@ dashboard.sidebar + + + + + cms + + + cms.media + + @@ -1471,6 +1481,64 @@ DESC:wcf.global.sortOrder.descending]]> 100 + + + + + + + + + + + + diff --git a/com.woltlab.wcf/templates/dashboard.tpl b/com.woltlab.wcf/templates/dashboard.tpl index a3b3daf148..eda866905a 100644 --- a/com.woltlab.wcf/templates/dashboard.tpl +++ b/com.woltlab.wcf/templates/dashboard.tpl @@ -29,6 +29,37 @@ {/if} +{*TODO: remove dummy media manager dialog demonstration code later on*} +

click

+ + +{* /end *} + {include file='userNotice'}
diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl index 47caae7d03..f938b8d995 100644 --- a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -65,6 +65,7 @@ requirejs.config({ 'wcf.global.form.error.greaterThan': '{lang __literal=true}wcf.global.form.error.greaterThan{/lang}', 'wcf.global.form.error.lessThan': '{lang __literal=true}wcf.global.form.error.lessThan{/lang}', 'wcf.global.form.input.maxItems': '{lang}wcf.global.form.input.maxItems{/lang}', + 'wcf.global.form.error.multilingual': '{lang}wcf.global.form.error.multilingual{/lang}', 'wcf.global.language.noSelection': '{lang}wcf.global.language.noSelection{/lang}', 'wcf.global.loading': '{lang}wcf.global.loading{/lang}', 'wcf.global.page.jumpTo': '{lang}wcf.global.page.jumpTo{/lang}', diff --git a/com.woltlab.wcf/templates/languageChooser.tpl b/com.woltlab.wcf/templates/languageChooser.tpl new file mode 100644 index 0000000000..c75dfaa79c --- /dev/null +++ b/com.woltlab.wcf/templates/languageChooser.tpl @@ -0,0 +1,31 @@ +{if !$label|isset}{assign var='label' value='wcf.user.language'}{/if} + +{if $languages|count} + +
{lang}{$label}{/lang}
+
+ +
+ + + +{/if} diff --git a/com.woltlab.wcf/templates/mediaEditor.tpl b/com.woltlab.wcf/templates/mediaEditor.tpl new file mode 100644 index 0000000000..65172e57e8 --- /dev/null +++ b/com.woltlab.wcf/templates/mediaEditor.tpl @@ -0,0 +1,65 @@ +
+ +
+ + +
+
{lang}wcf.media.filename{/lang}
+
+ +
{lang}wcf.media.filesize{/lang}
+
+ +
{lang}wcf.media.imageDimensions{/lang}
+
+ +
{lang}wcf.media.uploader{/lang}
+
+
+
+ +
+ {lang}wcf.global.form.data{/lang} + +
+
+
+ +
+
+ + {include file='languageChooser' label='wcf.media.languageID'} + +
+
{lang}wcf.global.title{/lang}
+
+ +
+
+ {include file='multipleLanguageInputJavascript' elementIdentifier='title' forceSelection=true} + +
+
{lang}wcf.media.caption{/lang}
+
+ +
+
+ {include file='multipleLanguageInputJavascript' elementIdentifier='caption' forceSelection=true} + +
+
{lang}wcf.media.altText{/lang}
+
+ +
+
+ {include file='multipleLanguageInputJavascript' elementIdentifier='altText' forceSelection=true} + + {event name='dataFields'} +
+ +
+ +
diff --git a/com.woltlab.wcf/templates/mediaListItems.tpl b/com.woltlab.wcf/templates/mediaListItems.tpl new file mode 100644 index 0000000000..1621bd5ccb --- /dev/null +++ b/com.woltlab.wcf/templates/mediaListItems.tpl @@ -0,0 +1,30 @@ +{foreach from=$mediaList item=media} +
  • +
    + {@$media->getElementTag(96)} +
    + +
    +

    {if $media->title}{$media->title}{else}{$media->filename}{/if}

    +
    + + +
  • +{/foreach} diff --git a/com.woltlab.wcf/templates/mediaManager.tpl b/com.woltlab.wcf/templates/mediaManager.tpl new file mode 100644 index 0000000000..6f53d90ff4 --- /dev/null +++ b/com.woltlab.wcf/templates/mediaManager.tpl @@ -0,0 +1,33 @@ + + +{if $__wcf->session->getPermission('admin.content.cms.canManageMedia')} +
    +{/if} + +
    + +
      + {include file='mediaListItems'} +
    + +
    + +
    +
    diff --git a/com.woltlab.wcf/templates/multipleLanguageInputJavascript.tpl b/com.woltlab.wcf/templates/multipleLanguageInputJavascript.tpl index f59328760d..cdacde6704 100644 --- a/com.woltlab.wcf/templates/multipleLanguageInputJavascript.tpl +++ b/com.woltlab.wcf/templates/multipleLanguageInputJavascript.tpl @@ -1,11 +1,14 @@ {if $availableLanguages|count > 1} -{/if} \ No newline at end of file +{/if} diff --git a/com.woltlab.wcf/templates/sitemap.tpl b/com.woltlab.wcf/templates/sitemap.tpl index 3518a73820..cffdc03122 100644 --- a/com.woltlab.wcf/templates/sitemap.tpl +++ b/com.woltlab.wcf/templates/sitemap.tpl @@ -17,21 +17,6 @@
    {/foreach} - - {hascontentelse} {@$sitemap} {/hascontent} diff --git a/com.woltlab.wcf/userGroupOption.xml b/com.woltlab.wcf/userGroupOption.xml index 7f2b18aea3..0209520d25 100644 --- a/com.woltlab.wcf/userGroupOption.xml +++ b/com.woltlab.wcf/userGroupOption.xml @@ -413,7 +413,7 @@ pdf]]> 1 1 - + + + + +