diff --git a/app/assets/javascripts/app/views.js b/app/assets/javascripts/app/views.js index cb909699d..eefc509e5 100644 --- a/app/assets/javascripts/app/views.js +++ b/app/assets/javascripts/app/views.js @@ -107,3 +107,16 @@ app.views.Base = Backbone.View.extend({ } }); +app.views.StaticContentView = app.views.Base.extend({ + + initialize : function(templateName, data) { + this.templateName = templateName; + this.data = data; + + return this; + }, + + presenter : function(){ + return this.data; + }, +}); \ No newline at end of file diff --git a/app/assets/javascripts/app/views/faq_question_view.js b/app/assets/javascripts/app/views/faq_question_view.js index f15d4c90b..cec323967 100644 --- a/app/assets/javascripts/app/views/faq_question_view.js +++ b/app/assets/javascripts/app/views/faq_question_view.js @@ -16,7 +16,6 @@ app.views.FaqQuestionView = app.views.Base.extend({ }, afterRender: function(){ - console.log("Rendered yo") var el = $(this.el) el.find('.question.collapsible').removeClass('opened').addClass('collapsed'); el.find('.answer').hide(); diff --git a/app/assets/javascripts/app/views/help_section_view.js b/app/assets/javascripts/app/views/help_section_view.js new file mode 100644 index 000000000..9b4a8ed48 --- /dev/null +++ b/app/assets/javascripts/app/views/help_section_view.js @@ -0,0 +1,52 @@ +app.views.HelpSectionView = app.views.StaticContentView.extend({ + + events: { + "click .question.collapsible a.toggle" : "toggled" + }, + + initialize : function(templateName, data, subs) { + this.templateName = templateName; + this.data = this.makeSubs(data, subs); + + return this; + }, + + afterRender: function() { + // Hide all questions + $(this.el).find('.question.collapsible').removeClass('opened').addClass('collapsed'); + $(this.el).find('.answer.hideable').hide(); + + // Show first question + $(this.el).find('.question.collapsible :first').addClass('opened').removeClass('collapsed'); + $(this.el).find('.answer.hideable :first').show(); + }, + + toggled: function(e) { + el = $(e.target); + parent = el.parents('.question'); + + parent.children('.answer.hideable').toggle(); + parent.toggleClass('opened').toggleClass('collapsed'); + + e.preventDefault(); + }, + + makeSubs: function(locales, subs) { + var self = this; + + $.each( subs, function(k, vs){ + if (locales.hasOwnProperty(k)){ + $.each( vs, function(tag, rep){ + locales[k] = self.replace(locales[k], tag, rep); + }); + } + }); + + return locales; + }, + + replace: function(theString, tag, replacement){ + return theString.replace("%{" + tag + "}", replacement); + }, + +}); \ No newline at end of file diff --git a/app/assets/javascripts/app/views/help_view.js b/app/assets/javascripts/app/views/help_view.js index 57311363b..caae65174 100644 --- a/app/assets/javascripts/app/views/help_view.js +++ b/app/assets/javascripts/app/views/help_view.js @@ -1,7 +1,6 @@ //TODO RS: Would be nice to have #faq as the root elem or something -app.views.Help = app.views.Base.extend({ +app.views.Help = app.views.StaticContentView.extend({ templateName : "help", - // className : "dark-header", events : { "click .faq-link" : "sectionClicked", @@ -11,13 +10,47 @@ app.views.Help = app.views.Base.extend({ }, initialize : function(options) { - // TODO RS: Set menu link text from js i18n - // TODO RS: Highlight menu item on click + // TODO RS: Hard coded links are not nice. Should be in a config or something. + 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_hashtag: { question: this.linkHtml("/tags/question", "#question")}, // TODO RS: Is this definitely hard coded? + }; + + this.POSTS_AND_POSTING_SUBS = { + 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' )), + } + }; + + this.data = { + title_getting_help: Diaspora.I18n.t( 'getting_help.title' ), + title_account_and_data_management: Diaspora.I18n.t( 'account_and_data_management.title' ), + title_aspects: Diaspora.I18n.t( 'aspects.title' ), + title_mentions: Diaspora.I18n.t( 'mentions.title' ), + 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_sharing: Diaspora.I18n.t( 'sharing.title' ), + title_tags: Diaspora.I18n.t( 'tags.title' ), + title_miscellaneous: Diaspora.I18n.t( 'miscellaneous.title' ), + } + return this; }, afterRender: function() { - this.renderStaticSection("getting_help", "faq_getting_help"); + this.resetMenu(true); + + this.renderStaticSection("getting_help", "faq_getting_help", this.GETTING_HELP_SUBS); }, showItems: function(el) { @@ -45,40 +78,61 @@ app.views.Help = app.views.Base.extend({ $('#faq .question.collapsible .answer :first').show(); }, + resetMenu: function(initial) { + $('#faq_nav').find('.section-unselected').show(); + $('#faq_nav').find('.section-selected').hide(); + if(initial){ + $('#faq_nav').find('.section-unselected :first').hide(); + $('#faq_nav').find('.section-selected :first').show(); + } + }, + + menuClicked: function(e) { + this.resetMenu(); + $(e.target).hide(); + $(e.target).next().show(); + }, + clearItems: function() { $('#faq').empty(); }, sectionClicked : function(e) { + this.menuClicked(e); this.showItems($(e.target)); e.preventDefault(); }, - renderStaticSection: function(section, template) { + renderStaticSection: function(section, template, subs) { + this.clearItems(); data = Diaspora.I18n.locale[section]; - section = new app.views.StaticContentView(template, data); + section = new app.views.HelpSectionView( template, data, subs ); $('#faq').append(section.render().el); }, gettingHelp: function(e) { - this.clearItems(); - this.renderStaticSection("getting_help", "faq_getting_help"); + this.renderStaticSection("getting_help", "faq_getting_help", this.GETTING_HELP_SUBS); + this.menuClicked(e); e.preventDefault(); }, sharing: function(e) { - this.clearItems(); - this.renderStaticSection("sharing", "faq_sharing"); + this.renderStaticSection("sharing", "faq_sharing", {}); + this.menuClicked(e); e.preventDefault(); }, postsAndPosting: function(e) { - this.clearItems(); - this.renderStaticSection("posts_and_posting", "faq_posts_and_posting"); + this.renderStaticSection("posts_and_posting", "faq_posts_and_posting", this.POSTS_AND_POSTING_SUBS); + this.menuClicked(e); e.preventDefault(); }, + + linkHtml: function(url, text) { + return "" + text + ""; + }, }); \ No newline at end of file diff --git a/app/assets/javascripts/app/views/static_content_view.js b/app/assets/javascripts/app/views/static_content_view.js deleted file mode 100644 index 1a85385aa..000000000 --- a/app/assets/javascripts/app/views/static_content_view.js +++ /dev/null @@ -1,16 +0,0 @@ -app.views.StaticContentView = app.views.Base.extend({ - - events: { - }, - - initialize : function(templateName, data) { - this.templateName = templateName; - this.data = data; - - return this; - }, - - presenter : function(){ - return this.data; - }, -}); \ No newline at end of file diff --git a/app/assets/templates/faq_getting_help_tpl.jst.hbs b/app/assets/templates/faq_getting_help_tpl.jst.hbs index 3e84c737d..7dbe12adb 100644 --- a/app/assets/templates/faq_getting_help_tpl.jst.hbs +++ b/app/assets/templates/faq_getting_help_tpl.jst.hbs @@ -1,20 +1,20 @@

diaspora* FAQ


-

{{ getting_started_q }}

+

{{ getting_started_q }}}

- {{ getting_started_a1 }} {{ getting_started_link }} {{ getting_started_a2 }} + {{{ getting_started_a }}}
-

{{ get_support_q }}

+

{{{ get_support_q }}}

\ No newline at end of file diff --git a/app/assets/templates/faq_posts_and_posting_tpl.jst.hbs b/app/assets/templates/faq_posts_and_posting_tpl.jst.hbs index c18481afc..c95fc639e 100644 --- a/app/assets/templates/faq_posts_and_posting_tpl.jst.hbs +++ b/app/assets/templates/faq_posts_and_posting_tpl.jst.hbs @@ -2,27 +2,27 @@

{{ hide_posts_q }}

-
{{ hide_posts_a }}
+
{{ hide_posts_a }}

{{ format_text_q }}

-
- {{ format_text_a1 }} {{ format_text_link_1 }}{{ format_text_a2 }} {{ format_text_link_2 }}{{ format_text_a3 }} +
+ {{{ format_text_a }}}

{{ insert_images_q }}

-
{{ insert_images_a }}
+
{{ insert_images_a }}

{{ insert_images_comments_q }}

-
+
{{ insert_images_comments_a1 }}
![{{ image_text }}]( {{ image_url }})
{{ insert_images_comments_a2 }} @@ -32,31 +32,31 @@

{{ size_of_images_q }}

-
{{ size_of_images_a }}
+
{{ size_of_images_a }}

{{ embed_multimedia_q }}

-
{{ embed_multimedia_a }}
+
{{ embed_multimedia_a }}

{{ character_limit_q }}

-
{{ character_limit_a }}
+
{{ character_limit_a }}

{{ char_limit_services_q }}

-
{{ char_limit_services_a }}
+
{{ char_limit_services_a }}

{{ stream_full_of_posts_q }}

-
+
{{ stream_full_of_posts_a1 }}
  1. {{ stream_full_of_posts_li1 }}
  2. diff --git a/app/assets/templates/faq_question_tpl.jst.hbs b/app/assets/templates/faq_question_tpl.jst.hbs index e576db2d2..21f2af47f 100644 --- a/app/assets/templates/faq_question_tpl.jst.hbs +++ b/app/assets/templates/faq_question_tpl.jst.hbs @@ -2,7 +2,7 @@

    {{ question }}

    -
    +
    {{ answer }}
    \ No newline at end of file diff --git a/app/assets/templates/faq_sharing_tpl.jst.hbs b/app/assets/templates/faq_sharing_tpl.jst.hbs index b3c88f501..1a5afd7c7 100644 --- a/app/assets/templates/faq_sharing_tpl.jst.hbs +++ b/app/assets/templates/faq_sharing_tpl.jst.hbs @@ -2,7 +2,7 @@

    {{ add_to_aspect_q }}

    -
    +
    {{ add_to_aspect_a1 }}
    • {{ add_to_aspect_li1 }}
    • @@ -20,17 +20,17 @@

      {{ only_sharing_q }}

      -
      {{ only_sharing_a }}
      +
      {{ only_sharing_a }}

    {{ list_not_sharing_q }}

    -
    {{ list_not_sharing_a }}
    +
    {{ list_not_sharing_a }}

    {{ see_old_posts_q }}

    -
    {{ see_old_posts_a }}
    +
    {{ see_old_posts_a }}
    \ 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 180ca1af2..dcffe91ff 100644 --- a/app/assets/templates/help_tpl.jst.hbs +++ b/app/assets/templates/help_tpl.jst.hbs @@ -5,20 +5,62 @@
    diff --git a/app/views/help/_faq_nav.haml b/app/views/help/_faq_nav.haml deleted file mode 100644 index 98c0a4c30..000000000 --- a/app/views/help/_faq_nav.haml +++ /dev/null @@ -1,17 +0,0 @@ -#faq_nav - %ul - %li= link_to_unless_current t('help.getting_help.title'), faq_getting_help_path - %li= link_to_unless_current t('help.account_and_data_management.title'), faq_account_and_data_management_path, class: 'faq-link', data_items: ['move_pods', 'download_data', 'close_account', 'data_visible_to_podmin', 'data_other_podmins'] - %li= link_to_unless_current t('help.aspects.title'), faq_aspects_path - %li= link_to_unless_current t('help.mentions.title'), faq_mentions_path - %li= link_to_unless_current t('help.pods.title'), faq_pods_path - %li= link_to_unless_current t('help.posts_and_posting.title'), faq_posts_and_posting_path - %li= link_to_unless_current t('help.private_profiles.title'), faq_private_profiles_path - %li= link_to_unless_current t('help.private_posts.title'), faq_private_posts_path - %li= link_to_unless_current t('help.public_posts.title'), faq_public_posts_path - %li= link_to_unless_current t('help.public_profiles.title'), faq_public_profiles_path - %li= link_to_unless_current t('help.resharing_posts.title'), faq_resharing_posts_path - %li= link_to_unless_current t('help.sharing.title'), faq_sharing_path - %li= link_to_unless_current t('help.tags.title'), faq_tags_path - %li= link_to_unless_current t('help.miscellaneous.title'), faq_miscellaneous_path - %span.xxx this is text diff --git a/app/views/help/_help_nav.haml b/app/views/help/_help_nav.haml deleted file mode 100644 index 320e41f51..000000000 --- a/app/views/help/_help_nav.haml +++ /dev/null @@ -1,2 +0,0 @@ -%ul#help_nav - %li= link_to_unless_current t('help.faq.title'), faq_path diff --git a/app/views/help/account_and_data_management.html.back.haml b/app/views/help/account_and_data_management.html.back.haml deleted file mode 100644 index 20ef5fe02..000000000 --- a/app/views/help/account_and_data_management.html.back.haml +++ /dev/null @@ -1,35 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.move_pods_q') - .answer= t('.move_pods_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.download_data_q') - .answer= t('.download_data_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.close_account_q') - .answer= t('.close_account_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.data_visible_to_podmin_q') - .answer= t('.data_visible_to_podmin_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.data_other_podmins_q') - .answer= t('.data_other_podmins_a') diff --git a/app/views/help/account_and_data_management.html.haml b/app/views/help/account_and_data_management.html.haml deleted file mode 100644 index 20ef5fe02..000000000 --- a/app/views/help/account_and_data_management.html.haml +++ /dev/null @@ -1,35 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.move_pods_q') - .answer= t('.move_pods_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.download_data_q') - .answer= t('.download_data_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.close_account_q') - .answer= t('.close_account_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.data_visible_to_podmin_q') - .answer= t('.data_visible_to_podmin_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.data_other_podmins_q') - .answer= t('.data_other_podmins_a') diff --git a/app/views/help/aspects.html.haml b/app/views/help/aspects.html.haml deleted file mode 100644 index 4703d7f2e..000000000 --- a/app/views/help/aspects.html.haml +++ /dev/null @@ -1,59 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.what_is_an_aspect_q') - .answer= t('.what_is_an_aspect_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.who_sees_post_q') - .answer= t('.who_sees_post_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.restrict_posts_i_see_q') - .answer= t('.restrict_posts_i_see_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.contacts_know_aspect_q') - .answer= t('.contacts_know_aspect_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.contacts_visible_q') - .answer= t('.contacts_visible_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.remove_notification_q') - .answer= t('.remove_notification_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.rename_aspect_q') - .answer= t('.rename_aspect_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.change_aspect_of_post_q') - .answer= t('.change_aspect_of_post_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.post_multiple_aspects_q') - .answer= t('.post_multiple_aspects_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.person_multiple_aspects_q') - .answer= t('.person_multiple_aspects_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.delete_aspect_q') - .answer= t('.delete_aspect_a') diff --git a/app/views/help/getting_help.html.haml b/app/views/help/getting_help.html.haml deleted file mode 100644 index 5e8189f01..000000000 --- a/app/views/help/getting_help.html.haml +++ /dev/null @@ -1,29 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - %h1 diaspora* FAQ - %br - .question.opened - %h4= t('.getting_started_q') - .answer!= t('.getting_started_a', :tutorial_series => link_to(t('help.getting_started_tutorial'), 'http://diasporafoundation.org/getting_started/sign_up', :target => '_blank')) - .question.opened - %h4= t('.get_support_q') - .answer - %ul - %li!= t('.get_support_a_website', :link => link_to(t('help.foundation_website'), 'https://diasporafoundation.org', :target => '_blank')) - %li!= t('.get_support_a_tutorials', :tutorials => link_to(t('help.tutorials'), 'https://diasporafoundation.org/tutorials', :target => '_blank')) - %li!= t('.get_support_a_wiki', :link => link_to(t('help.wiki'), 'https://wiki.diasporafoundation.org/Special:Search', :target => '_blank')) - %li!= t('.get_support_a_irc', :irc => link_to(t('help.irc'), 'https://wiki.diasporafoundation.org/How_We_Communicate#IRC', :target => '_blank')) - %li!= t('.get_support_a_hashtag', :question => link_to("#"+t('aspects.index.help.tag_question'), tag_path(:name => t('aspects.index.help.tag_question')))) diff --git a/app/views/help/mentions.html.haml b/app/views/help/mentions.html.haml deleted file mode 100644 index 46734380b..000000000 --- a/app/views/help/mentions.html.haml +++ /dev/null @@ -1,31 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.what_is_a_mention_q') - .answer= t('.what_is_a_mention_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.how_to_mention_q') - .answer= t('.how_to_mention_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.mention_in_comment_q') - .answer= t('.mention_in_comment_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.see_mentions_q') - .answer= t('.see_mentions_a') diff --git a/app/views/help/miscellaneous.html.haml b/app/views/help/miscellaneous.html.haml deleted file mode 100644 index 935843a79..000000000 --- a/app/views/help/miscellaneous.html.haml +++ /dev/null @@ -1,31 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.back_to_top_q') - .answer= t('.back_to_top_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.photo_albums_q') - .answer= t('.photo_albums_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.subscribe_feed_q') - .answer= t('.subscribe_feed_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.diaspora_app_q') - .answer= t('.diaspora_app_a') diff --git a/app/views/help/pods.html.haml b/app/views/help/pods.html.haml deleted file mode 100644 index b83d36196..000000000 --- a/app/views/help/pods.html.haml +++ /dev/null @@ -1,27 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.what_is_a_pod_q') - .answer= t('.what_is_a_pod_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.find_people_q') - .answer= t('.find_people_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.use_search_box_q') - .answer= t('.use_search_box_a') diff --git a/app/views/help/posts_and_posting.html.haml b/app/views/help/posts_and_posting.html.haml deleted file mode 100644 index 9f7176a4d..000000000 --- a/app/views/help/posts_and_posting.html.haml +++ /dev/null @@ -1,60 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.hide_posts_q') - .answer= t('.hide_posts_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.format_text_q') - .answer!= t('.format_text_a', :markdown => link_to(t('help.markdown'), 'http://diasporafoundation.org/formatting', :target => '_blank'), :here => link_to(t('help.here'), 'http://daringfireball.net/projects/markdown/syntax', :target => '_blank')) - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.insert_images_q') - .answer= t('.insert_images_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.insert_images_comments_q') - .answer - =t('.insert_images_comments_a1') - %pre - = '![' + t('.image_text') + '](' + t('.image_url') + ')' - =t('.insert_images_comments_a2') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.size_of_images_q') - .answer= t('.size_of_images_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.embed_multimedia_q') - .answer= t('.embed_multimedia_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.character_limit_q') - .answer= t('.character_limit_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.char_limit_services_q') - .answer= t('.char_limit_services_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.stream_full_of_posts_q') - .answer - = t('.stream_full_of_posts_a1') - %ol - %li= t('.stream_full_of_posts_li1') - %li= t('.stream_full_of_posts_li2') - %li= t('.stream_full_of_posts_li3') diff --git a/app/views/help/private_posts.html.haml b/app/views/help/private_posts.html.haml deleted file mode 100644 index 2501a2338..000000000 --- a/app/views/help/private_posts.html.haml +++ /dev/null @@ -1,31 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.who_sees_post_q') - .answer= t('.who_sees_post_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.can_comment_q') - .answer= t('.can_comment_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.can_reshare_q') - .answer= t('.can_reshare_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.see_comment_q') - .answer= t('.see_comment_a') diff --git a/app/views/help/private_profiles.html.haml b/app/views/help/private_profiles.html.haml deleted file mode 100644 index 897af2a8c..000000000 --- a/app/views/help/private_profiles.html.haml +++ /dev/null @@ -1,27 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.who_sees_profile_q') - .answer= t('.who_sees_profile_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.whats_in_profile_q') - .answer= t('.whats_in_profile_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.who_sees_updates_q') - .answer= t('.who_sees_updates_a') diff --git a/app/views/help/public_posts.html.haml b/app/views/help/public_posts.html.haml deleted file mode 100644 index d41e196e2..000000000 --- a/app/views/help/public_posts.html.haml +++ /dev/null @@ -1,35 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.who_sees_post_q') - .answer= t('.who_sees_post_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.find_public_post_q') - .answer= t('.find_public_post_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.can_comment_reshare_like_q') - .answer= t('.can_comment_reshare_like_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.see_comment_reshare_like_q') - .answer= t('.see_comment_reshare_like_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.deselect_aspect_posting_q') - .answer= t('.deselect_aspect_posting_a') diff --git a/app/views/help/public_profiles.html.haml b/app/views/help/public_profiles.html.haml deleted file mode 100644 index 553d35a11..000000000 --- a/app/views/help/public_profiles.html.haml +++ /dev/null @@ -1,31 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.who_sees_profile_q') - .answer= t('.who_sees_profile_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.whats_in_profile_q') - .answer= t('.whats_in_profile_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.who_sees_updates_q') - .answer= t('.who_sees_updates_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.what_do_tags_do_q') - .answer= t('.what_do_tags_do_a') diff --git a/app/views/help/resharing_posts.html.haml b/app/views/help/resharing_posts.html.haml deleted file mode 100644 index 66bb533e1..000000000 --- a/app/views/help/resharing_posts.html.haml +++ /dev/null @@ -1,23 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.reshare_public_post_aspects_q') - .answer= t('.reshare_public_post_aspects_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.reshare_private_post_aspects_q') - .answer= t('.reshare_private_post_aspects_a') diff --git a/app/views/help/sharing.html.haml b/app/views/help/sharing.html.haml deleted file mode 100644 index 525d4ae25..000000000 --- a/app/views/help/sharing.html.haml +++ /dev/null @@ -1,41 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.add_to_aspect_q') - .answer - = t('.add_to_aspect_a1') - %ul - %li=t('.add_to_aspect_li1') - %li=t('.add_to_aspect_li2') - %li=t('.add_to_aspect_li3') - %li=t('.add_to_aspect_li4') - %li=t('.add_to_aspect_li5') - %li=t('.add_to_aspect_li6') - %li=t('.add_to_aspect_li7') - =t('.add_to_aspect_a2') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.only_sharing_q') - .answer= t('.only_sharing_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.list_not_sharing_q') - .answer= t('.list_not_sharing_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.see_old_posts_q') - .answer= t('.see_old_posts_a') diff --git a/app/views/help/tags.html.haml b/app/views/help/tags.html.haml deleted file mode 100644 index a4c3a962c..000000000 --- a/app/views/help/tags.html.haml +++ /dev/null @@ -1,35 +0,0 @@ --# Copyright (c) 2010-2011, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -- content_for :page_title do - = t('_help') - -#section_header - %h2 - = t('_help') - //= render('help_nav') -.span-5 - = render('faq_nav') - -.span-19.last#faq - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.what_are_tags_for_q') - .answer= t('.what_are_tags_for_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.tags_in_comments_q') - .answer= t('.tags_in_comments_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.followed_tags_q') - .answer= t('.followed_tags_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.people_tag_page_q') - .answer= t('.people_tag_page_a') - .question.opened.collapsible - %a.toggle{ :href => '#' } - %h4= t('.filter_tags_q') - .answer!= t('.filter_tags_a', :third_party_tools => link_to(t('help.third_party_tools'), 'https://wiki.diasporafoundation.org/Tools_to_use_with_Diaspora', :target => '_blank')) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index ff7d7cbc2..bede226ef 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -378,28 +378,13 @@ en: getting_help: title: "Getting help" getting_started_q: "Help! I need some basic help to get me started!" - getting_started_a1: "You're in luck. Try the " - getting_started_a2: "on our project site. It will take you step-by-step through the registration process and teach you all the basic things you need to know about using diaspora*." - getting_started_link: "'Getting started' tutorial series" - getting_started_url: "http://diasporafoundation.org/getting_started/sign_up" + getting_started_a: "You're in luck. Try the %{tutorial_series} on our project site. It will take you step-by-step through the registration process and teach you all the basic things you need to know about using diaspora*." get_support_q: "What if my question is not answered in this FAQ? Where else can I get support?" - get_support_a_website: "visit our" - get_support_a_website_link: "diaspora foundation website" - get_support_a_website_url: "https://diasporafoundation.org" - get_support_a_tutorials: "check out our" - get_support_a_tutorials_link: "tutorials" - get_support_a_tutorials_url: "https://diasporafoundation.org/tutorials" - get_support_a_wiki: "search the" - get_support_a_wiki_link: "wiki" - get_support_a_wiki_url: "https://wiki.diasporafoundation.org/Special:Search" - get_support_a_irc_a: "join us on" - get_support_a_irc_b: "(Live chat)" - get_support_a_irc_link: "IRC" - get_support_a_irc_url: "https://wiki.diasporafoundation.org/How_We_Communicate#IRC" - get_support_a_hashtag_a: "ask in a public post on diaspora* using the" - get_support_a_hashtag_b: "hashtag" - get_support_a_hashtag_link: "#question" - get_support_a_hashtag_url: "/tags/question" + get_support_a_website: "visit our %{link}" + get_support_a_tutorials: "check out our %{tutorials}" + get_support_a_wiki: "search the %{link}" + get_support_a_irc: "join us on %{irc} (Live chat)" + get_support_a_hashtag: "ask in a public post on diaspora* using the %{question} hashtag" account_and_data_management: title: "Account and data management" move_pods_q: "How do I move my seed (account) from one pod to another?" @@ -459,13 +444,7 @@ en: hide_posts_q: "How do I hide a post? / How do I stop getting notifications about a post that I commented on?" hide_posts_a: "If you point your mouse at the top of a post, an X appears on the right. Click it to hide the post and mute notifications about it. You can still see the post if you visit the profile page of the person who posted it." format_text_q: "How can I format the text in my posts (bold, italics, etc.)?" - format_text_a1: "By using a simplified system called " - format_text_a2: ", you can find the full Markdown syntax " - format_text_a3: ". The preview button is really helpful here, as you can see how your message will look before you share it." - format_text_link_1: "Markdown" - format_text_url_1: "http://diasporafoundation.org/formatting" - format_text_link_2: "here" - format_text_url_12: "http://daringfireball.net/projects/markdown/syntax" + format_text_a: "By using a simplified system called %{markdown}. You can find the full Markdown syntax %{here}. The preview button is really helpful here, as you can see how your message will look before you share it." insert_images_q: "How do I insert images into posts?" insert_images_a: "Click the little camera icon to insert an image into a post. Press the photo icon again to add another photo, or you can select multiple photos to upload in one go." insert_images_comments_q: "Can I insert images into comments?" diff --git a/config/routes.rb b/config/routes.rb index b2d0b06e0..df7300c31 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -206,24 +206,9 @@ Diaspora::Application.routes.draw do get 'mobile/toggle', :to => 'home#toggle_mobile', :as => 'toggle_mobile' # help - get 'help' => 'help#getting_help', :as => 'faq_getting_help' - - scope path: "/help/faq", :controller => :help, :as => 'faq' do - get :account_and_data_management - get :aspects - get :mentions - get :miscellaneous - get :pods - get :posts_and_posting - get :private_posts - get :private_profiles - get :public_posts - get :public_profiles - get :resharing_posts - get :sharing - get :tags - get :faq - end + get 'help/faq' => 'help#faq', :as => 'faq_getting_help' + get 'help/faq' => 'help#faq', :as => 'faq' + get 'help' => 'help#faq', :as => 'help' #Protocol Url get 'protocol' => redirect("http://wiki.diasporafoundation.org/Federation_Protocol_Overview")