]> git.openstreetmap.org Git - rails.git/commitdiff
Move the diary link to the sidebar
authorTom MacWright <tom@macwright.org>
Tue, 13 Mar 2012 15:36:57 +0000 (11:36 -0400)
committerTom Hughes <tom@compton.nu>
Wed, 14 Mar 2012 10:12:36 +0000 (10:12 +0000)
Restructure the links section in the sidebar to split it into two
major groups, help and community and move the diary link from a tab
to the community section of the sidebar.

app/assets/stylesheets/common.css.scss
app/views/layouts/site.html.erb

index 12a5a808998d059acaee68c3d8086128bccc8655..b8122b4a0c1b4134a20f499997fb80c0e26fad62 100644 (file)
@@ -132,7 +132,7 @@ h2 {
 /* Rules for the menu displayed in the left sidebar */
 
 .left_menu {
 /* Rules for the menu displayed in the left sidebar */
 
 .left_menu {
-  padding: 5px;
+  padding: 5px 10px;
   margin: 4px 0;
   border-top: 1px solid #ccc;
   border-bottom: 1px solid #ccc;
   margin: 4px 0;
   border-top: 1px solid #ccc;
   border-bottom: 1px solid #ccc;
@@ -156,6 +156,13 @@ h2 {
   padding: 0px;
 }
 
   padding: 0px;
 }
 
+/* submenus */
+.left_menu ul li ul {
+  font-weight: normal;
+  line-height: 15px;
+  font-size: 12px;
+}
+
 .left_menu a {
   color: #000;
 }
 .left_menu a {
   color: #000;
 }
@@ -178,7 +185,7 @@ h2 {
  */
 
 .optionalbox {
  */
 
 .optionalbox {
-  padding: 5px;
+  padding: 5px 10px;
   margin: 4px 0;
   border-top: 1px solid #ccc;
 }
   margin: 4px 0;
   border-top: 1px solid #ccc;
 }
@@ -210,7 +217,7 @@ h2 {
 }
 
 #search_field input[type="text"] {
 }
 
 #search_field input[type="text"] {
-  width: 136px;
+  width: 130px;
 }
 
 #search_field input[type="submit"] {
 }
 
 #search_field input[type="submit"] {
index b6fb08986753fe77f4fd8e0d8deabe653aca58c0..14cf7b0037103c06d857beb4e3dafcf5aea2e5cc 100644 (file)
         historyclass = 'geolink bbox minzoom11'
         exportclass = 'geolink llz layers'
         traceclass = ''
         historyclass = 'geolink bbox minzoom11'
         exportclass = 'geolink llz layers'
         traceclass = ''
-        diaryclass = ''
         viewclass += ' active' if params['controller'] == 'site' and params['action'] == 'index' 
         editclass += ' active' if params['controller'] == 'site' and params['action'] == 'edit' 
         historyclass += ' active' if params['controller'] == 'changeset' and params['action'] == 'list' 
         exportclass += ' active' if params['controller'] == 'site' and params['action'] == 'export'
         traceclass += ' active' if params['controller'] == 'trace'
         viewclass += ' active' if params['controller'] == 'site' and params['action'] == 'index' 
         editclass += ' active' if params['controller'] == 'site' and params['action'] == 'edit' 
         historyclass += ' active' if params['controller'] == 'changeset' and params['action'] == 'list' 
         exportclass += ' active' if params['controller'] == 'site' and params['action'] == 'export'
         traceclass += ' active' if params['controller'] == 'trace'
-        diaryclass += ' active' if params['controller'] == 'diary_entry'
         %>
         <li><%= link_to t('layouts.view'), {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => t('layouts.view_tooltip'), :class => viewclass} %></li>
         <li><%= link_to h(t('layouts.edit')) + '&nbsp;&#x25be;'.html_safe, {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => t('javascripts.site.edit_tooltip'), :class => editclass} %></li>
         <li><%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list' }, {:id => 'historyanchor', :title => t('javascripts.site.history_tooltip'), :class => historyclass} %></li>
         <li><%= link_to t('layouts.export'), {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass} %></li>
         <li><%= link_to t('layouts.gps_traces'), {:controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil}, {:id => 'traceanchor', :title => t('layouts.gps_traces_tooltip'), :class => traceclass} %></li>
         %>
         <li><%= link_to t('layouts.view'), {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => t('layouts.view_tooltip'), :class => viewclass} %></li>
         <li><%= link_to h(t('layouts.edit')) + '&nbsp;&#x25be;'.html_safe, {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => t('javascripts.site.edit_tooltip'), :class => editclass} %></li>
         <li><%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list' }, {:id => 'historyanchor', :title => t('javascripts.site.history_tooltip'), :class => historyclass} %></li>
         <li><%= link_to t('layouts.export'), {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass} %></li>
         <li><%= link_to t('layouts.gps_traces'), {:controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil}, {:id => 'traceanchor', :title => t('layouts.gps_traces_tooltip'), :class => traceclass} %></li>
-        <li><%= link_to t('layouts.user_diaries'), {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => t('layouts.user_diaries_tooltip'), :class => diaryclass} %></li>
       </ul>
     </div>
 
       </ul>
     </div>
 
 
       <div id="left_menu" class="left_menu">
         <ul>
 
       <div id="left_menu" class="left_menu">
         <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>
-          <li><%= link_to t('layouts.copyright'), {:controller => 'site', :action => 'copyright'} %></li>
-          <li><a href="http://blogs.openstreetmap.org/" title="<%= t 'layouts.community_blogs_title' %>"><%= t 'layouts.community_blogs' %></a></li>
-          <li><a href="http://www.osmfoundation.org" title="<%= t 'layouts.foundation_title' %>"><%= t 'layouts.foundation' %></a></li>
           <%= yield :left_menu %>
           <%= yield :left_menu %>
+          <li><%= t'layouts.help' %>
+              <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>
+              <li><%= link_to t('layouts.copyright'), {:controller => 'site', :action => 'copyright'} %></li>
+              </ul>
+          </li>
+          <li><%= t'layouts.community' %>
+              <ul>
+              <li><a href="http://blogs.openstreetmap.org/" title="<%= t 'layouts.community_blogs_title' %>"><%= t 'layouts.community_blogs' %></a></li>
+              <li><a href="http://www.osmfoundation.org" title="<%= t 'layouts.foundation_title' %>"><%= t 'layouts.foundation' %></a></li>
+              <li><%= link_to(t('layouts.user_diaries'), {
+                  :controller => 'diary_entry',
+                  :action => 'list',
+                  :display_name => nil
+              }, {
+                  :title => t('layouts.user_diaries_tooltip')
+              }) %></li>
+              </ul>
+          </li>
         </ul>
       </div>
 
         </ul>
       </div>