add badges link to hamburger

This commit is contained in:
Sam 2014-05-16 10:52:39 +10:00
parent eff8c22638
commit 8146ee4560
3 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,7 @@
export default Ember.ArrayController.extend(Discourse.HasCurrentUser, {
itemController: "site-map-category",
showBadgesLink: Discourse.SiteSettings.enable_badges,
showAdminLinks: Em.computed.alias('currentUser.staff'),
flaggedPostsCount: Em.computed.alias("currentUser.site_flagged_posts_count"),
@ -8,6 +9,8 @@ export default Ember.ArrayController.extend(Discourse.HasCurrentUser, {
return Discourse.SiteSettings.faq_url ? Discourse.SiteSettings.faq_url : Discourse.getURL('/faq');
}.property(),
badgesUrl: Discourse.getURL('/badges'),
showMobileToggle: Discourse.computed.setting('enable_mobile_theme'),
mobileViewLinkTextKey: function() {

View File

@ -5,6 +5,9 @@
<li>{{partial "siteMap/flaggedPostsLinks"}}</li>
{{/if}}
<li>{{partial "siteMap/latestTopicsLink"}}</li>
{{#if showBadgesLink}}
<li>{{partial "siteMap/badges"}}</li>
{{/if}}
<li>{{partial "siteMap/faqLink"}}</li>
{{#if showMobileToggle}}
<li>{{partial "siteMap/mobileToggleLink"}}</li>

View File

@ -0,0 +1 @@
<a href="{{unbound badgesUrl}}" class="badge-link">{{i18n badges.title}}</a>