mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-29 15:35:23 -04: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
app/assets/javascripts/discourse
config
|
@ -55,6 +55,16 @@ export default Ember.Component.extend(StringBuffer, {
|
||||||
return false;
|
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')) {
|
if (this.get('expandGloballyPinned') && this.get('topic.pinned_globally')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,10 @@
|
||||||
showPosters=true
|
showPosters=true
|
||||||
currentUser=currentUser
|
currentUser=currentUser
|
||||||
hideCategory=model.hideCategory
|
hideCategory=model.hideCategory
|
||||||
topics=model.topics}}
|
topics=model.topics
|
||||||
|
expandGloballyPinned=expandGloballyPinned
|
||||||
|
expandAllPinned=expandAllPinned
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/discovery-topics-list}}
|
{{/discovery-topics-list}}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<td>
|
<td>
|
||||||
{{~#unless topic.hasExcerpt}}
|
{{~#unless expandPinned}}
|
||||||
<div class='pull-left'>
|
<div class='pull-left'>
|
||||||
<a href="{{topic.lastPostUrl}}">{{avatar topic.lastPoster imageSize="large"}}</a>
|
<a href="{{topic.lastPostUrl}}">{{avatar topic.lastPoster imageSize="large"}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,9 @@
|
||||||
{{#if topic.unseen}}
|
{{#if topic.unseen}}
|
||||||
<span class="badge-notification new-topic"></span>
|
<span class="badge-notification new-topic"></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{~#if expandPinned}}
|
||||||
{{raw "list/topic-excerpt" topic=topic}}
|
{{raw "list/topic-excerpt" topic=topic}}
|
||||||
|
{{/if~}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='pull-right'>
|
<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."
|
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."
|
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."
|
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"
|
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
|
client: true
|
||||||
default: 0
|
default: 0
|
||||||
post_excerpt_maxlength: 300
|
post_excerpt_maxlength: 300
|
||||||
|
show_pinned_excerpt_mobile:
|
||||||
|
client: true
|
||||||
|
default: true
|
||||||
|
show_pinned_excerpt_desktop:
|
||||||
|
client: true
|
||||||
|
default: true
|
||||||
display_name_on_posts:
|
display_name_on_posts:
|
||||||
client: true
|
client: true
|
||||||
default: false
|
default: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue