<instruction type="language" run="standalone">language/*.xml</instruction>
<instruction type="option">option.xml</instruction>
+ <instruction type="userMenu">userMenu.xml</instruction>
</instructions>
</package>
<a class="framed" href="{link controller='User' object=$__wcf->user}{/link}">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(24)} <span>{lang}wcf.user.userNote{/lang}</span></a>
<div class="interactiveDropdown interactiveDropdownStatic interactiveDropdownUserMenu">
<div class="interactiveDropdownHeader">
- <span class="interactiveDropdownTitle">{$__wcf->user->username}</span>
+ <span class="interactiveDropdownTitle">{lang}wcf.user.controlPanel{/lang}</span>
+
{hascontent}
<ul class="interactiveDropdownLinks">
{content}
<div class="interactiveDropdownItemsContainer">
<ul class="interactiveDropdownItems interactiveDropdownItemsUserMenu">
<li>
- <a href="{link controller='User' object=$__wcf->user}{/link}" class="box64">
+ <div class="box64">
<div class="framed">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(64)}</div>
<div class="containerHeadline">
- <h3>{$__wcf->user->username}</h3>
+ <h3><a href="{link controller='User' object=$__wcf->user}{/link}">{$__wcf->user->username}</a></h3>
{if MODULE_USER_RANK && $__wcf->getUserProfileHandler()->getUserTitle()}<p><span class="badge userTitleBadge{if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->cssClassName} {@$__wcf->getUserProfileHandler()->getRank()->cssClassName}{/if}">{$__wcf->getUserProfileHandler()->getUserTitle()}</span></p>{/if}
- <small style="display: none;">{lang}wcf.user.myProfile{/lang}</small>
+
+ <ul class="interactiveDropdownUserMenuLinkList">
+ <li><a href="{link controller='User' object=$__wcf->user}{/link}">{lang}wcf.user.myProfile{/lang}</a></li>
+ {if $__wcf->getUserProfileHandler()->canEditOwnProfile()}<li><a href="{link controller='User' object=$__wcf->user}editOnInit=true#about{/link}">{lang}wcf.user.editProfile{/lang}</a></li>{/if}
+ {if $__wcf->session->getPermission('admin.general.canUseAcp')}<li><a href="{link isACP=true}{/link}">{lang}wcf.global.acp.short{/lang}</a></li>{/if}
+ </ul>
</div>
</a>
+ </div>
</li>
- <li class="dropdownDivider"></li>
- <li><a href="{link controller='User' object=$__wcf->user}{/link}">{lang}wcf.user.myProfile{/lang}</a></li>
- {if $__wcf->getUserProfileHandler()->canEditOwnProfile()}<li><a href="{link controller='User' object=$__wcf->user}editOnInit=true#about{/link}">{lang}wcf.user.editProfile{/lang}</a></li>{/if}
- <li><a href="{link controller='Settings'}{/link}">{lang}wcf.user.menu.settings{/lang}</a></li>
-
- {event name='userMenuItems'}
- {if $__wcf->session->getPermission('admin.general.canUseAcp')}
+ {foreach from=$__wcf->getUserMenu()->getMenuItems('') item=menuCategory}
<li class="dropdownDivider"></li>
- <li><a href="{link isACP=true}{/link}">{lang}wcf.global.acp.short{/lang}</a></li>
- {/if}
+ <li class="interactiveDropdownUserMenuItem">
+ <div class="box32">
+ <div><span class="icon icon32 {@$menuCategory->getIconClassName()}"></span></div>
+
+ <div class="containerHeadline">
+ <h3>{lang}{$menuCategory->menuItem}{/lang}</h3>
+
+ <ul class="interactiveDropdownUserMenuLinkList">
+ {foreach from=$__wcf->getUserMenu()->getMenuItems($menuCategory->menuItem) item=menuItem}
+ <li><a href="{$menuItem->getProcessor()->getLink()}">{@$menuItem}</a></li>
+ {/foreach}
+ </ul>
+ </div>
+ </div>
+ {/foreach}
</ul>
</div>
<a class="interactiveDropdownShowAll" href="{link controller='Logout'}t={@SECURITY_TOKEN}{/link}" onclick="WCF.Dropdown.Interactive.Handler.close('userMenu'); WCF.System.Confirmation.show('{lang}wcf.user.logout.sure{/lang}', $.proxy(function (action) { if (action == 'confirm') window.location.href = $(this).attr('href'); }, this)); return false;">{lang}wcf.user.logout{/lang}</a>
--- /dev/null
+ALTER TABLE wcf1_user_menu_item ADD iconClassName VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE wcf1_user_group_option ADD usersOnly TINYINT(1) NOT NULL DEFAULT 0;
+ALTER TABLE wcf1_user_menu_item ADD iconClassName VARCHAR(255) NOT NULL DEFAULT '';
+
/* truncate table to ensure consistency */
DELETE FROM wcf1_user_notification;
<!-- profile -->
<usermenuitem name="wcf.user.menu.profile">
<showorder>1</showorder>
+ <iconclassname>fa-user</iconclassname>
</usermenuitem>
<usermenuitem name="wcf.user.menu.profile.accountManagement">
<!-- settings -->
<usermenuitem name="wcf.user.menu.settings">
<showorder>2</showorder>
+ <iconclassname>fa-cog</iconclassname>
</usermenuitem>
<usermenuitem name="wcf.user.menu.settings.notification">
<!-- community -->
<usermenuitem name="wcf.user.menu.community">
<showorder>3</showorder>
+ <iconclassname>fa-globe</iconclassname>
</usermenuitem>
<usermenuitem name="wcf.user.menu.community.notification">
<a class="dropdownToggle" data-toggle="woltlab"><span class="icon icon16 icon-info-sign"></span> <span>WoltLab®</span></a>
<ul class="dropdownMenu">
- <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"http://www.woltlab.com"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.website{/lang}</a></li>
- <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"http://www.woltlab.com/forum/"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.forums{/lang}</a></li>
- <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"http://www.woltlab.com/index.php/TicketAdd/"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.tickets{/lang}</a></li>
- <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"http://www.woltlab.com/pluginstore/"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.pluginStore{/lang}</a></li>
+ <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://www.woltlab.com"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.website{/lang}</a></li>
+ <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://community.woltlab.com"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.forums{/lang}</a></li>
+ <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://www.woltlab.com/ticketadd/"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.tickets{/lang}</a></li>
+ <li><a class="externalURL" href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://pluginstore.woltlab.com"|rawurlencode}"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.pluginStore{/lang}</a></li>
</ul>
</li>
public function __toString() {
return WCF::getLanguage()->getDynamicVariable($this->menuItem);
}
+
+ /**
+ * Returns FontAwesome icon class name.
+ *
+ * @return string
+ */
+ public function getIconClassName() {
+ return ($this->iconClassName ?: 'fa-bars');
+ }
}
* Installs, updates and deletes user menu items.
*
* @author Alexander Ebert
- * @copyright 2001-2014 WoltLab GmbH
+ * @copyright 2001-2015 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage system.package.plugin
$result['className'] = $data['elements']['classname'];
}
+ // FontAwesome icon name
+ if (!empty($data['elements']['iconclassname']) && preg_match('~^fa\-[a-z\-]+$~', $data['elements']['iconclassname'])) {
+ $result['iconClassName'] = $data['elements']['iconclassname'];
+ }
+
return $result;
}
}
&.interactiveDropdownItemsUserMenu {
> li {
- padding: 0 !important;
+ &.dropdownDivider {
+ padding: 0 !important;
+ }
&:not(.dropdownDivider) {
border-bottom-width: 0 !important;
+ padding: (@wcfGapSmall + @wcfGapTiny);
+ }
+
+ > .box32 > .containerHeadline {
+ > h3 {
+ font-size: 1.1rem;
+ }
}
- > a {
- display: block;
- padding: @wcfGapSmall (@wcfGapSmall + @wcfGapTiny);
- text-decoration: none;
+ > .box64 {
+ position: relative;
+
+ > .containerHeadline > .interactiveDropdownUserMenuLinkList {
+ bottom: 0;
+ position: absolute;
+ }
+ }
+
+ .interactiveDropdownUserMenuLinkList > li {
+ display: inline-block;
+ font-size: .85rem;
+
+ &:after {
+ content: " \2013 ";
+ }
+
+ &:last-child:after {
+ content: "";
+ }
}
}
}
<item name="wcf.user.confirmPassword"><![CDATA[Kennwort wiederholen]]></item>
<item name="wcf.user.confirmEmail.error.notEqual"><![CDATA[Die eingegebenen E-Mail-Adressen sind nicht identisch.]]></item>
<item name="wcf.user.confirmPassword.error.notEqual"><![CDATA[Die eingegebenen Kennwörter sind nicht identisch.]]></item>
+ <item name="wcf.user.controlPanel"><![CDATA[Kontrollzentrum]]></item>
<item name="wcf.user.email"><![CDATA[E-Mail-Adresse]]></item>
<item name="wcf.user.email.error.notUnique"><![CDATA[Diese E-Mail-Adresse ist bereits durch einen anderen Benutzer vergeben.]]></item>
<item name="wcf.user.email.error.notValid"><![CDATA[Sie haben eine ungültige E-Mail-Adresse eingegeben.]]></item>
<item name="wcf.user.confirmPassword"><![CDATA[Confirm Password]]></item>
<item name="wcf.user.confirmEmail.error.notEqual"><![CDATA[The entered email addresses do not match.]]></item>
<item name="wcf.user.confirmPassword.error.notEqual"><![CDATA[The entered passwords do not match.]]></item>
+ <item name="wcf.user.controlPanel"><![CDATA[Control Panel]]></item>
<item name="wcf.user.email"><![CDATA[Email]]></item>
<item name="wcf.user.email.error.notUnique"><![CDATA[Email is already in use.]]></item>
<item name="wcf.user.email.error.notValid"><![CDATA[Email is invalid.]]></item>
permissions TEXT,
options TEXT,
className VARCHAR(255) NOT NULL DEFAULT '',
+ iconClassName VARCHAR(255) NOT NULL DEFAULT '',
UNIQUE KEY menuItem (menuItem, packageID)
);