This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/controllers/site_map_controller.js
Wojciech Zawistowski 8eef779d38 refactors site map
2013-11-27 21:58:36 +01:00

34 lines
947 B
JavaScript

Discourse.SiteMapController = Ember.ArrayController.extend(Discourse.HasCurrentUser, {
itemController: "siteMapCategory",
showAdminLinks: function() {
return this.get("currentUser.staff");
}.property("currentUser.staff"),
flaggedPostsCount: function() {
return this.get("currentUser.site_flagged_posts_count");
}.property("currentUser.site_flagged_posts_count"),
faqUrl: function() {
return Discourse.SiteSettings.faq_url ? Discourse.SiteSettings.faq_url : Discourse.getURL('/faq');
}.property(),
showMobileToggle: function() {
return Discourse.SiteSettings.enable_mobile_theme;
}.property(),
mobileViewLinkTextKey: function() {
return Discourse.Mobile.mobileView ? "desktop_view" : "mobile_view";
}.property(),
categories: function() {
return Discourse.Category.list();
}.property(),
actions: {
toggleMobileView: function() {
Discourse.Mobile.toggleMobileView();
}
}
});