]> git.openstreetmap.org Git - rails.git/commitdiff
Add help page
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 16 Jul 2013 22:59:09 +0000 (15:59 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Sun, 13 Oct 2013 21:45:57 +0000 (14:45 -0700)
app/assets/stylesheets/common.css.scss
app/controllers/site_controller.rb
app/views/layouts/site.html.erb
app/views/site/help.html.erb [new file with mode: 0644]
config/locales/en.yml
config/routes.rb

index 42467adb3a22608a02eabb54caf69a215bb485d5..c9b7046f97158cf4f9bed5b4d43fc21567f53bb1 100644 (file)
@@ -1108,7 +1108,8 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
 .user-terms,
 .user-confirm,
 .site-copyright,
 .user-terms,
 .user-confirm,
 .site-copyright,
-.site-welcome {
+.site-welcome,
+.site-help {
   #content {
     max-width: 740px;
   }
   #content {
     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;
+    }
+  }
+}
index 280f39fd8c32b597b7cbc13094044e5827033d02..4945aaa4ff2793457ff0caccd2a20afd321cb411 100644 (file)
@@ -71,6 +71,9 @@ class SiteController < ApplicationController
   def welcome
   end
 
   def welcome
   end
 
+  def help
+  end
+
   def preview
     render :text => RichText.new(params[:format], params[:text]).to_html
   end
   def preview
     render :text => RichText.new(params[:format], params[:text]).to_html
   end
index ed8a6cf18833821240d497b6b299efd6cd870321..4612572077fd85c9bfb1244d69503ab59cf12202 100644 (file)
       </div>
       <% end %>
       <ul id="left_menu" class="left_menu">
       </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>
         <li>
           <h4><%= t'layouts.community' %></h4>
           <ul>
@@ -84,6 +77,9 @@
       </div>
     </div>
     <div id='top-bar'>
       </div>
     </div>
     <div id='top-bar'>
+      <ul class='secondary-actions'>
+        <li><%= link_to t('layouts.help'), help_path %></li>
+      </ul>
       <% if @user and @user.id %>
         <%= render :partial => "layouts/user_menu" %>
       <% else %>
       <% if @user and @user.id %>
         <%= render :partial => "layouts/user_menu" %>
       <% else %>
diff --git a/app/views/site/help.html.erb b/app/views/site/help.html.erb
new file mode 100644 (file)
index 0000000..e72aac1
--- /dev/null
@@ -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 %>
index a1938079fb44dda311189f507d22c6e313a44b7f..302c3dbd312a249fdaf72c85582c67424a3d2d78 100644 (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."
     donate: "Support OpenStreetMap by %{link} to the Hardware Upgrade Fund."
     donate_link_text: donating
     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
+    help: help
     copyright: "Copyright & License"
     community: Community
     community_blogs: "Community Blogs"
     copyright: "Copyright & License"
     community: Community
     community_blogs: "Community Blogs"
@@ -1208,6 +1200,27 @@ 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.
         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: 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:
     diary_comment_notification:
       subject: "[OpenStreetMap] %{user} commented on your diary entry"
   notifier:
     diary_comment_notification:
       subject: "[OpenStreetMap] %{user} commented on your diary entry"
index 445c0353f0b393287e626b9ddb6771bde3e3e736..31658e4a954682d1dbf5e82926926b25715751dc 100644 (file)
@@ -126,6 +126,7 @@ OpenStreetMap::Application.routes.draw do
   match '/copyright/:copyright_locale' => 'site#copyright', :via => :get
   match '/copyright' => 'site#copyright', :via => :get
   match '/welcome' => 'site#welcome', :via => :get, :as => :welcome
   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
   match '/history' => 'changeset#list', :via => :get
   match '/history/feed' => 'changeset#feed', :via => :get, :defaults => { :format => :atom }
   match '/export' => 'site#index', :export => true, :via => :get