diff --git a/Changelog.md b/Changelog.md index bac90ffb5..c0aba9a85 100644 --- a/Changelog.md +++ b/Changelog.md @@ -176,6 +176,7 @@ diaspora.yml file**. The existing settings from 0.4.x and before will not work a * Add year to notifications page [#5676](https://github.com/diaspora/diaspora/pull/5676) * Give admins the ability to lock & unlock accounts [#5643](https://github.com/diaspora/diaspora/pull/5643) * Add reshares to the stream view immediately [#5699](https://github.com/diaspora/diaspora/pull/5699) +* Start help section for the chat [#5665](https://github.com/diaspora/diaspora/pull/5665) # 0.4.1.2 diff --git a/app/assets/javascripts/app/views/help_view.js b/app/assets/javascripts/app/views/help_view.js index ffd773b20..168715e55 100644 --- a/app/assets/javascripts/app/views/help_view.js +++ b/app/assets/javascripts/app/views/help_view.js @@ -9,7 +9,8 @@ app.views.Help = app.views.StaticContentView.extend({ "click .faq-link-sharing" : "sharing", "click .faq-link-posts-and-posting" : "postsAndPosting", "click .faq-link-tags": "tags", - "click .faq-link-keyboard-shortcuts" : "keyboardShortcuts" + "click .faq-link-keyboard-shortcuts" : "keyboardShortcuts", + "click .faq-link-chat" : "chat" }, initialize : function() { @@ -35,6 +36,13 @@ app.views.Help = app.views.StaticContentView.extend({ } }; + this.CHAT_SUBS = { + add_contact_roster_a: { + toggle_privilege: this.getChatIcons(), + contacts_page: this.linkHtml(Routes.contacts_path(), Diaspora.I18n.t('chat.contacts_page')) + } + }; + this.data = { title_header: Diaspora.I18n.t( 'title_header' ), title_getting_help: Diaspora.I18n.t( 'getting_help.title' ), @@ -51,7 +59,9 @@ app.views.Help = app.views.StaticContentView.extend({ title_sharing: Diaspora.I18n.t( 'sharing.title' ), title_tags: Diaspora.I18n.t( 'tags.title' ), title_keyboard_shortcuts: Diaspora.I18n.t( 'keyboard_shortcuts.title' ), - title_miscellaneous: Diaspora.I18n.t( 'miscellaneous.title' ) + title_miscellaneous: Diaspora.I18n.t( 'miscellaneous.title' ), + title_chat: Diaspora.I18n.t( 'chat.title' ), + chat_enabled: this.chatEnabled() }; return this; @@ -143,7 +153,7 @@ app.views.Help = app.views.StaticContentView.extend({ /** * Returns The section title whose data-section property equals the given query * Returns null if nothing found - * @param dataValue Value for the data-section to find + * @param data Value for the data-section to find * @returns {jQuery} */ findSection: function(data){ @@ -187,8 +197,27 @@ app.views.Help = app.views.StaticContentView.extend({ e.preventDefault(); }, + chat: function(e){ + this.renderStaticSection("chat", "faq_chat", this.CHAT_SUBS); + this.menuClicked(e); + + e.preventDefault(); + }, + linkHtml: function(url, text) { return "" + text + ""; + }, + + chatEnabled: function(){ + return gon.chatEnabled; + }, + + getChatIcons: function(){ + return '
'; } }); // @license-end diff --git a/app/assets/stylesheets/help.css.scss b/app/assets/stylesheets/help.css.scss index f6075d679..56fde842e 100644 --- a/app/assets/stylesheets/help.css.scss +++ b/app/assets/stylesheets/help.css.scss @@ -91,6 +91,18 @@ ul#help_nav { border-radius: 0px 0px 4px 4px; background-color: white; padding: 10px 20px; + + div.help-chat-icons{ + text-align: center; + font-size: 50px; + line-height: 70px; + + i.entypo{ + color: #bfbfbf; + + &.chat{ color: #000000; } + } + } } } } diff --git a/app/assets/templates/faq_chat_tpl.jst.hbs b/app/assets/templates/faq_chat_tpl.jst.hbs new file mode 100644 index 000000000..fb3633345 --- /dev/null +++ b/app/assets/templates/faq_chat_tpl.jst.hbs @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/app/assets/templates/help_tpl.jst.hbs b/app/assets/templates/help_tpl.jst.hbs index 22c198186..f8f01e7ac 100644 --- a/app/assets/templates/help_tpl.jst.hbs +++ b/app/assets/templates/help_tpl.jst.hbs @@ -68,6 +68,12 @@ {{ title_miscellaneous }} {{ title_miscellaneous }} + {{#if chat_enabled }} +