Move the diary link to the sidebar

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.
This commit is contained in:
Tom MacWright 2012-03-13 11:36:57 -04:00 committed by Tom Hughes
parent 5ef841085e
commit ae8cc604a1
2 changed files with 30 additions and 11 deletions

View file

@ -132,7 +132,7 @@ h2 {
/* 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;
@ -156,6 +156,13 @@ h2 {
padding: 0px;
}
/* submenus */
.left_menu ul li ul {
font-weight: normal;
line-height: 15px;
font-size: 12px;
}
.left_menu a {
color: #000;
}
@ -178,7 +185,7 @@ h2 {
*/
.optionalbox {
padding: 5px;
padding: 5px 10px;
margin: 4px 0;
border-top: 1px solid #ccc;
}
@ -210,7 +217,7 @@ h2 {
}
#search_field input[type="text"] {
width: 136px;
width: 130px;
}
#search_field input[type="submit"] {

View file

@ -32,20 +32,17 @@
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'
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.user_diaries'), {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => t('layouts.user_diaries_tooltip'), :class => diaryclass} %></li>
</ul>
</div>
@ -105,13 +102,28 @@
<% end %>
<div id="left_menu" class="left_menu">
<ul>
<%= 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>
<%= yield :left_menu %>
<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>