Skip to content

Commit

Permalink
Merge pull request #4405 from svbergerem/feature/add-help-page
Browse files Browse the repository at this point in the history
add help page
  • Loading branch information
jhass committed Aug 26, 2013
2 parents 748b384 + 324b09a commit 5f518fe
Show file tree
Hide file tree
Showing 25 changed files with 823 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
* Added a link to user photos and thumbnails are shown in the left side bar [#4347](https://github.com/diaspora/diaspora/issues/4347)
* Rework the single post view
* Add aspect modification on contacts page, close [#4397](https://github.com/diaspora/diaspora/issues/4397)
* Add help page [#4405](https://github.com/diaspora/diaspora/issues/4405)

## Gem updates

Expand Down
13 changes: 13 additions & 0 deletions app/assets/javascripts/app/views/help_view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$(document).ready(function() {
$('#faq .question.collapsible').removeClass('opened').addClass('collapsed');
$('#faq .question.collapsible .answer').hide();

$('#faq .question.collapsible :first').addClass('opened').removeClass('collapsed');
$('#faq .question.collapsible .answer :first').show();

$('.question.collapsible a.toggle').click(function ( event ) {
event.preventDefault();
$(".answer", this.parentNode).toggle();
$(this.parentNode).toggleClass('opened').toggleClass('collapsed');
});
});
3 changes: 2 additions & 1 deletion app/assets/stylesheets/application.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
@import 'header'
@import 'footer'
@import 'opengraph'
@import 'help'
@import 'profile'

@import 'profile.css.scss'
/* ====== media ====== */
.media
:margin 10px
Expand Down
82 changes: 82 additions & 0 deletions app/assets/stylesheets/help.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
ul#help_nav {
display: inline;
padding: 0;
font-size: large;
position: absolute;
left: 198px;
top: 5px;

> li {
display: inline;
margin-right: 1em;
font-weight: 700;

a {
padding: 2px;
font-weight: normal;
}
}
}

#faq_nav {
h4 {
font-weight: 700;
}
ul {
padding: 0;
li {
font-weight: 700;
margin-bottom: 10px;
a {
font-weight: normal;
}
}
}
}

#faq {
h1, h2 {
text-align: center;
font-weight: 700;
}

ul, ol {
margin: 0;
padding: 10px 0 10px 20px;
text-align: left;
}
ul > li {
list-style-type: disc !important;
}

text-align: justify;

.question {
background-color: rgb(242, 242, 242);
margin-bottom: 10px;
@include border-radius(4px);
a.toggle { text-decoration: none; }
h4 {
text-align: left;
font-weight: 700;
margin: 0px;
padding: 10px 20px;
}

&.collapsed {
border: 2px solid rgb(242, 242, 242);
}

&.opened {
border: 2px solid rgb(142, 222, 61);
h4 {
background-color: rgb(142, 222, 61);
}
}
.answer {
@include border-bottom-radius(4px);
background-color: white;
padding: 10px 20px;
}
}
}
1 change: 1 addition & 0 deletions app/assets/templates/header_tpl.jst.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
<li><a href="/people/{{current_user.guid}}">{{t "header.profile"}}</a></li>
<li><a href="/contacts">{{t "header.contacts"}}</a></li>
<li><a href="/user/edit">{{t "header.settings"}}</a></li>
<li><a href="/help">{{t "header.help"}}</a></li>
{{#if current_user.admin}}
<li><a href="/admins/user_search">{{t "header.admin"}}</a></li>
{{/if}}
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/help_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class HelpController < ApplicationController
end
16 changes: 16 additions & 0 deletions app/views/help/_faq_nav.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#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
%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
2 changes: 2 additions & 0 deletions app/views/help/_help_nav.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%ul#help_nav
%li= link_to_unless_current t('help.faq.title'), faq_path
35 changes: 35 additions & 0 deletions app/views/help/account_and_data_management.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-# 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')
59 changes: 59 additions & 0 deletions app/views/help/aspects.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-# 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')
29 changes: 29 additions & 0 deletions app/views/help/getting_help.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-# 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'))))
31 changes: 31 additions & 0 deletions app/views/help/mentions.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-# 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')
31 changes: 31 additions & 0 deletions app/views/help/miscellaneous.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-# 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')
27 changes: 27 additions & 0 deletions app/views/help/pods.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-# 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')

0 comments on commit 5f518fe

Please sign in to comment.