FIX: Don't put the FAQ as "New" if there is a custom faq_url

If we do this, it's impossible to ever mark it as read.
This commit is contained in:
Robin Ward 2015-09-10 14:01:23 -04:00
parent e29d24fefa
commit 9224afacaf
2 changed files with 10 additions and 4 deletions

View file

@ -2,6 +2,12 @@ import computed from 'ember-addons/ember-computed-decorators';
export default Ember.Component.extend({
classNames: ['hamburger-panel'],
@computed('currentUser.read_faq')
prioritizeFaq(readFaq) {
// If it's a custom FAQ never prioritize it
return Ember.isEmpty(this.siteSettings.faq_url) && !readFaq;
},
@computed()
showKeyboardShortcuts() {
return !Discourse.Mobile.mobileView && !this.capabilities.touch;

View file

@ -1,5 +1,5 @@
{{#menu-panel visible=visible}}
{{#unless currentUser.read_faq}}
{{#if prioritizeFaq}}
{{#menu-links}}
<li class='heading'>
{{#d-link path=faqUrl class="faq-link"}}
@ -8,7 +8,7 @@
{{/d-link}}
</li>
{{/menu-links}}
{{/unless}}
{{/if}}
{{#if currentUser.staff}}
{{#menu-links}}
@ -81,9 +81,9 @@
{{#menu-links omitRule="true"}}
<li>{{d-link route="about" class="about-link" label="about.simple_title"}}</li>
{{#if currentUser.read_faq}}
{{#unless prioritizeFaq}}
<li>{{d-link path=faqUrl class="faq-link" label="faq"}}</li>
{{/if}}
{{/unless}}
{{#if showKeyboardShortcuts}}
<li>{{d-link action="keyboardShortcuts" class="keyboard-shortcuts-link" label="keyboard_shortcuts_help.title"}}</li>