mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
cc4ff8c6d4
refs https://github.com/TryGhost/Team/issues/3168 - This is basic scaffolding for collection resources UI in Admin. For the most part it's a copy-paste of tags code with slight modifications to fit the collections usecase
33 lines
1.8 KiB
Handlebars
33 lines
1.8 KiB
Handlebars
<li class="gh-list-row gh-collections-list-item" ...attributes>
|
|
<LinkTo @route="collection" @model={{@collection}} class="gh-list-data gh-collection-list-title gh-list-cellwidth-70" title="Edit collection">
|
|
<h3 class="gh-collection-list-name" data-test-collection-name>
|
|
{{@collection.title}}
|
|
</h3>
|
|
{{#if @collection.description}}
|
|
<p class="ma0 pa0 f8 midgrey gh-collection-list-description" data-test-collection-description>
|
|
{{@collection.description}}
|
|
</p>
|
|
{{/if}}
|
|
</LinkTo>
|
|
|
|
<LinkTo @route="collection" @model={{@collection}} class="gh-list-data middarkgrey f8 gh-collection-list-slug gh-list-cellwidth-10" title="Edit collection" data-test-collection-slug>
|
|
<span title="{{@collection.slug}}">{{@collection.slug}}</span>
|
|
</LinkTo>
|
|
|
|
{{#if @collection.count.posts}}
|
|
<LinkTo @route="posts" @query={{hash type=null author=null collection=@collection.slug order=null}} class="gh-list-data gh-collection-list-posts-count gh-list-cellwidth-10 f8" title={{concat "List posts collectionged with '" @collection.name "'"}}>
|
|
<span class="nowrap">{{gh-pluralize @collection.count.posts "post"}}</span>
|
|
</LinkTo>
|
|
{{else}}
|
|
<LinkTo @route="collection" @model={{@collection}} class="gh-list-data gh-collection-list-posts-count gh-list-cellwidth-10" title="Edit collection">
|
|
<span class="nowrap f8 midlightgrey">{{gh-pluralize @collection.count.posts "post"}}</span>
|
|
</LinkTo>
|
|
{{/if}}
|
|
|
|
<LinkTo @route="collection" @model={{@collection}} class="gh-list-data gh-list-cellwidth-10 gh-list-chevron" title="Edit collection">
|
|
<div class="flex items-center justify-end w-100 h-100">
|
|
<span class="nr2">{{svg-jar "arrow-right" class="w6 h6 fill-midgrey pa1"}}</span>
|
|
</div>
|
|
</LinkTo>
|
|
</li>
|