Commit fddd11dad5e72b5b2ac11c30719a55867cc08ded

Authored by AntonioTerceiro
1 parent b29719e0

ActionItem70: better display of current category



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@555 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/views/layouts/application.rhtml
... ... @@ -53,6 +53,12 @@
53 53 <%= header %>
54 54 </div>
55 55  
  56 + <% if @category %>
  57 + <div id='category'>
  58 + <%= @category.full_name %>
  59 + </div>
  60 + <% end %>
  61 +
56 62 </div><!-- id="noosfero_bar" -->
57 63  
58 64  
... ...
app/views/shared/categories_menu.rhtml
... ... @@ -4,7 +4,7 @@
4 4 </li>
5 5 <% @environment.display_categories.each do |item| %>
6 6 <li id='category<%= item.display_color %>' <%= 'class="active"' if (@category && (@category.top_ancestor == item)) %> >
7   - <%= (@category && (@category.top_ancestor == item)) ? @category.full_name : item.name %>
  7 + <%= item.name %>
8 8 <ul>
9 9 <% item.children.each do |child| %>
10 10 <li><%= link_to(content_tag('span', child.name), :controller => 'category', :action => 'view', :path => child.explode_path) %></li>
... ...
public/stylesheets/menu.css
... ... @@ -225,7 +225,7 @@ clear: both;
225 225 }
226 226  
227 227 #content {
228   - margin-top: 50px;
  228 + margin-top: 60px;
229 229 }
230 230  
231 231 #header {
... ... @@ -245,3 +245,15 @@ vertical-align: middle !important ;
245 245 padding: 0px 5px 0px 5px !important ;
246 246 text-decoration: underline !important ;
247 247 }
  248 +
  249 +div#category {
  250 + font-size: 16px;
  251 + font-weight: bold;
  252 + background: #f0f0f0;
  253 + text-align: right;
  254 + margin-left: 3px;
  255 + margin-right: 3px;
  256 + margin-top: -3px;
  257 + padding: 2px;
  258 + margin-bottom: 1em;
  259 +}
... ...