Added prototype for ACP style editor
authorAlexander Ebert <ebert@woltlab.com>
Mon, 8 Oct 2012 17:39:34 +0000 (19:39 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 8 Oct 2012 17:40:25 +0000 (19:40 +0200)
Currently only the form to create a style exists, more features will be added soon :)

.gitignore [new file with mode: 0644]
acpMenu.xml [new file with mode: 0644]
acptemplates/styleAdd.tpl [new file with mode: 0644]
acptemplates/styleVariableColor.tpl [new file with mode: 0644]
acptemplates/styleVariableUnit.tpl [new file with mode: 0644]
files/lib/acp/form/StyleAddForm.class.php [new file with mode: 0644]
files/style/styleEditor.less [new file with mode: 0644]
language/de.xml [new file with mode: 0644]
package.xml [new file with mode: 0644]
userGroupOption.xml [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..d9b96dd
--- /dev/null
@@ -0,0 +1,50 @@
+# Linux
+# backup files
+*~
+
+# Windows
+# thumbnails
+Thumbs.db
+
+# Mac OS X
+# metadata
+.DS_Store
+# thumbnails
+._*
+
+# Visual Studio PHP
+*.sln
+*.phpproj
+*.puo
+*.suo
+*.cache
+
+# Netbeans
+nbproject/
+catalog.xml
+nbactions.xml
+
+# Eclipse
+.settings/
+.buildpath
+.classpath
+.project
+
+# SVN
+# svn folders
+.svn/
+
+# PHPStorm
+.idea/
+.nameencodings
+.xmlmisc
+.xmlmodules
+.xmlprojectCodeStyle
+.xmlvcs.xml
+*.imlworkspace
+.xml
+
+# Community Framework
+# Ignore packages build directly in the workspace. They can however be added manually via git add, if wanted.
+*.tar
+*.tar.gz
\ No newline at end of file
diff --git a/acpMenu.xml b/acpMenu.xml
new file mode 100644 (file)
index 0000000..d03c7fa
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/acpMenu.xsd">
+       <import>
+               <!-- style -->
+               <acpmenuitem name="wcf.acp.menu.link.style">
+                       <parent>wcf.acp.menu.link.display</parent>
+                       <showorder>1</showorder>
+               </acpmenuitem>
+               
+               <acpmenuitem name="wcf.acp.menu.link.style.list">
+                       <link>index.php/StyleList/</link>
+                       <parent>wcf.acp.menu.link.style</parent>
+                       <permissions>admin.style.canEditStyle,admin.style.canDeleteStyle</permissions>
+                       <showorder>1</showorder>
+               </acpmenuitem>
+               
+               <acpmenuitem name="wcf.acp.menu.link.style.add">
+                       <link>index.php/StyleAdd/</link>
+                       <parent>wcf.acp.menu.link.style</parent>
+                       <permissions>admin.style.canAddStyle</permissions>
+                       <showorder>2</showorder>
+               </acpmenuitem>
+               <!-- /style -->
+       </import>
+</data>
diff --git a/acptemplates/styleAdd.tpl b/acptemplates/styleAdd.tpl
new file mode 100644 (file)
index 0000000..d2bbf4e
--- /dev/null
@@ -0,0 +1,429 @@
+{include file='header'}
+
+<script type="text/javascript" src="{@$__wcf->getPath()}js/WCF.ColorPicker.js"></script>
+<script type="text/javascript">
+       //<![CDATA[
+       $(function() {
+               new WCF.ColorPicker('.jsColorPicker');
+               WCF.TabMenu.init();
+               
+               var $useFluidLayout = $('#useFluidLayout');
+               var $fluidLayoutVariables = $('#fluidLayoutVariables');
+               var $fixedLayoutVariables = $('#fixedLayoutVariables');
+               function useFluidLayout() {
+                       if ($useFluidLayout.is(':checked')) {
+                               $fluidLayoutVariables.show();
+                               $fixedLayoutVariables.hide();
+                       }
+                       else {
+                               $fluidLayoutVariables.hide();
+                               $fixedLayoutVariables.show();
+                       }
+               }
+               $useFluidLayout.change(useFluidLayout);
+               useFluidLayout();
+       });
+       //]]>
+</script>
+<header class="boxHeadline">
+       <hgroup>
+               <h1>{lang}wcf.acp.style.{$action}{/lang}</h1>
+       </hgroup>
+</header>
+
+{if $errorField}
+       <p class="error">{lang}wcf.global.form.error{/lang}</p>
+{/if}
+
+{if $success|isset}
+       <p class="success">{lang}wcf.global.form.{$action}.success{/lang}</p>   
+{/if}
+
+<div class="contentNavigation">
+       <nav>
+               <ul>
+                       <li><a href="{link controller='StyleList'}{/link}" title="{lang}wcf.acp.menu.link.style.list{/lang}" class="button"><img src="{@$__wcf->getPath()}icon/list.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.menu.link.style.list{/lang}</span></a></li>
+               </ul>
+       </nav>
+</div>
+
+<form method="post" action="{if $action == 'add'}{link controller='StyleAdd'}{/link}{else}{link controller='StyleEdit'}{/link}{/if}">
+       <div class="tabMenuContainer" data-active="" data-store="">
+               <nav class="tabMenu">
+                       <ul>
+                               <li><a href="#general">{lang}wcf.acp.style.general{/lang}</a></li>
+                               <li><a href="#globals">{lang}wcf.acp.style.globals{/lang}</a></li>
+                               <li><a href="#colors">{lang}wcf.acp.style.colors{/lang}</a></li>
+                       </ul>
+               </nav>
+               
+               {* general *}
+               <div id="general" class="container containerPadding tabMenuContainer tabMenuContent">
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.general.data{/lang}</legend>
+                               
+                               <dl{if $errorField == 'styleName'} class="formError"{/if}>
+                                       <dt><label for="styleName">{lang}wcf.acp.style.styleName{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="styleName" id="styleName" value="{$styleName}" class="long" />
+                                               {if $errorField == 'styleName'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.styleName.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'authorName'} class="formError"{/if}>
+                                       <dt><label for="authorName">{lang}wcf.acp.style.authorName{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="authorName" id="authorName" value="{$authorName}" class="long" />
+                                               {if $errorField == 'authorName'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.authorName.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'copyright'} class="formError"{/if}>
+                                       <dt><label for="copyright">{lang}wcf.acp.style.copyright{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="copyright" id="copyright" value="{$copyright}" class="long" />
+                                               {if $errorField == 'copyright'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.copyright.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'styleVersion'} class="formError"{/if}>
+                                       <dt><label for="styleVersion">{lang}wcf.acp.style.styleVersion{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="styleVersion" id="styleVersion" value="{$styleVersion}" class="small" />
+                                               {if $errorField == 'styleVersion'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.styleVersion.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'styleDate'} class="formError"{/if}>
+                                       <dt><label for="styleDate">{lang}wcf.acp.style.styleDate{/lang}</label></dt>
+                                       <dd>
+                                               <input type="date" name="styleDate" id="styleDate" value="{$styleDate}" class="small" />
+                                               {if $errorField == 'styleDate'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.styleDate.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'license'} class="formError"{/if}>
+                                       <dt><label for="license">{lang}wcf.acp.style.license{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="license" id="license" value="{$license}" class="long" />
+                                               {if $errorField == 'license'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.license.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'authorURL'} class="formError"{/if}>
+                                       <dt><label for="authorURL">{lang}wcf.acp.style.authorURL{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="authorURL" id="authorURL" value="{$authorURL}" class="long" />
+                                               {if $errorField == 'authorURL'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.authorURL.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'styleDescription'} class="formError"{/if}>
+                                       <dt><label for="styleDescription">{lang}wcf.acp.style.styleDescription{/lang}</label></dt>
+                                       <dd>
+                                               <textarea name="styleDescription" id="styleDescription">{$styleDescription}</textarea>
+                                               {if $errorField == 'styleDescription'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.styleDescription.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.general.files{/lang}</legend>
+                               
+                               <dl{if $errorField == 'image'} class="formError"{/if}>
+                                       <dt><label for="image">{lang}wcf.acp.style.image{/lang}</label></dt>
+                                       <dd>
+                                               <input type="hidden" name="image" value="{$image}" readonly="readonly" class="long" /> TODO: Add upload here!
+                                               {if $errorField == 'image'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.image.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                               <small>{lang}wcf.acp.style.image.description{/lang}</small>
+                                       </dd>
+                               </dl>
+                               {hascontent}
+                                       <dl{if $errorField == 'templateGroupID'} class="formError"{/if}>
+                                               <dt><label for="templateGroupID">{lang}wcf.acp.style.templateGroupID{/lang}</label></dt>
+                                               <dd>
+                                                       <select name="templateGroupID" id="templateGroupID">
+                                                               <option value="0"></option>
+                                                               {content}
+                                                                       {foreach from=$availableTemplateGroups item=templateGroup}
+                                                                               <option value="{@$templateGroup->templateGroupID}">{$templateGroup->templateGroupName}</option>
+                                                                       {/foreach}
+                                                               {/content}
+                                                       </select>
+                                                       {if $errorField == 'templateGroupID'}
+                                                               <small class="innerError">
+                                                                       {if $errorType == 'empty'}
+                                                                               {lang}wcf.global.form.error.empty{/lang}
+                                                                       {else}
+                                                                               {lang}wcf.acp.style.error.templateGroupID.{$errorType}{/lang}
+                                                                       {/if}
+                                                               </small>
+                                                       {/if}
+                                               </dd>
+                                       </dl>
+                               {/hascontent}
+                               <dl{if $errorField == 'iconPath'} class="formError"{/if}>
+                                       <dt><label for="iconPath">{lang}wcf.acp.style.iconPath{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="iconPath" id="iconPath" value="{$iconPath}" class="long" />
+                                               {if $errorField == 'iconPath'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.iconPath.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                               <small>{lang}wcf.acp.style.iconPath.description{/lang}</small>
+                                       </dd>
+                               </dl>
+                               <dl{if $errorField == 'imagePath'} class="formError"{/if}>
+                                       <dt><label for="imagePath">{lang}wcf.acp.style.imagePath{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" name="imagePath" id="imagePath" value="{$imagePath}" class="long" />
+                                               {if $errorField == 'imagePath'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.style.error.imagePath.{$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                               <small>{lang}wcf.acp.style.imagePath.description{/lang}</small>
+                                       </dd>
+                               </dl>
+                       </fieldset>
+               </div>
+               
+               {* globals *}
+               <div id="globals" class="container containerPadding tabMenuContainer tabMenuContent">
+                       {* layout *}
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.globals.layout{/lang}</legend>
+                               
+                               <dl>
+                                       <dd><label>
+                                               <input type="checkbox" id="useFluidLayout" name="useFluidLayout" value="1"{if $useFluidLayout} checked="checked"{/if} />
+                                               <span>{lang}wcf.acp.style.globals.useFluidLayout{/lang}</span>
+                                       </label></dd>
+                               </dl>
+                               <div id="fluidLayoutVariables">
+                                       <dl>
+                                               <dt><label for="wcfLayoutFluidGap">{lang}wcf.acp.style.globals.fluidLayoutGap{/lang}</label></dt>
+                                               <dd>
+                                                       <input type="number" id="wcfLayoutFluidGap" name="wcfLayoutFluidGap" value="{@$variables[wcfLayoutFluidGap]}" class="tiny" />
+                                                       <select name="wcfLayoutFluidGap_unit">
+                                                               {foreach from=$availableUnits item=unit}
+                                                                       <option value="{@$unit}"{if $variables[wcfLayoutFluidGap_unit] == $unit} selected="selected"{/if}>{@$unit}</option>
+                                                               {/foreach}
+                                                       </select>
+                                               </dd>
+                                       </dl>
+                               </div>
+                               <div id="fixedLayoutVariables">
+                                       <dl>
+                                               <dt><label for="wcfLayoutFixedWidth">{lang}wcf.acp.style.globals.fixedLayoutWidth{/lang}</label></dt>
+                                               <dd>
+                                                       <input type="number" id="wcfLayoutFixedWidth" name="wcfLayoutFixedWidth" value="{@$variables[wcfLayoutFixedWidth]}" class="tiny" />
+                                                       <select name="wcfLayoutFixedWidth_unit">
+                                                               {foreach from=$availableUnits item=unit}
+                                                                       <option value="{@$unit}"{if $variables[wcfLayoutFixedWidth_unit] == $unit} selected="selected"{/if}>{@$unit}</option>
+                                                               {/foreach}
+                                                       </select>
+                                               </dd>
+                                       </dl>
+                               </div>
+                       </fieldset>
+                       
+                       {* font *}
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.globals.font{/lang}</legend>
+                               
+                               <dl>
+                                       <dt><label for="wcfBaseFontSize">{lang}wcf.acp.style.globals.fontSize{/lang}</label></dt>
+                                       <dd>
+                                               <input type="number" id="wcfBaseFontSize" name="wcfBaseFontSize" value="{@$variables[wcfBaseFontSize]}" class="tiny" />
+                                               <select name="wcfBaseFontSize_unit">
+                                                       {foreach from=$availableUnits item=unit}
+                                                               <option value="{@$unit}"{if $variables[wcfBaseFontSize_unit] == $unit} selected="selected"{/if}>{@$unit}</option>
+                                                       {/foreach}
+                                               </select>
+                                       </dd>
+                               </dl>
+                               <dl>
+                                       <dt><label for="wcfBaseFontFamily">{lang}wcf.acp.style.globals.fontFamily{/lang}</label></dt>
+                                       <dd>
+                                               <select name="wcfBaseFontFamily" id="wcfBaseFontFamily">
+                                                       {foreach from=$availableFontFamilies key=fontFamily item=primaryFont}
+                                                               <option value="{@$fontFamily}"{if $variables[wcfBaseFontFamily] == $fontFamily} selected="selected"{/if}>{@$primaryFont}</option>
+                                                       {/foreach}
+                                               </select>
+                                       </dd>
+                               </dl>
+                       </fieldset>
+               </div>
+               
+               {* colors *}
+               <div id="colors" class="container containerPadding tabMenuContainer tabMenuContent">
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.colors.content{/lang}</legend>
+                               
+                               {* content *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfContentBackgroundColor' languageVariable='backgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfColor' languageVariable='color'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfDimmedColor' languageVariable='dimmedColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfLinkColor' languageVariable='linkColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfLinkHoverColor' languageVariable='linkHoverColor'}</li>
+                               </ul>
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.colors.container{/lang}</legend>
+                               
+                               {* general *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfContainerBackgroundColor' languageVariable='backgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfContainerAccentBackgroundColor' languageVariable='accentBackgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfContainerBorderColor' languageVariable='borderColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfContainerHoverBackgroundColor' languageVariable='hoverBackgroundColor'}</li>
+                               </ul>
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.colors.userPanel{/lang}</legend>
+                               
+                               {* user panel *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfUserPanelBackgroundColor' languageVariable='backgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfUserPanelColor' languageVariable='color'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfUserPanelHoverBackgroundColor' languageVariable='hoverBackgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfUserPanelHoverColor' languageVariable='hoverColor'}</li>
+                               </ul>
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.colors.tabular{/lang}</legend>
+                               
+                               {* general *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfTabularBoxBackgroundColor' languageVariable='backgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfTabularBoxColor' languageVariable='color'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfTabularBoxHoverColor' languageVariable='hoverColor'}</li>
+                               </ul>
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.colors.buttons{/lang}</legend>
+                               
+                               {* default button *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonBackgroundColor' languageVariable='backgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonBorderColor' languageVariable='borderColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonColor' languageVariable='color'}</li>
+                               </ul>
+                               
+                               {* button:hover *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonHoverBackgroundColor' languageVariable='hoverBackgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonHoverBorderColor' languageVariable='hoverBorderColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonHoverColor' languageVariable='hoverColor'}</li>
+                               </ul>
+                               
+                               {* primary button *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonPrimaryBackgroundColor' languageVariable='primaryBackgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonPrimaryBorderColor' languageVariable='primaryBorderColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfButtonPrimaryColor' languageVariable='primaryColor'}</li>
+                               </ul>
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.style.colors.formInput{/lang}</legend>
+                               
+                               {* default button *}
+                               <ul class="colorList">
+                                       <li>{include file='styleVariableColor' variableName='wcfInputBackgroundColor' languageVariable='backgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfInputBorderColor' languageVariable='borderColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfInputColor' languageVariable='color'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfInputHoverBackgroundColor' languageVariable='hoverBackgroundColor'}</li>
+                                       <li>{include file='styleVariableColor' variableName='wcfInputHoverBorderColor' languageVariable='hoverBorderColor'}</li>
+                               </ul>
+                       </fieldset>
+               </div>
+       </div>
+       
+       <div class="formSubmit">
+               <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
+               {if $styleID|isset}<input type="hidden" name="id" value="{@$styleID}" />{/if}
+       </div>
+</form>
+
+{include file='footer'}
\ No newline at end of file
diff --git a/acptemplates/styleVariableColor.tpl b/acptemplates/styleVariableColor.tpl
new file mode 100644 (file)
index 0000000..beffc07
--- /dev/null
@@ -0,0 +1,5 @@
+<figure>
+       <figcaption>{lang}wcf.acp.style.colors.{$languageVariable}{/lang}</figcaption>
+       <div class="colorPreview"><div class="jsColorPicker jsToolTip" title="{$variableName}" style="background-color: {$variables[$variableName]}" data-color="{$variables[$variableName]}" data-store="{$variableName}_value"></div></div>
+       <input type="hidden" id="{$variableName}_value" name="{$variableName}" value="{$variables[$variableName]}" /> 
+</figure>
\ No newline at end of file
diff --git a/acptemplates/styleVariableUnit.tpl b/acptemplates/styleVariableUnit.tpl
new file mode 100644 (file)
index 0000000..e9c76b5
--- /dev/null
@@ -0,0 +1,12 @@
+<dl>
+       <dt><label for="{$variableName}">{lang}wcf.acp.style.variable.{$variableName}{/lang}</label></dt>
+       <dd>
+               <input type="number" name="{$variableName}" id="{$variableName}" value="{$variableValue}" />
+               <select name="{$variableName}_unit" id="{$variableName}_unit">
+                       <option value="%"{if $variableUnit == '%'} selected="selected"{/if}>%</option>
+                       <option value="em"{if $variableUnit == 'em'} selected="selected"{/if}>em</option>
+                       <option value="pt"{if $variableUnit == 'pt'} selected="selected"{/if}>pt</option>
+                       <option value="px"{if $variableUnit == 'px'} selected="selected"{/if}>px</option>
+               </select>
+       </dd>
+</dl>
\ No newline at end of file
diff --git a/files/lib/acp/form/StyleAddForm.class.php b/files/lib/acp/form/StyleAddForm.class.php
new file mode 100644 (file)
index 0000000..e714bfe
--- /dev/null
@@ -0,0 +1,443 @@
+<?php
+namespace wcf\acp\form;
+use wcf\data\package\Package;
+use wcf\data\style\StyleAction;
+use wcf\data\template\group\TemplateGroupList;
+use wcf\system\event\EventHandler;
+use wcf\system\exception\SystemException;
+use wcf\system\exception\UserInputException;
+use wcf\system\Regex;
+use wcf\system\WCF;
+use wcf\util\DateUtil;
+use wcf\util\FileUtil;
+use wcf\util\StringUtil;
+
+/**
+ * Shows the style add form.
+ * 
+ * @author     Alexander Ebert
+ * @copyright  2001-2012 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    com.woltlab.wcf.acp.style
+ * @subpackage acp.form
+ * @category   Community Framework
+ */
+class StyleAddForm extends ACPForm {
+       /**
+        * @see wcf\acp\form\ACPForm::$activeMenuItem
+        */
+       public $activeMenuItem = 'wcf.acp.menu.link.style.add';
+       
+       /**
+        * author's name
+        * @var string
+        */
+       public $authorName = '';
+       
+       /**
+        * author's URL
+        * @var string
+        */
+       public $authorURL = '';
+       
+       /**
+        * list of available font families
+        * @var array<string>
+        */
+       public $availableFontFamilies = array(
+               'Arial, Helvetica, sans-serif' => 'Arial',
+               'Chicago, Impact, Compacta, sans-serif' => 'Chicago',
+               '"Comic Sans MS", sans-serif' => 'Comic Sans',
+               '"Courier New", Courier, monospace' => 'Courier New',
+               'Geneva, Arial, Helvetica, sans-serif' => 'Geneva',
+               'Georgia, "Times New Roman", Times, serif' => 'Georgia',
+               'Helvetica, Verdana, sans-serif' => 'Helvetica',
+               'Impact, Compacta, Chicago, sans-serif' => 'Impact',
+               '"Lucida Sans", "Lucida Grande", Monaco, Geneva, sans-serif' => 'Lucida',
+               'Tahoma, Arial, Helvetica, sans-serif' => 'Tahoma',
+               '"Times New Roman", Times, Georgia, serif' => 'Times New Roman',
+               '"Trebuchet MS", Arial, sans-serif' => 'Trebuchet MS',
+               'Verdana, Helvetica, sans-serif' => 'Verdana'
+       );
+       
+       /**
+        * list of available template groups
+        * @var array<wcf\data\template\group\TemplateGroup>
+        */
+       public $availableTemplateGroups = array();
+       
+       /**
+        * list of available units
+        * @var array<string>
+        */
+       public $availableUnits = array('px', 'em', '%', 'pt');
+       
+       /**
+        * list of color variables
+        * @var array<string>
+        */
+       public $colors = array();
+       
+       /**
+        * copyright message
+        * @var string
+        */
+       public $copyright = '';
+       
+       /**
+        * font family
+        * @var string
+        */
+       public $fontFamily = '';
+       
+       /**
+        * list of global variables
+        * 
+        * @var unknown_type
+        */
+       public $globals = array();
+       
+       /**
+        * icon path
+        * @var string
+        */
+       public $iconPath = 'icon/';
+       
+       /**
+        * path to preview image 
+        * @var string
+        */
+       public $image = '';
+       
+       /**
+        * image path
+        * @var string
+        */
+       public $imagePath = 'images/';
+       
+       /**
+        * license name
+        * @var string
+        */
+       public $license = '';
+       
+       /**
+        * last change date
+        * @var string
+        */
+       public $styleDate = '0000-00-00';
+       
+       /**
+        * description
+        * @var string
+        */
+       public $styleDescription = '';
+       
+       /**
+        * style name
+        * @var string
+        */
+       public $styleName = '';
+       
+       /**
+        * version number
+        * @var string
+        */
+       public $styleVersion = '';
+       
+       /**
+        * template group id
+        * @var integer
+        */
+       public $templateGroupID = 0;
+       
+       /**
+        * fluid or fixed layout
+        * @var boolean
+        */
+       public $useFluidLayout = true;
+       
+       /**
+        * list of variables and their value
+        * @var array<string>
+        */
+       public $variables = array();
+       
+       /**
+        * @see wcf\page\IPage::readParameters()
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
+               $this->setVariables();
+               $this->readStyleVariables();
+               
+               $templateGroupList = new TemplateGroupList();
+               $templateGroupList->sqlLimit = 0;
+               $templateGroupList->sqlOrderBy = "template_group.templateGroupName ASC";
+               $templateGroupList->readObjects();
+               $this->availableTemplateGroups = $templateGroupList->getObjects();
+       }
+       
+       /**
+        * @see wcf\form\IForm::readFormParameters()
+        */
+       public function readFormParameters() {
+               parent::readFormParameters();
+               
+               // ignore everything except well-formed rgba()
+               $regEx = new Regex('rgba\(\d{1,3}, \d{1,3}, \d{1,3}, (1|1\.00?|0|0?\.[0-9]{1,2})\)');
+               foreach ($this->colors as $variableName) {
+                       if (isset($_POST[$variableName]) && $regEx->match($_POST[$variableName])) {
+                               $this->variables[$variableName] = $_POST[$variableName];
+                       }
+               }
+               
+               // read variables with units, e.g. 13px
+               foreach ($this->globals as $variableName) {
+                       if (isset($_POST[$variableName]) && is_numeric($_POST[$variableName])) {
+                               if(isset($_POST[$variableName.'_unit']) && in_array($_POST[$variableName.'_unit'], $this->availableUnits)) { 
+                                       $this->variables[$variableName] = $_POST[$variableName].$_POST[$variableName.'_unit'];
+                               }
+                       }
+               }
+               
+               $this->useFluidLayout = (isset($_POST['useFluidLayout']));
+               
+               // style data
+               if (isset($_POST['authorName'])) $this->authorName = StringUtil::trim($_POST['authorName']);
+               if (isset($_POST['authorURL'])) $this->authorURL = StringUtil::trim($_POST['authorURL']);
+               if (isset($_POST['copyright'])) $this->copyright = StringUtil::trim($_POST['copyright']);
+               if (isset($_POST['iconPath'])) $this->iconPath = StringUtil::trim($_POST['iconPath']);
+               if (isset($_POST['image'])) $this->image = StringUtil::trim($_POST['image']);
+               if (isset($_POST['imagePath'])) $this->imagePath = StringUtil::trim($_POST['imagePath']);
+               if (isset($_POST['license'])) $this->license = StringUtil::trim($_POST['license']);
+               if (isset($_POST['styleDate'])) $this->styleDate = StringUtil::trim($_POST['styleDate']);
+               if (isset($_POST['styleDescription'])) $this->styleDescription = StringUtil::trim($_POST['styleDescription']);
+               if (isset($_POST['styleName'])) $this->styleName = StringUtil::trim($_POST['styleName']);
+               if (isset($_POST['styleVersion'])) $this->styleVersion = StringUtil::trim($_POST['styleVersion']);
+               if (isset($_POST['templateGroupID'])) $this->templateGroupID = intval($_POST['templateGroupID']);
+       }
+       
+       /**
+        * @see wcf\form\IForm::validate()
+        */
+       public function validate() {
+               parent::validate();
+               
+               if (empty($this->authorName)) {
+                       throw new UserInputException('authorName');
+               }
+               
+               if (empty($this->license)) {
+                       throw new UserInputException('license');
+               }
+               
+               // validate date
+               if (empty($this->styleDate)) {
+                       throw new UserInputException('styleDate');
+               }
+               else {
+                       try {
+                               DateUtil::validateDate($this->styleDate);
+                       }
+                       catch (SystemException $e) {
+                               throw new UserInputException('styleDate', 'notValid');
+                       }
+               }
+               
+               if (empty($this->styleName)) {
+                       throw new UserInputException('styleName');
+               }
+               
+               // validate version
+               if (empty($this->styleVersion)) {
+                       throw new UserInputException('styleVersion');
+               }
+               else if (!Package::isValidVersion($this->styleVersion)) {
+                       throw new UserInputException('styleVersion', 'notValid');
+               }
+               
+               // validate template group id
+               if ($this->templateGroupID) {
+                       if (!isset($this->availableTemplateGroups[$this->templateGroupID])) {
+                               throw new UserInputException('templateGroupID');
+                       }
+               }
+               
+               // ensure icon path is below WCF_DIR/icon/
+               if ($this->iconPath) {
+                       $relativePath = FileUtil::unifyDirSeperator(FileUtil::getRelativePath(WCF_DIR.'icon/', WCF_DIR.$this->iconPath));
+                       if (strpos($relativePath, '../') !== false) {
+                               throw new UserInputException('iconPath', 'notValid');
+                       }
+               }
+               
+               // ensure image path is below WCF_DIR/images/
+               if ($this->imagePath) {
+                       $relativePath = FileUtil::unifyDirSeperator(FileUtil::getRelativePath(WCF_DIR.'images/', WCF_DIR.$this->imagePath));
+                       if (strpos($relativePath, '../') !== false) {
+                               throw new UserInputException('imagePath', 'notValid');
+                       }
+               }
+       }
+       
+       /**
+        * @see wcf\page\IPage::readData()
+        */
+       public function readData() {
+               parent::readData();
+               
+               // parse global (unit) variables
+               foreach ($this->globals as $variableName) {
+                       $unit = '';
+                       $value = $this->variables[$variableName];
+                       $i = strlen($value) - 1;
+                       while ($i >= 0) {
+                               $unit = $value[$i] . $unit;
+                               if (in_array($unit, $this->availableUnits)) {
+                                       $this->variables[$variableName] = str_replace($unit, '', $value);
+                                       $this->variables[$variableName.'_unit'] = $unit;
+                                       break;
+                               }
+                               
+                               $i--;
+                       }
+               }
+       }
+       
+       /**
+        * Sets available variables
+        */
+       protected function setVariables() {
+               // set color variables
+               $this->colors = array(
+                       'wcfButtonBackgroundColor',
+                       'wcfButtonBorderColor',
+                       'wcfButtonColor',
+                       'wcfButtonHoverBackgroundColor',
+                       'wcfButtonHoverBorderColor',
+                       'wcfButtonHoverColor',
+                       'wcfButtonPrimaryBackgroundColor',
+                       'wcfButtonPrimaryBorderColor',
+                       'wcfButtonPrimaryColor',
+                       'wcfColor',
+                       'wcfContainerAccentBackgroundColor',
+                       'wcfContainerBackgroundColor',
+                       'wcfContainerBorderColor',
+                       'wcfContainerHoverBackgroundColor',
+                       'wcfContentBackgroundColor',
+                       'wcfDimmedColor',
+                       'wcfInputBackgroundColor',
+                       'wcfInputBorderColor',
+                       'wcfInputColor',
+                       'wcfInputHoverBackgroundColor',
+                       'wcfInputHoverBorderColor',
+                       'wcfLinkColor',
+                       'wcfLinkHoverColor',
+                       'wcfTabularBoxBackgroundColor',
+                       'wcfTabularBoxColor',
+                       'wcfTabularBoxHoverColor',
+                       'wcfUserPanelBackgroundColor',
+                       'wcfUserPanelColor',
+                       'wcfUserPanelHoverBackgroundColor',
+                       'wcfUserPanelHoverColor',
+               );
+               
+               // set global variables
+               $this->globals = array(
+                       'wcfBaseFontSize',
+                       'wcfContainerBorderRadius',
+                       'wcfLayoutFixedWidth',
+                       'wcfLayoutFluidGap'
+               );
+               
+               EventHandler::getInstance()->fireAction($this, 'setVariables');
+       }
+       
+       /**
+        * Reads style variable values.
+        */
+       protected function readStyleVariables() {
+               $sql = "SELECT  variableName, defaultValue
+                       FROM    wcf".WCF_N."_style_variable";
+               $statement = WCF::getDB()->prepareStatement($sql);
+               $statement->execute();
+               while ($row = $statement->fetchArray()) {
+                       $this->variables[$row['variableName']] = $row['defaultValue'];
+               }
+       }
+       
+       /**
+        * @see wcf\form\IForm::save()
+        */
+       public function save() {
+               parent::save();
+               
+               $this->objectAction = new StyleAction(array(), 'create', array(
+                       'data' => array(
+                               'styleName' => $this->styleName,
+                               'templateGroupID' => $this->templateGroupID,
+                               'styleDescription' => ($this->styleDescription ? $this->styleDescription : null),
+                               'styleVersion' => $this->styleVersion,
+                               'styleDate' => $this->styleDate,
+                               'image' => $this->image,
+                               'imagePath' => $this->imagePath,
+                               'copyright' => $this->copyright,
+                               'license' => $this->license,
+                               'authorName' => $this->authorName,
+                               'authorURL' => $this->authorURL,
+                               'iconPath' => $this->iconPath
+                       ),
+                       'variables' => $this->variables
+               ));
+               $this->objectAction->executeAction();
+               
+               // call saved event
+               $this->saved();
+               
+               // reset variables
+               $this->authorName = $this->authorURL = $this->copyright = $this->fontFamily = '';
+               $this->image = $this->license = $this->styleDate = $this->styleDescription = '';
+               $this->styleName = $this->styleVersion = 0;
+               
+               $this->iconPath = 'icon/';
+               $this->imagePath = 'images/';
+               $this->templateGroupID = 0;
+               $this->useFluidLayout = true;
+               
+               // reload variables
+               $this->readStyleVariables();
+               
+               WCF::getTPL()->assign('success', true);
+       }
+       
+       /**
+        * @see wcf\page\IPage::assignVariables()
+        */
+       public function assignVariables() {
+               parent::assignVariables();
+               
+               WCF::getTPL()->assign(array(
+                       'action' => 'add',
+                       'authorName' => $this->authorName,
+                       'authorURL' => $this->authorURL,
+                       'availableFontFamilies' => $this->availableFontFamilies,
+                       'availableTemplateGroups' => $this->availableTemplateGroups,
+                       'availableUnits' => $this->availableUnits,
+                       'copyright' => $this->copyright,
+                       'fontFamily' => $this->fontFamily,
+                       'iconPath' => $this->iconPath,
+                       'image' => $this->image,
+                       'imagePath' => $this->imagePath,
+                       'license' => $this->license,
+                       'styleDate' => $this->styleDate,
+                       'styleDescription' => $this->styleDescription,
+                       'styleName' => $this->styleName,
+                       'styleVersion' => $this->styleVersion,
+                       'templateGroupID' => $this->templateGroupID,
+                       'useFluidLayout' => $this->useFluidLayout,
+                       'variables' => $this->variables
+               ));
+       }
+}
diff --git a/files/style/styleEditor.less b/files/style/styleEditor.less
new file mode 100644 (file)
index 0000000..f8f325c
--- /dev/null
@@ -0,0 +1,37 @@
+.colorPreview {
+       border: 1px solid @wcfContainerBorderColor;
+       border-radius: @wcfContainerBorderRadius;
+       display: inline-block;
+       
+       &:hover {
+               .boxShadow(0, 0, @wcfContainerBorderColor, 15px, 0);
+       }
+       
+       > div {
+               border: 1px solid @wcfContainerBorderColor;
+               border-radius: @wcfContainerBorderRadius;
+               cursor: pointer;
+               display: block;
+               height: 60px;
+               width: 200px;
+       }
+}
+       
+.colorList {
+       > li {
+               float: left;
+               padding: @wcfGapSmall;
+               
+               > figure > figcaption {
+                       font-size: 85%;
+                       margin-bottom: @wcfGapSmall;
+                       text-align: center;
+               }
+       }
+       
+       &:after {
+               clear: both;
+               content: "";
+               display: block;
+       }
+}
\ No newline at end of file
diff --git a/language/de.xml b/language/de.xml
new file mode 100644 (file)
index 0000000..a5faa13
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<language xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/language.xsd" languagecode="de">
+       <category name="wcf.acp.menu">
+               <item name="wcf.acp.menu.link.style"><![CDATA[Stile]]></item>
+               <item name="wcf.acp.menu.link.style.add"><![CDATA[Stil hinzufügen]]></item>
+               <item name="wcf.acp.menu.link.style.list"><![CDATA[Stile auflisten]]></item>
+       </category>
+       
+       <category name="wcf.acp.style">
+               <item name="wcf.acp.style.add"><![CDATA[Stil hinzufügen]]></item>
+               <item name="wcf.acp.style.authorName"><![CDATA[Autor]]></item>
+               <item name="wcf.acp.style.authorURL"><![CDATA[Website]]></item>
+               <item name="wcf.acp.style.colors"><![CDATA[Farbpalette]]></item>
+               <item name="wcf.acp.style.colors.accentBackgroundColor"><![CDATA[Hintergrundfarbe (Akzent)]]></item>
+               <item name="wcf.acp.style.colors.backgroundColor"><![CDATA[Hintergrundfarbe]]></item>
+               <item name="wcf.acp.style.colors.borderColor"><![CDATA[Rahmenfarbe]]></item>
+               <item name="wcf.acp.style.colors.buttons"><![CDATA[Buttons]]></item>
+               <item name="wcf.acp.style.colors.container"><![CDATA[Container]]></item>
+               <item name="wcf.acp.style.colors.content"><![CDATA[Inhaltsbereich]]></item>
+               <item name="wcf.acp.style.colors.color"><![CDATA[Schriftfarbe]]></item>
+               <item name="wcf.acp.style.colors.dimmedColor"><![CDATA[Schriftfarbe (abgedunkelt)]]></item>
+               <item name="wcf.acp.style.colors.formInput"><![CDATA[Eingabeelemente in Formularen]]></item>
+               <item name="wcf.acp.style.colors.hoverBackgroundColor"><![CDATA[Hintergrundfarbe (Hover)]]></item>
+               <item name="wcf.acp.style.colors.hoverBorderColor"><![CDATA[Rahmenfarbe (Hover)]]></item>
+               <item name="wcf.acp.style.colors.hoverColor"><![CDATA[Schriftfarbe (Hover)]]></item>
+               <item name="wcf.acp.style.colors.linkColor"><![CDATA[Linkfarbe]]></item>
+               <item name="wcf.acp.style.colors.linkHoverColor"><![CDATA[Linkfarbe (Hover)]]></item>
+               <item name="wcf.acp.style.colors.primaryBackgroundColor"><![CDATA[Hintergrundfarbe (primär)]]></item>
+               <item name="wcf.acp.style.colors.primaryBorderColor"><![CDATA[Rahmenfarbe (primär)]]></item>
+               <item name="wcf.acp.style.colors.primaryColor"><![CDATA[Schriftfarbe (primär)]]></item>
+               <item name="wcf.acp.style.colors.tabular"><![CDATA[Tabellarische Auflistungen]]></item>
+               <item name="wcf.acp.style.colors.userPanel"><![CDATA[Benutzerleiste]]></item>
+               <item name="wcf.acp.style.copyright"><![CDATA[Copyright]]></item>
+               <item name="wcf.acp.style.general"><![CDATA[Daten]]></item>
+               <item name="wcf.acp.style.general.data"><![CDATA[Allgemein]]></item>
+               <item name="wcf.acp.style.general.files"><![CDATA[Dateien]]></item>
+               <item name="wcf.acp.style.globals"><![CDATA[Globale Einstellungen]]></item>
+               <item name="wcf.acp.style.globals.fixedLayoutWidth"><![CDATA[Breite]]></item>
+               <item name="wcf.acp.style.globals.fluidLayoutGap"><![CDATA[Abstand zum Seitenrand]]></item>
+               <item name="wcf.acp.style.globals.font"><![CDATA[Schriftbild]]></item>
+               <item name="wcf.acp.style.globals.fontFamily"><![CDATA[Schriftart]]></item>
+               <item name="wcf.acp.style.globals.fontSize"><![CDATA[Schriftgröße]]></item>
+               <item name="wcf.acp.style.globals.layout"><![CDATA[Layout]]></item>
+               <item name="wcf.acp.style.globals.useFluidLayout"><![CDATA[Flexible Breite verwenden]]></item>
+               <item name="wcf.acp.style.iconPath"><![CDATA[Icon-Pfad]]></item>
+               <item name="wcf.acp.style.iconPath.description"><![CDATA[Wenn Ihr Stil eigene Icons benötigt, sollten diese in einem Unterordner des Ordners &laquo;icons&raquo; ablegen. Geben Sie hier den Pfad zu diesem Ordner an.]]></item>
+               <item name="wcf.acp.style.image"><![CDATA[Vorschaubild]]></item>
+               <item name="wcf.acp.style.imagePath"><![CDATA[Bilder-Pfad]]></item>
+               <item name="wcf.acp.style.imagePath.description"><![CDATA[Wenn Ihr Stil eigene Grafiken benötigt, sollten diese in einem Unterordner des Ordners &laquo;images&raquo; ablegen. Geben Sie hier den Pfad zu diesem Ordner an.]]></item>
+               <item name="wcf.acp.style.license"><![CDATA[Lizenz]]></item>
+               <item name="wcf.acp.style.styleDate"><![CDATA[Datum]]></item>
+               <item name="wcf.acp.style.styleDescription"><![CDATA[Beschreibung]]></item>
+               <item name="wcf.acp.style.styleName"><![CDATA[Name]]></item>
+               <item name="wcf.acp.style.styleVersion"><![CDATA[Version]]></item>
+               <item name="wcf.acp.style.templateGroupID"><![CDATA[Template-Gruppe]]></item>
+       </category>
+</language>
diff --git a/package.xml b/package.xml
new file mode 100644 (file)
index 0000000..1a8a2a9
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package name="com.woltlab.wcf.acp.style" xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/package.xsd">
+       <packageinformation>
+               <packagename>Style Administration</packagename>
+               <version>1.0.0 Alpha 1</version>
+               <date>2012-10-08</date>
+       </packageinformation>
+       
+       <authorinformation>
+               <author>WoltLab GmbH</author>
+               <authorurl>http://www.woltlab.com</authorurl>
+       </authorinformation>
+       
+       <instructions type="install">
+               <instruction type="acpTemplate">acptemplates.tar</instruction>
+               <instruction type="file">files.tar</instruction>
+               <instruction type="acpMenu">acpMenu.xml</instruction>
+               <instruction type="language">language/*.xml</instruction>
+               <instruction type="userGroupOption">userGroupOption.xml</instruction>
+       </instructions>
+</package>
diff --git a/userGroupOption.xml b/userGroupOption.xml
new file mode 100644 (file)
index 0000000..55112af
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/userGroupOption.xsd">
+       <import>
+               <categories>
+                       <category name="admin.style">
+                               <parent>admin.display</parent>
+                       </category>
+               </categories>
+               
+               <options>
+                       <!-- admin.style -->
+                       <option name="admin.style.canAddStyle">
+                               <categoryname>admin.style</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>0</defaultvalue>
+                               <admindefaultvalue>1</admindefaultvalue>
+                       </option>
+                       <option name="admin.style.canEditStyle">
+                               <categoryname>admin.style</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>0</defaultvalue>
+                               <admindefaultvalue>1</admindefaultvalue>
+                       </option>
+                       <option name="admin.style.canDeleteStyle">
+                               <categoryname>admin.style</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>0</defaultvalue>
+                               <admindefaultvalue>1</admindefaultvalue>
+                       </option>
+                       <option name="admin.style.canUseDisabledStyle">
+                               <categoryname>admin.style</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>0</defaultvalue>
+                               <admindefaultvalue>1</admindefaultvalue>
+                       </option>
+                       <!-- /admin.style -->
+               </options>
+       </import>
+</data>