Commit 4369b3864ea277abbe3b5122be26a4b68d145d7e
1 parent
2c1493ff
Exists in
master
and in
28 other branches
ActionItem114: Icon navegation bar
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@819 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
7 changed files
with
42 additions
and
35 deletions
Show diff stats
app/helpers/application_helper.rb
| @@ -131,13 +131,15 @@ module ApplicationHelper | @@ -131,13 +131,15 @@ module ApplicationHelper | ||
| 131 | def shortcut_header_links | 131 | def shortcut_header_links |
| 132 | if logged_in? | 132 | if logged_in? |
| 133 | [ accessibility_link, | 133 | [ accessibility_link, |
| 134 | - ( link_to_homepage( content_tag('span', _('My account')) ) ), | ||
| 135 | - ( link_to( _('Admin'), { :controller => 'admin_panel' }) if current_user.person.is_admin?), | ||
| 136 | - ( link_to content_tag('span', _('Logout')), :controller => 'account', :action => 'logout', :method => 'post'), | 134 | + ( link_to_homepage( content_tag('span', _('My account'), { :id => 'icon_go_home'} )) ), |
| 135 | + # MUDAR, O ID acima deve ser no Link <a id=... | ||
| 136 | + # O ID icon_accessibility tambem tem que aparcer e testei o link nao ta funcionado. | ||
| 137 | + ( link_to content_tag('span', _('Admin')), { :controller => 'admin_panel' }, :id => 'icon_admin' if current_user.person.is_admin?), | ||
| 138 | + ( link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout', :method => 'post'}, :id => 'icon_logout'), | ||
| 137 | ] | 139 | ] |
| 138 | else | 140 | else |
| 139 | [ accessibility_link, | 141 | [ accessibility_link, |
| 140 | - ( link_to content_tag('span', _('Login')), :controller => 'account', :action => 'login'), | 142 | + ( link_to content_tag('span', _('Login')), { :controller => 'account', :action => 'login' }, :id => 'icon_login' ), |
| 141 | ] | 143 | ] |
| 142 | end.join(" ") | 144 | end.join(" ") |
| 143 | end | 145 | end |
| @@ -266,13 +268,13 @@ module ApplicationHelper | @@ -266,13 +268,13 @@ module ApplicationHelper | ||
| 266 | doc = Article.find_all_by_slug(_('accessibility')).select do |a| | 268 | doc = Article.find_all_by_slug(_('accessibility')).select do |a| |
| 267 | a.full_path.split(/\//).shift == 'noosfero' | 269 | a.full_path.split(/\//).shift == 'noosfero' |
| 268 | end[0] | 270 | end[0] |
| 269 | - link_to_document doc, _('Accessibility') if doc | 271 | + link_to_document doc, _('Accessibility'), :id => 'icon_accessibility' if doc |
| 270 | end | 272 | end |
| 271 | 273 | ||
| 272 | def search_box | 274 | def search_box |
| 273 | [form_tag( :controller => 'search', :action => 'index'), | 275 | [form_tag( :controller => 'search', :action => 'index'), |
| 274 | - text_field_tag( 'query', _(' '), :id => "input_search"), | ||
| 275 | submit_tag(_('Search'), :id => 'button_search'), | 276 | submit_tag(_('Search'), :id => 'button_search'), |
| 277 | + text_field_tag( 'query', _(' '), :id => "input_search"), | ||
| 276 | '</form>', | 278 | '</form>', |
| 277 | observe_field('input_search', :function => "element.value=''", :on => :focus) | 279 | observe_field('input_search', :function => "element.value=''", :on => :focus) |
| 278 | ].join("\n") | 280 | ].join("\n") |
app/views/layouts/application.rhtml
| @@ -30,12 +30,12 @@ | @@ -30,12 +30,12 @@ | ||
| 30 | 30 | ||
| 31 | <div id="wrap" class='category<%= category_color %>'> | 31 | <div id="wrap" class='category<%= category_color %>'> |
| 32 | <div id='noosfero_bar' class='category<%= category_color %>'> | 32 | <div id='noosfero_bar' class='category<%= category_color %>'> |
| 33 | - <div id='top_bar' class='category<%= category_color %>'> | ||
| 34 | <div id='accessibility_menu'> | 33 | <div id='accessibility_menu'> |
| 35 | - <a href='#content'><span><%= _('Go Content') %></span></a> | 34 | + <a href='#content' id='icon_go_content'><span><%= _('Go Content') %></span></a> |
| 36 | <%= shortcut_header_links %> | 35 | <%= shortcut_header_links %> |
| 37 | </div><!-- accessibility_menu --> | 36 | </div><!-- accessibility_menu --> |
| 38 | - <div id='path_category'> | 37 | + <div id='top_bar' class='category<%= category_color %>'> |
| 38 | + <div id='path_category'> | ||
| 39 | <% if @category %> | 39 | <% if @category %> |
| 40 | <%= @category.full_name %> | 40 | <%= @category.full_name %> |
| 41 | <% else @category %> | 41 | <% else @category %> |
public/designs/templates/default/stylesheets/contentblocks.css
| @@ -77,6 +77,12 @@ clear: both; | @@ -77,6 +77,12 @@ clear: both; | ||
| 77 | 77 | ||
| 78 | /* Artigos */ | 78 | /* Artigos */ |
| 79 | 79 | ||
| 80 | +div.recentdocumentsblock ul { | ||
| 81 | +margin: 0px; | ||
| 82 | +padding: 0px; | ||
| 83 | +list-style: none; | ||
| 84 | +} | ||
| 85 | + | ||
| 80 | div.recentdocumentsblock div.block_content li a { | 86 | div.recentdocumentsblock div.block_content li a { |
| 81 | text-decoration: none; | 87 | text-decoration: none; |
| 82 | color: #545454; | 88 | color: #545454; |
1.36 KB
public/images/icons-bar/login.png
956 Bytes
public/stylesheets/menu.css
| 1 | /* Geral Bar */ | 1 | /* Geral Bar */ |
| 2 | #noosfero_bar { | 2 | #noosfero_bar { |
| 3 | position: fixed; | 3 | position: fixed; |
| 4 | + width: 100%; | ||
| 4 | height: 26px; | 5 | height: 26px; |
| 5 | background: url("../images/bg_bgmenu.png") repeat-x; | 6 | background: url("../images/bg_bgmenu.png") repeat-x; |
| 6 | padding: 0px; | 7 | padding: 0px; |
| @@ -49,31 +50,22 @@ color: #ffffff; | @@ -49,31 +50,22 @@ color: #ffffff; | ||
| 49 | /* Menu Itens Accessibility */ | 50 | /* Menu Itens Accessibility */ |
| 50 | 51 | ||
| 51 | #accessibility_menu { | 52 | #accessibility_menu { |
| 52 | - float: right; | ||
| 53 | - margin-right: 5px; | 53 | + position: absolute; |
| 54 | + right: 10px; | ||
| 55 | + width: 200px; | ||
| 54 | text-align: right; | 56 | text-align: right; |
| 55 | font-family: Verdana, Arial, Serif-sans; | 57 | font-family: Verdana, Arial, Serif-sans; |
| 56 | font-size: 9px; | 58 | font-size: 9px; |
| 57 | color: #dfdfdf; | 59 | color: #dfdfdf; |
| 58 | font-weight: normal; | 60 | font-weight: normal; |
| 61 | + z-index: 999; | ||
| 59 | } | 62 | } |
| 60 | 63 | ||
| 61 | -/* Images Icons Mini-BAR | 64 | +/* Images Icons Mini-BAR */ |
| 62 | #accessibility_menu span { | 65 | #accessibility_menu span { |
| 63 | display: none; | 66 | display: none; |
| 64 | } | 67 | } |
| 65 | 68 | ||
| 66 | -#accessibility_menu a { | ||
| 67 | -display: block; | ||
| 68 | -float: right; | ||
| 69 | -padding: 0px !important; | ||
| 70 | -margin: 0px !important; | ||
| 71 | -width: 24px !important; | ||
| 72 | -height: 24px !important; | ||
| 73 | -background-position: top left !important; | ||
| 74 | -background-repeat: no-repeat !important; | ||
| 75 | -} | ||
| 76 | - | ||
| 77 | #accessibility_menu a#icon_go_content { | 69 | #accessibility_menu a#icon_go_content { |
| 78 | background-image: url('../images/icons-bar/go-content.png'); | 70 | background-image: url('../images/icons-bar/go-content.png'); |
| 79 | } | 71 | } |
| @@ -90,17 +82,24 @@ background-image: url('../images/icons-bar/logout.png'); | @@ -90,17 +82,24 @@ background-image: url('../images/icons-bar/logout.png'); | ||
| 90 | background-image: url('../images/icons-bar/login.png'); | 82 | background-image: url('../images/icons-bar/login.png'); |
| 91 | } | 83 | } |
| 92 | 84 | ||
| 85 | +#accessibility_menu a#icon_admin { | ||
| 86 | +background-image: url('../images/icons-bar/admin.png'); | ||
| 87 | +} | ||
| 88 | + | ||
| 93 | #accessibility_menu a#icon_accessibility { | 89 | #accessibility_menu a#icon_accessibility { |
| 94 | background-image: url('../images/icons-bar/accessibility.png'); | 90 | background-image: url('../images/icons-bar/accessibility.png'); |
| 95 | } | 91 | } |
| 96 | -*/ | ||
| 97 | 92 | ||
| 98 | #accessibility_menu a { | 93 | #accessibility_menu a { |
| 99 | - padding-left: 9px; | ||
| 100 | - margin-left: 5px; | ||
| 101 | - background: url("../images/ico_enterlink.gif") no-repeat; | ||
| 102 | - background-position: 0px 6px; | ||
| 103 | - color: #dfdfdf; | 94 | + padding: 0px; |
| 95 | + margin: 0px; | ||
| 96 | + margin-right: 5px; | ||
| 97 | + display: block; | ||
| 98 | + float: right; | ||
| 99 | + width: 24px; | ||
| 100 | + height: 24px; | ||
| 101 | + background-position: 0px 0px; | ||
| 102 | + background-repeat: no-repeat; | ||
| 104 | text-decoration: none; | 103 | text-decoration: none; |
| 105 | } | 104 | } |
| 106 | 105 | ||
| @@ -121,13 +120,13 @@ background-image: url('../images/icons-bar/accessibility.png'); | @@ -121,13 +120,13 @@ background-image: url('../images/icons-bar/accessibility.png'); | ||
| 121 | height: 40px; | 120 | height: 40px; |
| 122 | vertical-align: middle; | 121 | vertical-align: middle; |
| 123 | line-height: 40px; | 122 | line-height: 40px; |
| 124 | - z-index: 996; | 123 | + z-index: 995; |
| 125 | } | 124 | } |
| 126 | 125 | ||
| 127 | #navigation_bar ul { | 126 | #navigation_bar ul { |
| 128 | padding: 0px !important; | 127 | padding: 0px !important; |
| 129 | margin: 0px !important; | 128 | margin: 0px !important; |
| 130 | - z-index: 997; | 129 | + z-index: 996; |
| 131 | } | 130 | } |
| 132 | 131 | ||
| 133 | #navigation_bar ul li { | 132 | #navigation_bar ul li { |
| @@ -159,7 +158,7 @@ padding: 0px; | @@ -159,7 +158,7 @@ padding: 0px; | ||
| 159 | width: 100%; | 158 | width: 100%; |
| 160 | left: 0px; | 159 | left: 0px; |
| 161 | display: none; | 160 | display: none; |
| 162 | -z-index: 998; | 161 | +z-index: 997; |
| 163 | } | 162 | } |
| 164 | 163 | ||
| 165 | #navigation_bar ul li ul li { | 164 | #navigation_bar ul li ul li { |
| @@ -181,10 +180,10 @@ position: absolute; | @@ -181,10 +180,10 @@ position: absolute; | ||
| 181 | right: 0px; | 180 | right: 0px; |
| 182 | margin: 0px; | 181 | margin: 0px; |
| 183 | width: 200px; | 182 | width: 200px; |
| 184 | -height: 33px; | 183 | +height: 30px; |
| 185 | padding-top: 5px; | 184 | padding-top: 5px; |
| 186 | -padding-left: 15px; | ||
| 187 | -z-index: 999; | 185 | +padding-left: 10px; |
| 186 | +z-index: 998; | ||
| 188 | } | 187 | } |
| 189 | 188 | ||
| 190 | #input_search { | 189 | #input_search { |