From ddb8378ab049e46200b76ad80a672cc0cc50e3d6 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 23 Feb 2015 18:26:19 +0530 Subject: [PATCH] UX: unified About / Privacy / ToS / FAQ topnav --- .../discourse/controllers/about.js.es6 | 4 + .../javascripts/discourse/templates/about.hbs | 159 ++++++++++-------- app/views/static/show.html.erb | 1 + config/locales/server.en.yml | 1 + 4 files changed, 93 insertions(+), 72 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/about.js.es6 b/app/assets/javascripts/discourse/controllers/about.js.es6 index f88b331cae6..070f143bc28 100644 --- a/app/assets/javascripts/discourse/controllers/about.js.es6 +++ b/app/assets/javascripts/discourse/controllers/about.js.es6 @@ -1,6 +1,10 @@ import ObjectController from 'discourse/controllers/object'; export default ObjectController.extend({ + faqOverriden: function() { + return !(this.siteSettings.faq_url.length === 0); + }.property(), + contactInfo: function() { if (Discourse.SiteSettings.contact_email) { return I18n.t('about.contact_info', {contact_email: Discourse.SiteSettings.contact_email}); diff --git a/app/assets/javascripts/discourse/templates/about.hbs b/app/assets/javascripts/discourse/templates/about.hbs index 077f8fb721b..ecfa576dee9 100644 --- a/app/assets/javascripts/discourse/templates/about.hbs +++ b/app/assets/javascripts/discourse/templates/about.hbs @@ -1,82 +1,97 @@ -
-
-

{{i18n 'about.title' title=title}}

-

{{description}}

-
+
+
- {{#if admins}} -
-

{{i18n 'about.our_admins'}}

- - {{#each a in admins}} - {{user-small user=a}} - {{/each}} -
+ +
+

{{i18n 'about.title' title=title}}

+

{{description}}

- {{/if}} - {{#if moderators}} -
-

{{i18n 'about.our_moderators'}}

+ {{#if admins}} +
+

{{i18n 'about.our_admins'}}

-
- {{#each m in moderators}} - {{user-small user=m}} + {{#each a in admins}} + {{user-small user=a}} {{/each}} -
-
+
+ +
+ {{/if}} + + {{#if moderators}} +
+

{{i18n 'about.our_moderators'}}

+ +
+ {{#each m in moderators}} + {{user-small user=m}} + {{/each}} +
+
+
+ {{/if}} + +
+

{{i18n 'about.stats'}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 {{i18n 'about.stat.all_time'}}{{i18n 'about.stat.last_7_days'}}{{i18n 'about.stat.last_30_days'}}
{{i18n 'about.topic_count'}}{{number stats.topic_count}}{{number stats.topics_7_days}}{{number stats.topics_30_days}}
{{i18n 'about.post_count'}}{{number stats.post_count}}{{number stats.posts_7_days}}{{number stats.posts_30_days}}
{{i18n 'about.user_count'}}{{number stats.user_count}}{{number stats.users_7_days}}{{number stats.users_30_days}}
{{i18n 'about.active_user_count'}}{{number stats.active_users_7_days}}{{number stats.active_users_30_days}}
{{i18n 'about.like_count'}}{{number stats.like_count}}{{number stats.likes_7_days}}{{number stats.likes_30_days}}
- {{/if}} -
-

{{i18n 'about.stats'}}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 {{i18n 'about.stat.all_time'}}{{i18n 'about.stat.last_7_days'}}{{i18n 'about.stat.last_30_days'}}
{{i18n 'about.topic_count'}}{{number stats.topic_count}}{{number stats.topics_7_days}}{{number stats.topics_30_days}}
{{i18n 'about.post_count'}}{{number stats.post_count}}{{number stats.posts_7_days}}{{number stats.posts_30_days}}
{{i18n 'about.user_count'}}{{number stats.user_count}}{{number stats.users_7_days}}{{number stats.users_30_days}}
{{i18n 'about.active_user_count'}}{{number stats.active_users_7_days}}{{number stats.active_users_30_days}}
{{i18n 'about.like_count'}}{{number stats.like_count}}{{number stats.likes_7_days}}{{number stats.likes_30_days}}
-
- - {{#if contactInfo}} -
-

{{i18n 'about.contact'}}

-

{{contactInfo}}

-
- {{/if}} + {{#if contactInfo}} +
+

{{i18n 'about.contact'}}

+

{{contactInfo}}

+
+ {{/if}} +
diff --git a/app/views/static/show.html.erb b/app/views/static/show.html.erb index 305b137c98a..e6aa2892e5d 100644 --- a/app/views/static/show.html.erb +++ b/app/views/static/show.html.erb @@ -1,4 +1,5 @@