Commit 138b7062 authored by Benjamin Neff's avatar Benjamin Neff

Merge pull request #7528 from Flaburgan/update-help

Update help
parents ce5e42c4 d14908ed
......@@ -30,6 +30,7 @@ If so, please delete it since it will prevent the federation from working proper
* Remove no-posts-info when adding posts to the stream [#7523](https://github.com/diaspora/diaspora/pull/7523)
* Upgrade to rails 5.1 [#7514](https://github.com/diaspora/diaspora/pull/7514)
* Refactoring single post view interactions [#7182](https://github.com/diaspora/diaspora/pull/7182)
* Update help pages [#7528](https://github.com/diaspora/diaspora/pull/7528)
## Bug fixes
......
......@@ -4,27 +4,29 @@ app.views.Help = app.views.StaticContentView.extend({
templateName : "help",
events : {
"click .faq-link" : "sectionClicked",
"click .faq-link-getting-help" : "gettingHelp",
"click .faq-link-sharing" : "sharing",
"click .faq-link-posts-and-posting" : "postsAndPosting",
"click .faq-link": "sectionClicked",
"click .faq-link-getting-help": "gettingHelp",
"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-chat" : "chat"
"click .faq-link-keyboard-shortcuts": "keyboardShortcuts",
"click .faq-link-chat": "chat"
},
initialize : function() {
this.GETTING_HELP_SUBS = {
getting_started_a: { tutorial_series: this.linkHtml("http://diasporafoundation.org/getting_started/sign_up", Diaspora.I18n.t( 'getting_started_tutorial' )) },
get_support_a_website: { link: this.linkHtml("https://diasporafoundation.org/", Diaspora.I18n.t( 'foundation_website' ))},
get_support_a_tutorials: { tutorials: this.linkHtml("https://diasporafoundation.org/tutorials", Diaspora.I18n.t( 'tutorials' ))},
get_support_a_wiki: { link: this.linkHtml("https://wiki.diasporafoundation.org/Special:Search", Diaspora.I18n.t( 'wiki' ))},
get_support_a_irc: { irc: this.linkHtml("https://wiki.diasporafoundation.org/How_We_Communicate#IRC", Diaspora.I18n.t( 'irc' ))},
get_support_a_faq: { faq: this.linkHtml("https://wiki.diasporafoundation.org/FAQ_for_users", Diaspora.I18n.t( 'faq' ))},
get_support_a_hashtag: { question: this.linkHtml("/tags/question", "#question")}
getting_started_a: {tutorial_series: this.linkHtml("http://diasporafoundation.org/getting_started/sign_up", Diaspora.I18n.t("getting_started_tutorial"))},
get_support_a_website: {link: this.linkHtml("https://diasporafoundation.org/", Diaspora.I18n.t("foundation_website"))},
get_support_a_tutorials: {tutorials: this.linkHtml("https://diasporafoundation.org/tutorials", Diaspora.I18n.t("tutorials"))},
get_support_a_wiki: {link: this.linkHtml("https://wiki.diasporafoundation.org/Special:Search", Diaspora.I18n.t("wiki"))},
get_support_a_irc: {irc: this.linkHtml("https://wiki.diasporafoundation.org/How_We_Communicate#IRC", Diaspora.I18n.t("irc"))},
get_support_a_faq: {faq: this.linkHtml("https://wiki.diasporafoundation.org/FAQ_for_users", Diaspora.I18n.t("faq"))},
get_support_a_hashtag: {question: this.linkHtml("/tags/question", "#question")},
get_support_a_discourse: {discourse: this.linkHtml("https://discourse.diasporafoundation.org/c/support", "discussions & support")}
};
this.POSTS_AND_POSTING_SUBS = {
post_report_a: {community_guidelines: this.linkHtml("https://diasporafoundation.org/community_guidelines", Diaspora.I18n.t("community_guidelines"))},
format_text_a: {
markdown: this.linkHtml("http://diasporafoundation.org/formatting", Diaspora.I18n.t( 'markdown' )),
here: this.linkHtml("http://daringfireball.net/projects/markdown/syntax", Diaspora.I18n.t( 'here' ))
......@@ -53,10 +55,9 @@ app.views.Help = app.views.StaticContentView.extend({
title_pods: Diaspora.I18n.t( 'pods.title' ),
title_posts_and_posting: Diaspora.I18n.t( 'posts_and_posting.title' ),
title_private_posts: Diaspora.I18n.t( 'private_posts.title' ),
title_private_profiles: Diaspora.I18n.t( 'private_profiles.title' ),
title_public_posts: Diaspora.I18n.t( 'public_posts.title' ),
title_public_profiles: Diaspora.I18n.t( 'public_profiles.title' ),
title_resharing_posts: Diaspora.I18n.t( 'resharing_posts.title' ),
title_profile: Diaspora.I18n.t("profile.title"),
title_sharing: Diaspora.I18n.t( 'sharing.title' ),
title_tags: Diaspora.I18n.t( 'tags.title' ),
title_keyboard_shortcuts: Diaspora.I18n.t( 'keyboard_shortcuts.title' ),
......
......@@ -17,6 +17,7 @@
<li>{{{ get_support_a_irc }}}</li>
<li>{{{ get_support_a_faq }}}</li>
<li>{{{ get_support_a_hashtag }}}</li>
<li>{{{ get_support_a_discourse }}}</li>
</ul>
</div>
</div>
......
......@@ -28,7 +28,7 @@
<a class='toggle' href='#'>
<h4>{{ post_report_q }}</h4>
</a>
<div class='answer hideable'>{{ post_report_a }}</div>
<div class='answer hideable'>{{{ post_report_a }}}</div>
</div>
<div class='question opened collapsible'>
<a class='toggle' href='#'>
......@@ -59,9 +59,7 @@
<h4>{{ insert_images_comments_q }}</h4>
</a>
<div class='answer hideable'>
{{ insert_images_comments_a1 }}
<pre>![{{ image_text }}]( {{ image_url }})</pre>
{{ insert_images_comments_a2 }}
{{ insert_images_comments_a }}
</div>
</div>
<div class='question opened collapsible'>
......
......@@ -36,22 +36,18 @@
<a href="#" class="section-unselected faq-link" data-section="private_posts" data-items="who_sees_post can_comment can_reshare see_comment">{{ title_private_posts }}</a>
<span class="section-selected">{{ title_private_posts }}</span>
</li>
<li>
<a href="#" class="section-unselected faq-link" data-section="private_profiles" data-items="who_sees_profile whats_in_profile who_sees_updates">{{ title_private_profiles }}</a>
<span class="section-selected">{{ title_private_profiles }}</span>
</li>
<li>
<a href="#" class="section-unselected faq-link" data-section="public_posts" data-items="who_sees_post find_public_post can_comment_reshare_like see_comment_reshare_like deselect_aspect_posting">{{ title_public_posts }}</a>
<span class="section-selected">{{ title_public_posts }}</span>
</li>
<li>
<a href="#" class="section-unselected faq-link" data-section="public_profiles" data-items="who_sees_profile whats_in_profile who_sees_updates what_do_tags_do">{{ title_public_profiles }}</a>
<span class="section-selected">{{ title_public_profiles }}</span>
</li>
<li>
<a href="#" class="section-unselected faq-link" data-section="resharing_posts" data-items="reshare_public_post_aspects reshare_private_post_aspects">{{ title_resharing_posts }}</a>
<span class="section-selected">{{ title_resharing_posts }}</span>
</li>
<li>
<a href="#" class="section-unselected faq-link" data-section="profile" data-items="whats_in_profile who_sees_profile what_do_tags_do">{{ title_profile }}</a>
<span class="section-selected">{{ title_profile }}</span>
</li>
<li>
<a href="#" class="section-unselected faq-link-sharing" data-section="sharing" data-items="">{{ title_sharing }}</a>
<span class="section-selected">{{ title_sharing }}</span>
......
This diff is collapsed.
......@@ -52,26 +52,21 @@ describe("app.views.Help", function(){
expect(this.view.$el.find('#faq').children().first().hasClass('faq_question_private_posts')).toBeTruthy();
});
it('should show private profiles section', function(){
this.view.$el.find('a[data-section=private_profiles]').trigger('click');
expect(this.view.$el.find('#faq').children().first().hasClass('faq_question_private_profiles')).toBeTruthy();
});
it('should show public posts section', function(){
this.view.$el.find('a[data-section=public_posts]').trigger('click');
expect(this.view.$el.find('#faq').children().first().hasClass('faq_question_public_posts')).toBeTruthy();
});
it('should show public profiles section', function(){
this.view.$el.find('a[data-section=public_profiles]').trigger('click');
expect(this.view.$el.find('#faq').children().first().hasClass('faq_question_public_profiles')).toBeTruthy();
});
it('should show resharing posts section', function(){
this.view.$el.find('a[data-section=resharing_posts]').trigger('click');
expect(this.view.$el.find('#faq').children().first().hasClass('faq_question_resharing_posts')).toBeTruthy();
});
it("should show profile section", function() {
this.view.$el.find("a[data-section=profile]").trigger("click");
expect(this.view.$el.find("#faq").children().first().hasClass("faq_question_profile")).toBeTruthy();
});
it('should show sharing section', function(){
this.view.$el.find('a[data-section=sharing]').trigger('click');
expect(this.view.$el.find('#faq').children().first().data('template')).toBe('faq_sharing');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment