Commit 4c828ae27a4cbce88ff9cef92e3a001d88477ebb
1 parent
ddbcecf8
Exists in
master
and in
29 other branches
ActionItem93: several changes to layout
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@929 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
51 additions
and
130 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -117,20 +117,13 @@ module ApplicationHelper | @@ -117,20 +117,13 @@ module ApplicationHelper | ||
117 | ( link_to_homepage( _('My account') )), | 117 | ( link_to_homepage( _('My account') )), |
118 | ( link_to_myprofile _('My Enterprises'), {:controller => 'membership_editor'} ), | 118 | ( link_to_myprofile _('My Enterprises'), {:controller => 'membership_editor'} ), |
119 | ( link_to(_('Admin'), { :controller => 'admin_panel' }) if current_user.person.is_admin?), | 119 | ( link_to(_('Admin'), { :controller => 'admin_panel' }) if current_user.person.is_admin?), |
120 | - ( link_to_document (about_document), _('About') if about_document ), | ||
121 | ].join("\n") | 120 | ].join("\n") |
122 | content_tag('span', links, :id => 'user_links') | 121 | content_tag('span', links, :id => 'user_links') |
123 | end | 122 | end |
124 | 123 | ||
125 | - def about_document | ||
126 | - Article.find_all_by_slug(_('about')).select do |a| | ||
127 | - a.full_path.split(/\//).shift == 'noosfero' | ||
128 | - end[0] | ||
129 | - end | ||
130 | - | ||
131 | def shortcut_header_links | 124 | def shortcut_header_links |
132 | if logged_in? | 125 | if logged_in? |
133 | - [ accessibility_link, | 126 | + [ |
134 | ( link_to_homepage( content_tag('span', _('My account')),nil, { :id => 'icon_go_home'} ) ), | 127 | ( link_to_homepage( content_tag('span', _('My account')),nil, { :id => 'icon_go_home'} ) ), |
135 | # MUDAR, O ID acima deve ser no Link <a id=... | 128 | # 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. | 129 | # O ID icon_accessibility tambem tem que aparcer e testei o link nao ta funcionado. |
@@ -138,16 +131,12 @@ module ApplicationHelper | @@ -138,16 +131,12 @@ module ApplicationHelper | ||
138 | ( link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout', :method => 'post'}, :id => 'icon_logout'), | 131 | ( link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout', :method => 'post'}, :id => 'icon_logout'), |
139 | ] | 132 | ] |
140 | else | 133 | else |
141 | - [ accessibility_link, | 134 | + [ |
142 | ( link_to content_tag('span', _('Login')), { :controller => 'account', :action => 'login' }, :id => 'icon_login' ), | 135 | ( link_to content_tag('span', _('Login')), { :controller => 'account', :action => 'login' }, :id => 'icon_login' ), |
143 | ] | 136 | ] |
144 | end.join(" ") | 137 | end.join(" ") |
145 | end | 138 | end |
146 | 139 | ||
147 | - def header | ||
148 | - login_or_register_or_logout | ||
149 | - end | ||
150 | - | ||
151 | def login_or_register_or_logout | 140 | def login_or_register_or_logout |
152 | if logged_in? | 141 | if logged_in? |
153 | user_links + " " + logout_box | 142 | user_links + " " + logout_box |
@@ -217,12 +206,6 @@ module ApplicationHelper | @@ -217,12 +206,6 @@ module ApplicationHelper | ||
217 | ] | 206 | ] |
218 | end | 207 | end |
219 | 208 | ||
220 | - def about_links | ||
221 | - links = [ | ||
222 | - [(link_to _('Report bug'), 'http://www.colivre.coop.br/Noosfero/BugItem')], | ||
223 | - ] | ||
224 | - end | ||
225 | - | ||
226 | def design_links | 209 | def design_links |
227 | links = [ | 210 | links = [ |
228 | [(link_to _('Change template'), :controller => 'profile_editor', :action => 'design_editor_change_template')], | 211 | [(link_to _('Change template'), :controller => 'profile_editor', :action => 'design_editor_change_template')], |
@@ -231,46 +214,6 @@ module ApplicationHelper | @@ -231,46 +214,6 @@ module ApplicationHelper | ||
231 | ] | 214 | ] |
232 | end | 215 | end |
233 | 216 | ||
234 | - #FIXME: about_links should be shown even if the user isn't logged in | ||
235 | - def user_options | ||
236 | - return [] unless logged_in? | ||
237 | - profile = Profile.find_by_identifier(params[:profile]) | ||
238 | - case params[:controller] | ||
239 | - when 'admin_panel' | ||
240 | - admin_links | ||
241 | - when 'membership_editor' | ||
242 | - membership_links | ||
243 | - when 'profile_editor' | ||
244 | - if profile.kind_of?(Enterprise) && params[:action] == 'index' | ||
245 | - enterprise_links | ||
246 | - elsif profile.kind_of?(Person) && params[:action] == 'index' | ||
247 | - myprofile_links | ||
248 | - elsif params[:action] == 'design_editor' | ||
249 | - design_links | ||
250 | - else | ||
251 | - [] | ||
252 | - end | ||
253 | - when 'content_viewer' | ||
254 | - if params[:profile] == 'noosfero' && params[:page][0] == 'about' | ||
255 | - about_links | ||
256 | - else | ||
257 | - person_links | ||
258 | - end | ||
259 | - else | ||
260 | - [] | ||
261 | - end.map{|l| link_if_permitted(l[0], l[1], l[2]) } | ||
262 | - end | ||
263 | - | ||
264 | -# def user_options | ||
265 | -# end | ||
266 | - | ||
267 | - def accessibility_link | ||
268 | - doc = Article.find_all_by_slug(_('accessibility')).select do |a| | ||
269 | - a.full_path.split(/\//).shift == 'noosfero' | ||
270 | - end[0] | ||
271 | - link_to_document doc, _('Accessibility'), :id => 'icon_accessibility' if doc | ||
272 | - end | ||
273 | - | ||
274 | def search_box | 217 | def search_box |
275 | [form_tag( :controller => 'search', :action => 'index'), | 218 | [form_tag( :controller => 'search', :action => 'index'), |
276 | submit_tag(_('Search'), :id => 'button_search'), | 219 | submit_tag(_('Search'), :id => 'button_search'), |
app/views/layouts/application.rhtml
@@ -2,20 +2,19 @@ | @@ -2,20 +2,19 @@ | ||
2 | <head> | 2 | <head> |
3 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | 3 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
4 | <title> | 4 | <title> |
5 | - <% if @category %> | ||
6 | - Noosfero → <%= @category.full_name %> | ||
7 | - <% else %> | ||
8 | - Noosfero | ||
9 | - <% end %> | 5 | + <% if @category %> |
6 | + Noosfero → <%= @category.full_name %> | ||
7 | + <% else %> | ||
8 | + Noosfero | ||
9 | + <% end %> | ||
10 | </title> | 10 | </title> |
11 | - <meta name="description" content="FIXME: Descriptions of Noosfero" /> | ||
12 | - <meta name="keywords" content="Noosfero, Community, Open Source" /> | 11 | + <meta name="description" content="FIXME: Descriptions of Noosfero" /> |
12 | + <meta name="keywords" content="Noosfero, Community, Open Source" /> | ||
13 | <%= design_all_header_tags %> | 13 | <%= design_all_header_tags %> |
14 | <%= stylesheet_link_tag 'common' %> | 14 | <%= stylesheet_link_tag 'common' %> |
15 | <%= stylesheet_link_tag 'help' %> | 15 | <%= stylesheet_link_tag 'help' %> |
16 | <%= stylesheet_link_tag 'menu' %> | 16 | <%= stylesheet_link_tag 'menu' %> |
17 | <%= javascript_include_tag 'menu' %> | 17 | <%= javascript_include_tag 'menu' %> |
18 | - | ||
19 | <%# cms stuff %> | 18 | <%# cms stuff %> |
20 | <% if params[:controller] == 'cms' %> | 19 | <% if params[:controller] == 'cms' %> |
21 | <%= javascript_include_tag 'cms' %> | 20 | <%= javascript_include_tag 'cms' %> |
@@ -34,22 +33,21 @@ | @@ -34,22 +33,21 @@ | ||
34 | <%= image_tag 'loading.gif', :id => 'spinner', :style => "display:none; float:right;", :alt => _('Image for Loading...') %> | 33 | <%= image_tag 'loading.gif', :id => 'spinner', :style => "display:none; float:right;", :alt => _('Image for Loading...') %> |
35 | 34 | ||
36 | <div id="wrap" class='category<%= category_color %>'> | 35 | <div id="wrap" class='category<%= category_color %>'> |
36 | + | ||
37 | <div id='noosfero_bar' class='category<%= category_color %>'> | 37 | <div id='noosfero_bar' class='category<%= category_color %>'> |
38 | <div id='accessibility_menu'> | 38 | <div id='accessibility_menu'> |
39 | - <a href='#content' id='icon_go_content'><span><%= _('Go Content') %></span></a> | ||
40 | - <%= shortcut_header_links %> | 39 | + <a href='#content' id='icon_go_content'><span><%= _('Go to content') %></span></a> |
40 | + <%= shortcut_header_links %> | ||
41 | </div><!-- accessibility_menu --> | 41 | </div><!-- accessibility_menu --> |
42 | - <div id='top_bar' class='category<%= category_color %>'> | ||
43 | - <div id='path_category'> | ||
44 | - <% if @category %> | ||
45 | - <%= @category.full_name %> | ||
46 | - <% else @category %> | ||
47 | - <div id='user_options'> | ||
48 | - <%= user_options.join(' ') %> | ||
49 | - </div><!-- id='user_options' --> | ||
50 | - <% end %> | 42 | + |
43 | + <div id='top_bar' class='category<%= category_color %>'> | ||
44 | + <div id='path_category'> | ||
45 | + <% if @category %> | ||
46 | + <%= @category.full_name %> | ||
47 | + <% end %> | ||
48 | + </div> | ||
51 | </div> | 49 | </div> |
52 | - </div> | 50 | + |
53 | <div id='search_box'> | 51 | <div id='search_box'> |
54 | <%= search_box %> | 52 | <%= search_box %> |
55 | </div><!-- id='search_box' --> | 53 | </div><!-- id='search_box' --> |
@@ -61,35 +59,35 @@ | @@ -61,35 +59,35 @@ | ||
61 | <script type="text/javascript"> | 59 | <script type="text/javascript"> |
62 | prepareMenu('navigation_bar', { timeout: 10 }); | 60 | prepareMenu('navigation_bar', { timeout: 10 }); |
63 | </script> | 61 | </script> |
64 | - | ||
65 | - | ||
66 | </div><!-- id="noosfero_bar" --> | 62 | </div><!-- id="noosfero_bar" --> |
67 | - <div id='frame'><!-- Frame que envolve toda pagina de um usuario --> | ||
68 | - <div id='header'><!-- Abaixo um cabeçalho especifico para a pagina de usuario. --> | ||
69 | - </div><!-- id='header' --> | ||
70 | - <div id='content'> | ||
71 | - <!-- <a name='main_content'/></a> --> | ||
72 | - <!-- Aqui entra um conteudo tipo o titulo da pagina do usuário e os botoes do comatose? --> | ||
73 | - <div id='header_content'> | ||
74 | - </div> | ||
75 | 63 | ||
76 | - <% if params[:controller] == 'cms' %> | ||
77 | - <div id='boxes'><a name="content"> </a> | ||
78 | - <%= yield %> | 64 | + <div id='frame'><!-- Frame que envolve toda pagina de um usuario --> |
65 | + <div id='header'> | ||
66 | + <!-- Abaixo um cabeçalho especifico para a pagina de usuario. --> | ||
67 | + </div><!-- id='header' --> | ||
68 | + <div id='content'> | ||
69 | + <!-- <a name='main_content'/></a> --> | ||
70 | + <!-- Aqui entra um conteudo tipo o titulo da pagina do usuário e os botoes do comatose? --> | ||
71 | + <div id='header_content'> | ||
79 | </div> | 72 | </div> |
80 | - <% else %> | ||
81 | - <%= design_display(yield) %> | ||
82 | - <% end %> | ||
83 | - </div><!-- id="content" --> | ||
84 | - <div id="footer_content"><!-- Rodape do onteudo --> | ||
85 | - </div><!-- id="footer_content" --> | ||
86 | - </div><!-- id="frame" --> | 73 | + |
74 | + <% if params[:controller] == 'cms' %> | ||
75 | + <div id='boxes'><a name="content"> </a> | ||
76 | + <%= yield %> | ||
77 | + </div> | ||
78 | + <% else %> | ||
79 | + <%= design_display(yield) %> | ||
80 | + <% end %> | ||
81 | + </div><!-- id="content" --> | ||
82 | + <div id="footer_content"><!-- Rodape do onteudo --> | ||
83 | + </div><!-- id="footer_content" --> | ||
84 | + </div><!-- id="frame" --> | ||
87 | </div><!-- id="wrap" --> | 85 | </div><!-- id="wrap" --> |
88 | 86 | ||
89 | - <div id="footer"> | ||
90 | - <!-- <a name='footer'/></a> --> | ||
91 | - <%= localist_menu %> | ||
92 | - <%= footer %> | ||
93 | - </div><!-- id="footer" --> | 87 | + <div id="footer"> |
88 | + <!-- <a name='footer'/></a> --> | ||
89 | + <%= localist_menu %> | ||
90 | + <%= footer %> | ||
91 | + </div><!-- id="footer" --> | ||
94 | </body> | 92 | </body> |
95 | </html> | 93 | </html> |
app/views/shared/categories_menu.rhtml
1 | <ul> | 1 | <ul> |
2 | - <li id='category' <%= 'class="active"' unless @category %> > | ||
3 | - <%= Noosfero::PROJECT.capitalize %> | ||
4 | - <ul> | ||
5 | - <li><%= link_to _('Home'), :controller => 'home' %> <%= header %></li> | ||
6 | - </ul> | ||
7 | - </li> | ||
8 | <% @environment.display_categories.each do |item| %> | 2 | <% @environment.display_categories.each do |item| %> |
9 | <li id='category<%= item.display_color %>' <%= 'class="active"' if (@category && (@category.top_ancestor == item)) %> > | 3 | <li id='category<%= item.display_color %>' <%= 'class="active"' if (@category && (@category.top_ancestor == item)) %> > |
10 | <%= item.name %> | 4 | <%= item.name %> |
public/stylesheets/menu.css
@@ -51,7 +51,7 @@ color: #ffffff; | @@ -51,7 +51,7 @@ color: #ffffff; | ||
51 | #accessibility_menu { | 51 | #accessibility_menu { |
52 | position: absolute; | 52 | position: absolute; |
53 | right: 10px; | 53 | right: 10px; |
54 | - width: 200px; | 54 | + width: 300px; |
55 | text-align: right; | 55 | text-align: right; |
56 | font-family: Verdana, Arial, Serif-sans; | 56 | font-family: Verdana, Arial, Serif-sans; |
57 | font-size: 9px; | 57 | font-size: 9px; |
@@ -62,7 +62,6 @@ color: #ffffff; | @@ -62,7 +62,6 @@ color: #ffffff; | ||
62 | 62 | ||
63 | /* Images Icons Mini-BAR */ | 63 | /* Images Icons Mini-BAR */ |
64 | #accessibility_menu span { | 64 | #accessibility_menu span { |
65 | -display: none; | ||
66 | } | 65 | } |
67 | 66 | ||
68 | #accessibility_menu a#icon_go_content { | 67 | #accessibility_menu a#icon_go_content { |
@@ -90,30 +89,17 @@ background-image: url('../images/icons-bar/accessibility.png'); | @@ -90,30 +89,17 @@ background-image: url('../images/icons-bar/accessibility.png'); | ||
90 | } | 89 | } |
91 | 90 | ||
92 | #accessibility_menu a { | 91 | #accessibility_menu a { |
93 | - padding: 0px; | ||
94 | - margin: 0px; | ||
95 | - margin-right: 5px; | 92 | + color: white; |
93 | + font-weight: bold; | ||
94 | + padding-left: 28px; | ||
95 | + height: 24px; | ||
96 | display: block; | 96 | display: block; |
97 | float: right; | 97 | float: right; |
98 | - width: 24px; | ||
99 | - height: 24px; | ||
100 | - background-position: 0px 0px; | ||
101 | background-repeat: no-repeat; | 98 | background-repeat: no-repeat; |
102 | - text-decoration: none; | 99 | + padding-top: 4px; |
103 | } | 100 | } |
104 | 101 | ||
105 | #accessibility_menu a:hover span { | 102 | #accessibility_menu a:hover span { |
106 | - display: block; | ||
107 | - position: absolute; | ||
108 | - top: 1px; | ||
109 | - right: 200px; | ||
110 | - width: 100px; | ||
111 | - text-align: right; | ||
112 | - background: url("../images/ico_enterlink.gif") no-repeat; | ||
113 | - background-position: 106px 6px; | ||
114 | - color: #ffffff; | ||
115 | - font-weight: bold; | ||
116 | - padding-right: 8px; | ||
117 | } | 103 | } |
118 | 104 | ||
119 | 105 |