Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a help jumping-off page #456

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 29 additions & 22 deletions app/assets/stylesheets/common.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -493,15 +493,21 @@ a.donate {
right: 0;
}

#tabnav {
#top-bar nav > ul {
height: 29px;
margin-bottom: 0;
}

> li {
float: left;
nav.primary {
float: left;

> ul {
> li {
float: left;

> * {
padding: 3px $lineheight/2;
> * {
padding: 3px $lineheight/2;
}
}
}

Expand Down Expand Up @@ -546,28 +552,17 @@ a.donate {
color: #000;
}

/* Utility for styling notification numbers */

.count-number {
padding: 2px $lineheight/4;
border-radius: 2px;
background: #d7d7ff;
margin: 0 2px;
font-size: 11px;
color: #333;
}

/* Rules for greeting bar in the top right corner */

#greeting {
nav.secondary {
float: right;
height: 100%;

&.secondary-actions {
> ul {
display: inline-block;
padding: 3px $lineheight/2;
}

&.dropdown {
.dropdown {
display: inline-block;
background-color: #EEE;
&:hover {
background-color: #CCC;
Expand Down Expand Up @@ -609,6 +604,17 @@ a.donate {
}
}

/* Utility for styling notification numbers */

.count-number {
padding: 2px $lineheight/4;
border-radius: 2px;
background: #d7d7ff;
margin: 0 2px;
font-size: 11px;
color: #333;
}

/* Rules for the message shown in place of the map when javascript is disabled */

#noscript {
Expand Down Expand Up @@ -1108,7 +1114,8 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
.user-terms,
.user-confirm,
.site-copyright,
.site-welcome {
.site-welcome,
.site-help {
#content {
max-width: 740px;
}
Expand Down
3 changes: 3 additions & 0 deletions app/controllers/site_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def copyright
def welcome
end

def help
end

def preview
render :text => RichText.new(params[:format], params[:text]).to_html
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_user_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class='dropdown' id='greeting'>
<div class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href="#">
<%= render :partial => 'layouts/inbox' %>
<%= @user.display_name %>
Expand Down
49 changes: 25 additions & 24 deletions app/views/layouts/site.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@
</div>
<% end %>
<ul id="left_menu" class="left_menu">
<li>
<h4><%= t'layouts.help' %></h4>
<ul>
<li><%= link_to(t('layouts.help_centre'), t('layouts.help_url'), :title => t('layouts.help_title')) %></li>
<li><%= link_to(t('layouts.documentation'), t('layouts.wiki_url'), :title => t('layouts.documentation_title')) %></li>
</ul>
</li>
<li>
<h4><%= t'layouts.community' %></h4>
<ul>
Expand Down Expand Up @@ -84,24 +77,32 @@
</div>
</div>
<div id='top-bar'>
<% if @user and @user.id %>
<%= render :partial => "layouts/user_menu" %>
<% else %>
<ul class='secondary-actions' id='greeting'>
<li><%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %></li>
<li><%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %></li>
<nav class='primary'>
<ul>
<li id="view_tab">
<%= link_to t('layouts.view'), root_path, :class => 'tab geolink llz layers' %>
</li><li id="edit_tab">
<%= render :partial => 'layouts/edit_menu',
:locals => { :link_text => t('layouts.edit'), :link_class => 'llz object' }%>
</li><li id="history_tab">
<%= link_to t('layouts.history'), browse_changesets_path, :class => 'tab geolink bbox' %>
</li>
</ul>
<% end %>
<ul id="tabnav">
<li id="view_tab">
<%= link_to t('layouts.view'), root_path, :class => 'tab geolink llz layers' %>
</li><li id="edit_tab">
<%= render :partial => 'layouts/edit_menu',
:locals => { :link_text => t('layouts.edit'), :link_class => 'llz object' }%>
</li><li id="history_tab">
<%= link_to t('layouts.history'), browse_changesets_path, :class => 'tab geolink bbox' %>
</li>
</ul>
</nav>
<nav class='secondary'>
<% if @user and @user.id %>
<ul>
<li><%= link_to t('layouts.help'), help_path %></li>
</ul>
<%= render :partial => "layouts/user_menu" %>
<% else %>
<ul class="secondary-actions">
<li><%= link_to t('layouts.help'), help_path %></li>
<li><%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %></li>
<li><%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %></li>
</ul>
<% end %>
</nav>
</div>
<div class="wrapper">
<%= render :partial => "layouts/flash", :locals => { :flash => flash } %>
Expand Down
16 changes: 16 additions & 0 deletions app/views/site/help.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<% content_for :heading do %>
<h2><%= t "help_page.title" %></h2>
<% end %>

<p class='introduction'><%= t "help_page.introduction" %></p>

<% ['welcome', 'help', 'wiki'].each do |site| %>
<div class='<%= site %> help-item'>
<h3>
<a href='<%= t "help_page.#{site}.url" %>'>
<%= t "help_page.#{site}.title" %>
</a>
</h3>
<p><%= t "help_page.#{site}.description" %></p>
</div>
<% end %>
4 changes: 2 additions & 2 deletions app/views/site/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<div class='col12 clearfix icon-list'>
<h3><%= t "welcome_page.questions.title" %></h3>
<span class='sprite small term question'></span>
<p><%= t "welcome_page.questions.paragraph_1_html" %></p>
<p><%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %></p>
</div>

<div class='clearfix center'>
Expand All @@ -64,4 +64,4 @@
<p><%= t "welcome_page.add_a_note.paragraph_1_html" %></p>
<p><%= t "welcome_page.add_a_note.paragraph_2_html", :map_url => root_path %></p>
</div>
</div>
</div>
35 changes: 22 additions & 13 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,9 @@ en:
alt_text: OpenStreetMap logo
home: Go to Home Location
logout: Logout
log_in: log in
log_in: Log In
log_in_tooltip: Log in with an existing account
sign_up: sign up
sign_up: Sign Up
sign_up_tooltip: Create an account for editing
view: View
view_tooltip: View the map
Expand Down Expand Up @@ -1030,16 +1030,7 @@ en:
osm_offline: "The OpenStreetMap database is currently offline while essential database maintenance work is carried out."
osm_read_only: "The OpenStreetMap database is currently in read-only mode while essential database maintenance work is carried out."
donate: "Support OpenStreetMap by %{link} to the Hardware Upgrade Fund."
donate_link_text: donating
help: Help
help_centre: Help Centre
help_url: http://help.openstreetmap.org/
help_title: Help site for the project
wiki: Wiki
wiki_url: http://wiki.openstreetmap.org/
wiki_title: Wiki site for the project
documentation: Documentation
documentation_title: Documentation for the project
copyright: "Copyright & License"
community: Community
community_blogs: "Community Blogs"
Expand Down Expand Up @@ -1195,8 +1186,9 @@ en:
questions:
title: Any questions?
paragraph_1_html: |
Need help mapping, or not clear on how to use OpenStreetMap? Get your questions answered
on <a href='http://help.openstreetmap.org/'>the help website</a>.
OpenStreetMap has several resources for learning about the project, asking and answering
questions, and collaboratively discussing and documenting mapping topics.
<a href='%{help_url}'>Get help here</a>.
start_mapping: Start Mapping
add_a_note:
title: No Time To Edit? Add a Note!
Expand All @@ -1207,6 +1199,23 @@ en:
Just go to <a href='%{map_url}'>the map</a> and click the note icon:
<span class='icon note'></span>. This will add a marker to the map, which you can move
by dragging. Add your message, then click save, and other mappers will investigate.
help_page:
title: Getting Help
introduction: |
OpenStreetMap has several resources for learning about the project, asking and answering questions,
and collaboratively discussing and documenting mapping topics.
welcome:
url: http://www.openstreetmap.org/welcome
title: Welcome to OSM
description: Start with this quick guide covering the OpenStreetMap basics.
help:
url: https://help.openstreetmap.org/
title: help.openstreetmap.org
description: Ask a question or look up answers on OSM's question-and-answer site.
wiki:
url: http://wiki.openstreetmap.org/
title: wiki.openstreetmap.org
description: Browse the wiki for in-depth OSM documentation.
notifier:
diary_comment_notification:
subject: "[OpenStreetMap] %{user} commented on your diary entry"
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
match '/copyright/:copyright_locale' => 'site#copyright', :via => :get
match '/copyright' => 'site#copyright', :via => :get
match '/welcome' => 'site#welcome', :via => :get, :as => :welcome
match '/help' => 'site#help', :via => :get, :as => :help
match '/history' => 'changeset#list', :via => :get
match '/history/feed' => 'changeset#feed', :via => :get, :defaults => { :format => :atom }
match '/export' => 'site#index', :export => true, :via => :get
Expand Down