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 | 131 | def shortcut_header_links |
132 | 132 | if logged_in? |
133 | 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 | 140 | else |
139 | 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 | 144 | end.join(" ") |
143 | 145 | end |
... | ... | @@ -266,13 +268,13 @@ module ApplicationHelper |
266 | 268 | doc = Article.find_all_by_slug(_('accessibility')).select do |a| |
267 | 269 | a.full_path.split(/\//).shift == 'noosfero' |
268 | 270 | end[0] |
269 | - link_to_document doc, _('Accessibility') if doc | |
271 | + link_to_document doc, _('Accessibility'), :id => 'icon_accessibility' if doc | |
270 | 272 | end |
271 | 273 | |
272 | 274 | def search_box |
273 | 275 | [form_tag( :controller => 'search', :action => 'index'), |
274 | - text_field_tag( 'query', _(' '), :id => "input_search"), | |
275 | 276 | submit_tag(_('Search'), :id => 'button_search'), |
277 | + text_field_tag( 'query', _(' '), :id => "input_search"), | |
276 | 278 | '</form>', |
277 | 279 | observe_field('input_search', :function => "element.value=''", :on => :focus) |
278 | 280 | ].join("\n") | ... | ... |
app/views/layouts/application.rhtml
... | ... | @@ -30,12 +30,12 @@ |
30 | 30 | |
31 | 31 | <div id="wrap" class='category<%= category_color %>'> |
32 | 32 | <div id='noosfero_bar' class='category<%= category_color %>'> |
33 | - <div id='top_bar' class='category<%= category_color %>'> | |
34 | 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 | 35 | <%= shortcut_header_links %> |
37 | 36 | </div><!-- accessibility_menu --> |
38 | - <div id='path_category'> | |
37 | + <div id='top_bar' class='category<%= category_color %>'> | |
38 | + <div id='path_category'> | |
39 | 39 | <% if @category %> |
40 | 40 | <%= @category.full_name %> |
41 | 41 | <% else @category %> | ... | ... |
public/designs/templates/default/stylesheets/contentblocks.css
1.36 KB
public/images/icons-bar/login.png
956 Bytes
public/stylesheets/menu.css
1 | 1 | /* Geral Bar */ |
2 | 2 | #noosfero_bar { |
3 | 3 | position: fixed; |
4 | + width: 100%; | |
4 | 5 | height: 26px; |
5 | 6 | background: url("../images/bg_bgmenu.png") repeat-x; |
6 | 7 | padding: 0px; |
... | ... | @@ -49,31 +50,22 @@ color: #ffffff; |
49 | 50 | /* Menu Itens Accessibility */ |
50 | 51 | |
51 | 52 | #accessibility_menu { |
52 | - float: right; | |
53 | - margin-right: 5px; | |
53 | + position: absolute; | |
54 | + right: 10px; | |
55 | + width: 200px; | |
54 | 56 | text-align: right; |
55 | 57 | font-family: Verdana, Arial, Serif-sans; |
56 | 58 | font-size: 9px; |
57 | 59 | color: #dfdfdf; |
58 | 60 | font-weight: normal; |
61 | + z-index: 999; | |
59 | 62 | } |
60 | 63 | |
61 | -/* Images Icons Mini-BAR | |
64 | +/* Images Icons Mini-BAR */ | |
62 | 65 | #accessibility_menu span { |
63 | 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 | 69 | #accessibility_menu a#icon_go_content { |
78 | 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 | 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 | 89 | #accessibility_menu a#icon_accessibility { |
94 | 90 | background-image: url('../images/icons-bar/accessibility.png'); |
95 | 91 | } |
96 | -*/ | |
97 | 92 | |
98 | 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 | 103 | text-decoration: none; |
105 | 104 | } |
106 | 105 | |
... | ... | @@ -121,13 +120,13 @@ background-image: url('../images/icons-bar/accessibility.png'); |
121 | 120 | height: 40px; |
122 | 121 | vertical-align: middle; |
123 | 122 | line-height: 40px; |
124 | - z-index: 996; | |
123 | + z-index: 995; | |
125 | 124 | } |
126 | 125 | |
127 | 126 | #navigation_bar ul { |
128 | 127 | padding: 0px !important; |
129 | 128 | margin: 0px !important; |
130 | - z-index: 997; | |
129 | + z-index: 996; | |
131 | 130 | } |
132 | 131 | |
133 | 132 | #navigation_bar ul li { |
... | ... | @@ -159,7 +158,7 @@ padding: 0px; |
159 | 158 | width: 100%; |
160 | 159 | left: 0px; |
161 | 160 | display: none; |
162 | -z-index: 998; | |
161 | +z-index: 997; | |
163 | 162 | } |
164 | 163 | |
165 | 164 | #navigation_bar ul li ul li { |
... | ... | @@ -181,10 +180,10 @@ position: absolute; |
181 | 180 | right: 0px; |
182 | 181 | margin: 0px; |
183 | 182 | width: 200px; |
184 | -height: 33px; | |
183 | +height: 30px; | |
185 | 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 | 189 | #input_search { | ... | ... |