mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 19:02:29 +03:00
102eec827c
no issue - ensure content filters in the loading screen have the same styles - add session injection to `posts-loading` controller so that the authors dropdown doesn't appear when changing filters when logged in as an author
88 lines
3.1 KiB
Handlebars
88 lines
3.1 KiB
Handlebars
<section class="gh-canvas">
|
|
<header class="gh-canvas-header">
|
|
<h2 class="gh-canvas-title">Your stories</h2>
|
|
<section class="view-actions">
|
|
{{#link-to "editor.new" class="gh-btn gh-btn-green" data-test-new-post-button=true}}<span>New story</span>{{/link-to}}
|
|
</section>
|
|
</header>
|
|
|
|
<div class="gh-contentfilter">
|
|
<div class="gh-contentfilter-left">
|
|
{{#power-select
|
|
placeholder="All posts"
|
|
selected=selectedType
|
|
options=availableTypes
|
|
searchField="name"
|
|
onchange=(action (mut k))
|
|
tagName="div"
|
|
classNames="gh-contentfilter-menu gh-contentfilter-type"
|
|
triggerClass="gh-contentfilter-menu-trigger"
|
|
dropdownClass="gh-contentfilter-menu-dropdown"
|
|
matchTriggerWidth=false
|
|
data-test-type-select=true
|
|
as |type|
|
|
}}
|
|
{{type.name}}
|
|
{{/power-select}}
|
|
|
|
{{#unless session.user.isAuthor}}
|
|
{{#power-select
|
|
placeholder="All authors"
|
|
selected=selectedAuthor
|
|
options=availableAuthors
|
|
searchField="name"
|
|
onchange=(action (mut k))
|
|
tagName="div"
|
|
classNames="gh-contentfilter-menu gh-contentfilter-author"
|
|
triggerClass="gh-contentfilter-menu-trigger"
|
|
dropdownClass="gh-contentfilter-menu-dropdown"
|
|
matchTriggerWidth=false
|
|
data-test-author-select=true
|
|
as |author|
|
|
}}
|
|
{{author.name}}
|
|
{{/power-select}}
|
|
{{/unless}}
|
|
|
|
{{#power-select
|
|
placeholder="All tags"
|
|
selected=selectedTag
|
|
options=availableTags
|
|
searchField="name"
|
|
onchange=(action (mut k))
|
|
tagName="div"
|
|
classNames="gh-contentfilter-menu gh-contentfilter-tag"
|
|
triggerClass="gh-contentfilter-menu-trigger"
|
|
dropdownClass="gh-contentfilter-menu-dropdown"
|
|
searchPlaceholder="Search tags"
|
|
matchTriggerWidth=false
|
|
data-test-tag-select=true
|
|
as |tag|
|
|
}}
|
|
{{tag.name}}
|
|
{{/power-select}}
|
|
</div>
|
|
<div class="gh-contentfilter-right">
|
|
Sort by:
|
|
{{#power-select
|
|
selected=selectedOrder
|
|
options=availableOrders
|
|
searchEnabled=false
|
|
onchange=(action (mut k))
|
|
tagName="div"
|
|
classNames="gh-contentfilter-menu gh-contentfilter-sort"
|
|
triggerClass="gh-contentfilter-menu-trigger"
|
|
dropdownClass="gh-contentfilter-menu-dropdown"
|
|
horizontalPosition="right"
|
|
matchTriggerWidth=false
|
|
data-test-order-select=true
|
|
as |order|
|
|
}}
|
|
{{order.name}}
|
|
{{/power-select}}
|
|
</div>
|
|
</div>
|
|
|
|
{{gh-loading-spinner}}
|
|
</section>
|