* renames `select-box-kit` into `select-kit`
* introduces `single-select` and `multi-select` as base components
* introduces {{search-advanced-category-chooser}} as a better component for selecting category in advanced search
* improves events handling in select-kit
* recreates color selection inputs using {{multi-select}} and a custom {{selected-color}} component
* replaces category-selector by a component using select-kit and based on multi-select
* improves positioning of wrapper
* removes the need for offscreen, and instead use `select-kit-header` as a base focus point for all select-kit based components
* introduces a formal plugin api for select-kit based components
* introduces a formal pattern for loading and updating select-kit based components:
```
computeValue()
computeContent()
mutateValue()
```
82 lines
2.4 KiB
Handlebars
82 lines
2.4 KiB
Handlebars
{{#d-section class="user-navigation" pageClass="user-messages"}}
|
|
{{#unless site.mobileView}}
|
|
{{#if showNewPM}}
|
|
{{d-button class="btn-primary new-private-message" action="composePrivateMessage" icon="envelope" label="user.new_private_message"}}
|
|
{{/if}}
|
|
{{/unless}}
|
|
|
|
{{#mobile-nav class='messages-nav' desktopClass='nav-stacked action-list' currentPath=currentPath}}
|
|
<li class="noGlyph">
|
|
{{#link-to 'userPrivateMessages.index' model}}
|
|
{{i18n 'user.messages.inbox'}}
|
|
{{/link-to}}
|
|
</li>
|
|
<li class="noGlyph">
|
|
{{#link-to 'userPrivateMessages.sent' model}}
|
|
{{i18n 'user.messages.sent'}}
|
|
{{/link-to}}
|
|
</li>
|
|
<li class="noGlyph">
|
|
{{#link-to 'userPrivateMessages.archive' model}}
|
|
{{i18n 'user.messages.archive'}}
|
|
{{/link-to}}
|
|
</li>
|
|
{{plugin-outlet name="user-messages-nav" connectorTagName='li' args=(hash model=model)}}
|
|
{{#each model.groups as |group|}}
|
|
{{#if group.has_messages}}
|
|
<li>
|
|
{{#link-to 'userPrivateMessages.group' group.name}}
|
|
{{d-icon "group" class="glyph"}}
|
|
{{capitalize-string group.name}}
|
|
{{/link-to}}
|
|
</li>
|
|
<li class='archive'>
|
|
{{#link-to 'userPrivateMessages.groupArchive' group.name}}
|
|
{{i18n 'user.messages.archive'}}
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
{{/each}}
|
|
{{/mobile-nav}}
|
|
{{/d-section}}
|
|
|
|
<section class='user-right messages'>
|
|
|
|
<div class="clearfix list-actions">
|
|
<button {{action "toggleBulkSelect"}} class="btn bulk-select" title="{{i18n "user.messages.bulk_select"}}">
|
|
{{d-icon "list"}}
|
|
</button>
|
|
|
|
{{#if site.mobileView}}
|
|
{{#if showNewPM}}
|
|
{{d-button class="btn-primary new-private-message" action="composePrivateMessage" icon="envelope" label="user.new_private_message"}}
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
{{#if canArchive}}
|
|
<button {{action "archive"}} class="btn btn-archive">
|
|
{{i18n "user.messages.move_to_archive"}}
|
|
</button>
|
|
{{/if}}
|
|
|
|
{{#if canMoveToInbox}}
|
|
<button {{action "toInbox"}} class="btn btn-to-inbox">
|
|
{{i18n "user.messages.move_to_inbox"}}
|
|
</button>
|
|
{{/if}}
|
|
|
|
|
|
{{#if bulkSelectEnabled}}
|
|
<button {{action "selectAll"}} class="btn btn-select-all">
|
|
{{i18n "user.messages.select_all"}}
|
|
</button>
|
|
{{/if}}
|
|
|
|
{{#if isGroup}}
|
|
{{group-notifications-button value=group.group_user.notification_level group=group user=model}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{outlet}}
|
|
</section>
|