mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
requires https://github.com/TryGhost/Ghost/pull/11892 - adds `?paid` query parameter to members route that is tied to the `?paid` query param in the API request - added all/free/paid members dropdown to members filter component
53 lines
2.3 KiB
Handlebars
53 lines
2.3 KiB
Handlebars
<span class="dropdown dropdown-topmenu">
|
|
<GhDropdownButton
|
|
@dropdownName="members-label-menu"
|
|
@classNames="gh-btn gh-btn-white gh-btn-filter first" @title="Member Labels"
|
|
@data-test-user-actions="true">
|
|
<span class="nudge-bottom--1 {{if @selectedLabel.slug "blue fw6"}} gh-btn-filter-maxwidth" title="{{@selectedLabel.name}}">
|
|
<span>{{@selectedLabel.name}}</span>
|
|
{{svg-jar "arrow-down-stroke" class="w2 h2 stroke-midgrey ml1"}}
|
|
</span>
|
|
</GhDropdownButton>
|
|
<GhDropdown @name="members-label-menu" @tagName="div"
|
|
@classNames="dropdown-menu dropdown-triangle-top-right dropdown-action">
|
|
<ul class="dropdown-content">
|
|
{{#each @availableLabels as |label|}}
|
|
<li class="{{if (eq @selectedLabel.name label.name) "selected"}}">
|
|
<a>
|
|
<span class="dropdown-label" title="{{label.name}}" {{on "click" (fn @onLabelChange label)}}>{{label.name}} </span>
|
|
{{#if label.slug}}
|
|
<span class="dropdown-action-icon" {{on "click" (fn @onLabelEdit label.slug)}}> {{svg-jar "pen"}} </span>
|
|
{{/if}}
|
|
</a>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
<ul class="dropdown-footer">
|
|
<li>
|
|
<a {{on "click" (fn @onLabelAdd)}}>
|
|
<span>
|
|
{{svg-jar "add"}}
|
|
Add Label
|
|
</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</GhDropdown>
|
|
</span>
|
|
|
|
<div class="gh-contentfilter-menu {{if @selectedPaidParam.value "gh-contentfilter-selected"}}" data-test-select="paidParam">
|
|
<PowerSelect
|
|
@selected={{@selectedPaidParam}}
|
|
@options={{@availablePaidParams}}
|
|
@searchEnabled={{false}}
|
|
@onChange={{@onPaidParamChange}}
|
|
@triggerComponent="gh-power-select/trigger"
|
|
@triggerClass="gh-contentfilter-menu-trigger"
|
|
@dropdownClass="gh-contentfilter-menu-dropdown"
|
|
@searchPlaceholder="Search authors"
|
|
@matchTriggerWidth={{false}}
|
|
as |paidParam|
|
|
>
|
|
{{#if paidParam.name}}{{paidParam.name}}{{else}}<span class="red">Unknown paid status</span>{{/if}}
|
|
</PowerSelect>
|
|
</div> |