Add help page

This commit is contained in:
John Firebaugh 2013-07-16 15:59:09 -07:00
parent aaeca5b534
commit 33a6b79bd7
6 changed files with 83 additions and 17 deletions

View file

@ -1108,7 +1108,8 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
.user-terms, .user-terms,
.user-confirm, .user-confirm,
.site-copyright, .site-copyright,
.site-welcome { .site-welcome,
.site-help {
#content { #content {
max-width: 740px; max-width: 740px;
} }
@ -2559,3 +2560,43 @@ a.button {
border-radius: 4px; border-radius: 4px;
} }
} }
.site-help {
#content {
a {
display: inline-block;
width: 45%;
height: 200px;
float: left;
text-align: center;
color: #000;
margin: 10px;
padding: 10px;
border-radius: 10px;
}
h3 {
margin-top: 50px;
}
a:hover {
text-decoration: none;
}
.welcome {
background-color: #D6FFB9;
}
.learnosm {
background-color: #BAFCFF;
}
.help {
background-color: #FCFFB9;
}
.wiki {
background-color: #FFB9CC;
}
}
}

View file

@ -71,6 +71,9 @@ class SiteController < ApplicationController
def welcome def welcome
end end
def help
end
def preview def preview
render :text => RichText.new(params[:format], params[:text]).to_html render :text => RichText.new(params[:format], params[:text]).to_html
end end

View file

@ -39,13 +39,6 @@
</div> </div>
<% end %> <% end %>
<ul id="left_menu" class="left_menu"> <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> <li>
<h4><%= t'layouts.community' %></h4> <h4><%= t'layouts.community' %></h4>
<ul> <ul>
@ -84,6 +77,9 @@
</div> </div>
</div> </div>
<div id='top-bar'> <div id='top-bar'>
<ul class='secondary-actions'>
<li><%= link_to t('layouts.help'), help_path %></li>
</ul>
<% if @user and @user.id %> <% if @user and @user.id %>
<%= render :partial => "layouts/user_menu" %> <%= render :partial => "layouts/user_menu" %>
<% else %> <% else %>

View file

@ -0,0 +1,12 @@
<% content_for :heading do %>
<h2><%= t "help_page.title" %></h2>
<% end %>
<p class='introduction'><%= t "help_page.introduction" %></p>
<% ['welcome', 'learnosm', 'help', 'wiki'].each do |site| %>
<a class='<%= site %>' href='<%= t "help_page.#{site}.url" %>'>
<h3><%= t "help_page.#{site}.title" %></h3>
<p><%= t "help_page.#{site}.description" %></p>
</a>
<% end %>

View file

@ -1032,15 +1032,7 @@ en:
osm_read_only: "The OpenStreetMap database is currently in read-only mode 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: "Support OpenStreetMap by %{link} to the Hardware Upgrade Fund."
donate_link_text: donating donate_link_text: donating
help: Help 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" copyright: "Copyright & License"
community: Community community: Community
community_blogs: "Community Blogs" community_blogs: "Community Blogs"
@ -1208,6 +1200,27 @@ en:
Just go to <a href='%{map_url}'>the map</a> and click the note icon: 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 <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. 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: A one-page introduction for new users
learnosm:
url: http://learnosm.org/
title: LearnOSM
description: Learn OpenStreetMap Step by Step
help:
url: https://help.openstreetmap.org/
title: help.openstreetmap.org
description: OSM's question-and-answer site
wiki:
url: http://wiki.openstreetmap.org/
title: wiki.openstreetmap.org
description: A wiki-based documentation site
notifier: notifier:
diary_comment_notification: diary_comment_notification:
subject: "[OpenStreetMap] %{user} commented on your diary entry" subject: "[OpenStreetMap] %{user} commented on your diary entry"

View file

@ -126,6 +126,7 @@ OpenStreetMap::Application.routes.draw do
match '/copyright/:copyright_locale' => 'site#copyright', :via => :get match '/copyright/:copyright_locale' => 'site#copyright', :via => :get
match '/copyright' => 'site#copyright', :via => :get match '/copyright' => 'site#copyright', :via => :get
match '/welcome' => 'site#welcome', :via => :get, :as => :welcome match '/welcome' => 'site#welcome', :via => :get, :as => :welcome
match '/help' => 'site#help', :via => :get, :as => :help
match '/history' => 'changeset#list', :via => :get match '/history' => 'changeset#list', :via => :get
match '/history/feed' => 'changeset#feed', :via => :get, :defaults => { :format => :atom } match '/history/feed' => 'changeset#feed', :via => :get, :defaults => { :format => :atom }
match '/export' => 'site#index', :export => true, :via => :get match '/export' => 'site#index', :export => true, :via => :get