mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FEATURE: flags for suppressing pinned expansion
To suppress pinned excerpt expansion on mobile set "show_pinned_excerpt_mobile" to false To suppress pinned excerpt expansion on desktop set "show_pinned_excerpt_desktop" to false
This commit is contained in:
parent
c145e747b6
commit
dbc25a9d64
5 changed files with 25 additions and 2 deletions
|
@ -55,6 +55,16 @@ export default Ember.Component.extend(StringBuffer, {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (this.site.mobileView) {
|
||||
if (!this.siteSettings.show_pinned_excerpt_mobile) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!this.siteSettings.show_pinned_excerpt_desktop) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.get('expandGloballyPinned') && this.get('topic.pinned_globally')) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
showPosters=true
|
||||
currentUser=currentUser
|
||||
hideCategory=model.hideCategory
|
||||
topics=model.topics}}
|
||||
topics=model.topics
|
||||
expandGloballyPinned=expandGloballyPinned
|
||||
expandAllPinned=expandAllPinned
|
||||
}}
|
||||
{{/if}}
|
||||
{{/discovery-topics-list}}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<td>
|
||||
{{~#unless topic.hasExcerpt}}
|
||||
{{~#unless expandPinned}}
|
||||
<div class='pull-left'>
|
||||
<a href="{{topic.lastPostUrl}}">{{avatar topic.lastPoster imageSize="large"}}</a>
|
||||
</div>
|
||||
|
@ -13,7 +13,9 @@
|
|||
{{#if topic.unseen}}
|
||||
<span class="badge-notification new-topic"></span>
|
||||
{{/if}}
|
||||
{{~#if expandPinned}}
|
||||
{{raw "list/topic-excerpt" topic=topic}}
|
||||
{{/if~}}
|
||||
</div>
|
||||
|
||||
<div class='pull-right'>
|
||||
|
|
|
@ -852,6 +852,8 @@ en:
|
|||
exclude_rel_nofollow_domains: "A list of domains where nofollow should not be added to links. tld.com will automatically allow sub.tld.com as well. As a minimum, you should add the top-level domain of this site to help web crawlers find all content. If other parts of your website are at other domains, add those too."
|
||||
|
||||
post_excerpt_maxlength: "Maximum length of a post excerpt / summary."
|
||||
show_pinned_excerpt_mobile: "Show excerpt on pinned topics in mobile view."
|
||||
show_pinned_excerpt_desktop: "Show excerpt on pinned topics in desktop view."
|
||||
post_onebox_maxlength: "Maximum length of a oneboxed Discourse post in characters."
|
||||
onebox_domains_whitelist: "A list of domains to allow oneboxing for; these domains should support OpenGraph or oEmbed. Test them at http://iframely.com/debug"
|
||||
|
||||
|
|
|
@ -474,6 +474,12 @@ posting:
|
|||
client: true
|
||||
default: 0
|
||||
post_excerpt_maxlength: 300
|
||||
show_pinned_excerpt_mobile:
|
||||
client: true
|
||||
default: true
|
||||
show_pinned_excerpt_desktop:
|
||||
client: true
|
||||
default: true
|
||||
display_name_on_posts:
|
||||
client: true
|
||||
default: false
|
||||
|
|
Loading…
Reference in a new issue