mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 09:42:45 +08:00
DEV: add tag name class to body of tag pages
This commit is contained in:
parent
67429335d5
commit
d516a88b4c
|
@ -1,90 +1,92 @@
|
||||||
<div class="container">
|
{{#d-section pageClass="tags" bodyClass=(concat "tag-" tag.id)}}
|
||||||
{{discourse-banner user=currentUser banner=site.banner}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="list-controls">
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<section class="navigation-container">
|
{{discourse-banner user=currentUser banner=site.banner}}
|
||||||
{{#if showTagFilter}}
|
|
||||||
{{bread-crumbs
|
|
||||||
categories=categories
|
|
||||||
category=category
|
|
||||||
tagId=tag.id
|
|
||||||
noSubcategories=noSubcategories
|
|
||||||
}}
|
|
||||||
{{navigation-bar navItems=navItems filterMode=filterMode}}
|
|
||||||
{{else}}
|
|
||||||
<h2 class="tag-show-heading">
|
|
||||||
{{#link-to "tags"}}{{i18n "tagging.tags"}}{{/link-to}}
|
|
||||||
{{d-icon "angle-right"}}
|
|
||||||
{{discourse-tag-bound tagRecord=tag style="simple"}}
|
|
||||||
{{#each additionalTags as |tag|}}
|
|
||||||
<span>&</span>
|
|
||||||
{{discourse-tag tag style="simple"}}
|
|
||||||
{{/each}}
|
|
||||||
</h2>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if tagNotification}}
|
|
||||||
{{#unless additionalTags}}
|
|
||||||
{{tag-notifications-button
|
|
||||||
onChange=(action "changeTagNotificationLevel")
|
|
||||||
value=tagNotification.notification_level
|
|
||||||
}}
|
|
||||||
{{/unless}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{create-topic-button
|
|
||||||
canCreateTopic=canCreateTopic
|
|
||||||
disabled=createTopicDisabled
|
|
||||||
label=createTopicLabel
|
|
||||||
action=(route-action "createTopic")
|
|
||||||
}}
|
|
||||||
|
|
||||||
{{#if showToggleInfo}}
|
|
||||||
{{d-button icon="tag" label="tagging.info" action=(action "toggleInfo") id="show-tag-info"}}
|
|
||||||
{{/if}}
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{#if showInfo}}
|
<div class="list-controls">
|
||||||
{{tag-info tag=tag list=list deleteAction=(action "deleteTag")}}
|
<div class="container">
|
||||||
{{/if}}
|
<section class="navigation-container">
|
||||||
|
{{#if showTagFilter}}
|
||||||
|
{{bread-crumbs
|
||||||
|
categories=categories
|
||||||
|
category=category
|
||||||
|
tagId=tag.id
|
||||||
|
noSubcategories=noSubcategories
|
||||||
|
}}
|
||||||
|
{{navigation-bar navItems=navItems filterMode=filterMode}}
|
||||||
|
{{else}}
|
||||||
|
<h2 class="tag-show-heading">
|
||||||
|
{{#link-to "tags"}}{{i18n "tagging.tags"}}{{/link-to}}
|
||||||
|
{{d-icon "angle-right"}}
|
||||||
|
{{discourse-tag-bound tagRecord=tag style="simple"}}
|
||||||
|
{{#each additionalTags as |tag|}}
|
||||||
|
<span>&</span>
|
||||||
|
{{discourse-tag tag style="simple"}}
|
||||||
|
{{/each}}
|
||||||
|
</h2>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{plugin-outlet name="discovery-list-container-top"}}
|
{{#if tagNotification}}
|
||||||
|
{{#unless additionalTags}}
|
||||||
|
{{tag-notifications-button
|
||||||
|
onChange=(action "changeTagNotificationLevel")
|
||||||
|
value=tagNotification.notification_level
|
||||||
|
}}
|
||||||
|
{{/unless}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="container list-container">
|
{{create-topic-button
|
||||||
<div class="row">
|
canCreateTopic=canCreateTopic
|
||||||
<div class="full-width">
|
disabled=createTopicDisabled
|
||||||
<div id="list-area">
|
label=createTopicLabel
|
||||||
{{#unless loading}}
|
action=(route-action "createTopic")
|
||||||
{{#if list.topics}}
|
}}
|
||||||
{{#discovery-topics-list model=list refresh=(action "refresh")}}
|
|
||||||
{{bulk-select-button selected=selected action=(action "refresh")}}
|
|
||||||
{{topic-list
|
|
||||||
topics=list.topics
|
|
||||||
canBulkSelect=canBulkSelect
|
|
||||||
toggleBulkSelect=(action "toggleBulkSelect")
|
|
||||||
bulkSelectEnabled=bulkSelectEnabled
|
|
||||||
selected=selected
|
|
||||||
showPosters=true
|
|
||||||
order=order
|
|
||||||
ascending=ascending
|
|
||||||
changeSort=(action "changeSort")
|
|
||||||
}}
|
|
||||||
{{/discovery-topics-list}}
|
|
||||||
{{else}}
|
|
||||||
<footer class="topic-list-bottom">
|
|
||||||
<h3>
|
|
||||||
{{footerMessage}}{{#link-to "discovery.categories"}} {{i18n "topic.browse_all_categories"}}{{/link-to}} {{i18n "or"}} {{#link-to "discovery.latest"}}{{i18n "topic.view_latest_topics"}}{{/link-to}}.
|
|
||||||
</h3>
|
|
||||||
</footer>
|
|
||||||
{{/if}}
|
|
||||||
{{/unless}}
|
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=list.loadingMore}}
|
{{#if showToggleInfo}}
|
||||||
|
{{d-button icon="tag" label="tagging.info" action=(action "toggleInfo") id="show-tag-info"}}
|
||||||
|
{{/if}}
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if showInfo}}
|
||||||
|
{{tag-info tag=tag list=list deleteAction=(action "deleteTag")}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{plugin-outlet name="discovery-list-container-top"}}
|
||||||
|
|
||||||
|
<div class="container list-container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="full-width">
|
||||||
|
<div id="list-area">
|
||||||
|
{{#unless loading}}
|
||||||
|
{{#if list.topics}}
|
||||||
|
{{#discovery-topics-list model=list refresh=(action "refresh")}}
|
||||||
|
{{bulk-select-button selected=selected action=(action "refresh")}}
|
||||||
|
{{topic-list
|
||||||
|
topics=list.topics
|
||||||
|
canBulkSelect=canBulkSelect
|
||||||
|
toggleBulkSelect=(action "toggleBulkSelect")
|
||||||
|
bulkSelectEnabled=bulkSelectEnabled
|
||||||
|
selected=selected
|
||||||
|
showPosters=true
|
||||||
|
order=order
|
||||||
|
ascending=ascending
|
||||||
|
changeSort=(action "changeSort")
|
||||||
|
}}
|
||||||
|
{{/discovery-topics-list}}
|
||||||
|
{{else}}
|
||||||
|
<footer class="topic-list-bottom">
|
||||||
|
<h3>
|
||||||
|
{{footerMessage}}{{#link-to "discovery.categories"}} {{i18n "topic.browse_all_categories"}}{{/link-to}} {{i18n "or"}} {{#link-to "discovery.latest"}}{{i18n "topic.view_latest_topics"}}{{/link-to}}.
|
||||||
|
</h3>
|
||||||
|
</footer>
|
||||||
|
{{/if}}
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
|
{{conditional-loading-spinner condition=list.loadingMore}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{/d-section}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user