Commit a4063378c6ba1b1edd79baec9aa4534fea061169
1 parent
e17d9128
Exists in
master
and in
29 other branches
Adding link to documentation in the default theme
Also enhanced the visual of the "not found" and "access denied" screens
Showing
11 changed files
with
41 additions
and
47 deletions
Show diff stats
app/helpers/boxes_helper.rb
... | ... | @@ -104,6 +104,11 @@ module BoxesHelper |
104 | 104 | (1..8).to_a.reverse.inject(content) { |acc,n| content_tag('div', acc, :id => 'main-content-wrapper-' + n.to_s) } |
105 | 105 | end |
106 | 106 | |
107 | + def noosfero_wrap(&block) | |
108 | + text = capture(&block) | |
109 | + concat(wrap_main_content(text), block.binding) | |
110 | + end | |
111 | + | |
107 | 112 | def extract_block_content(content) |
108 | 113 | case content |
109 | 114 | when Hash | ... | ... |
app/views/shared/access_denied.rhtml
1 | 1 | <div id='access-denied'> |
2 | 2 | |
3 | - <h1> <%= @title || _('Access denied') %> </h1> | |
3 | + <% noosfero_wrap do %> | |
4 | + <h1> <%= @title || _('Access denied') %> </h1> | |
4 | 5 | |
5 | - <% unless @message.nil? %> | |
6 | - <p><%= @message %></p> | |
7 | - <% else %> | |
8 | - <p><%= _('You are not allowed to view this page.') %></p> | |
9 | - <p><%= _("If you are supposed to have access to this area, you'll probably want to talk to the people responsible and ask them to give you access.") %></p> | |
10 | - <% end %> | |
6 | + <% unless @message.nil? %> | |
7 | + <p><%= @message %></p> | |
8 | + <% else %> | |
9 | + <p><%= _('You are not allowed to view this page.') %></p> | |
10 | + <p><%= _("If you are supposed to have access to this area, you'll probably want to talk to the people responsible and ask them to give you access.") %></p> | |
11 | + <% end %> | |
11 | 12 | |
12 | - <hr/> | |
13 | + <% button_bar do %> | |
14 | + <%= button :back, _('Go back'), :back %> | |
15 | + <%= button :home, _('Go to the site home page'), :controller => 'home' %> | |
16 | + <% end %> | |
13 | 17 | |
14 | - <% button_bar do %> | |
15 | - <%= button :back, _('Go back'), :back %> | |
16 | - <%= button :home, _('Go to the site home page'), :controller => 'home' %> | |
17 | 18 | <% end %> |
18 | 19 | |
19 | 20 | </div> | ... | ... |
app/views/shared/not_found.rhtml
1 | 1 | <div id='not-found'> |
2 | - <h1><%= _('There is no such page: %s') % (content_tag('tt', @path)) %></h1> | |
3 | - <p> | |
4 | - <%= _('You may have clicked an expired link or mistyped the address.') %> | |
5 | - <%= _('If you clicked a link that was in another site, or was given to you by someone else, it would be nice if you tell them that their link is not valid anymore.') %> | |
6 | - </p> | |
7 | - <% button_bar do %> | |
8 | - <%= button :back, _('Go back'), :back %> | |
9 | - <%= button :home, _('Go to %s home page') % environment.name, :controller => 'home' %> | |
2 | + <% noosfero_wrap do %> | |
3 | + <h1><%= _('There is no such page: %s') % (content_tag('tt', @path)) %></h1> | |
4 | + <p> | |
5 | + <%= _('You may have clicked an expired link or mistyped the address.') %> | |
6 | + <%= _('If you clicked a link that was in another site, or was given to you by someone else, it would be nice if you tell them that their link is not valid anymore.') %> | |
7 | + </p> | |
8 | + <% button_bar do %> | |
9 | + <%= button :back, _('Go back'), :back %> | |
10 | + <%= button :home, _('Go to %s home page') % environment.name, :controller => 'home' %> | |
11 | + <% end %> | |
10 | 12 | <% end %> |
11 | 13 | </div> | ... | ... |
public/designs/themes/base/footer.rhtml
1 | 1 | <div id="footer-links"> |
2 | + <a id="link-to-doc" class='icon-help'><%= link_to _('Documentation'), '/doc' %></a> | |
2 | 3 | </div><!-- end id="footer-links" --> |
3 | 4 | <div id="copyright"> |
4 | 5 | <p id='noosfero-license'> |
... | ... | @@ -6,7 +7,5 @@ |
6 | 7 | href="http://www.noosfero.org/" id='link-noosfero'>Noosfero</a>, licensed under |
7 | 8 | <a href="http://www.gnu.org/licenses/agpl.html">GNU Affero General Public |
8 | 9 | License</a>, version 3 or above. </p> |
9 | - <!-- Desenvolvido com | |
10 | - <a href="http://noosfero.com.br" | |
11 | - title="FLOSS for Social!">Noosfero</a--> | |
12 | 10 | </div><!-- end id="copyright" --> |
11 | +<%= language_chooser %> | ... | ... |
public/designs/themes/base/layout.css
... | ... | @@ -236,7 +236,7 @@ body, th, td, input { |
236 | 236 | padding: 10px 20px; |
237 | 237 | } |
238 | 238 | |
239 | -#content .main-block h1 { | |
239 | +#content .main-block h1, #not-found h1, #access-denied h1 { | |
240 | 240 | font-variant: small-caps; |
241 | 241 | color: #555753; |
242 | 242 | font-size: 16px; |
... | ... | @@ -281,8 +281,12 @@ body, th, td, input { |
281 | 281 | text-align: left; |
282 | 282 | float: left; |
283 | 283 | } |
284 | -#footer-links a { | |
285 | - margin-right: 8px; | |
284 | + | |
285 | +#link-to-doc { | |
286 | + background-repeat: no-repeat; | |
287 | + padding-left: 20px; | |
288 | + padding-top: 2px; | |
289 | + padding-bottom: 2px; | |
286 | 290 | } |
287 | 291 | |
288 | 292 | #copyright { | ... | ... |
... | ... | @@ -0,0 +1,3 @@ |
1 | +<li><a href="/assets/enterprises"><span class='icon-menu-enterprise'><%= _('Enterprises') %></span></a></li> | |
2 | +<li><a href="/assets/products"><span class='icon-menu-product'><%= _('Products') %></span></a></li> | |
3 | +<li><a href="/assets/events"><span class='icon-menu-events'><%= _('Events') %></span></a></li> | ... | ... |
public/designs/themes/noosfero/footer.rhtml
... | ... | @@ -1,10 +0,0 @@ |
1 | -<div id="footer-links"> | |
2 | -</div><!-- end id="footer-links" --> | |
3 | -<div id="copyright"> | |
4 | - <p id='noosfero-license'> | |
5 | - Powered by <a | |
6 | - href="http://www.noosfero.org/" id='link-noosfero'>Noosfero</a>, licensed under | |
7 | - <a href="http://www.gnu.org/licenses/agpl.html">GNU Affero General Public | |
8 | - License</a>, version 3 or above. </p> | |
9 | -</div><!-- end id="copyright" --> | |
10 | -<%= language_chooser %> |
public/designs/themes/noosfero/navigation.rhtml
... | ... | @@ -1,3 +0,0 @@ |
1 | -<li><a href="/assets/enterprises"><span class='icon-menu-enterprise'><%= _('Enterprises') %></span></a></li> | |
2 | -<li><a href="/assets/products"><span class='icon-menu-product'><%= _('Products') %></span></a></li> | |
3 | -<li><a href="/assets/events"><span class='icon-menu-events'><%= _('Events') %></span></a></li> |
public/stylesheets/common.css
... | ... | @@ -476,20 +476,11 @@ div.pending-tasks { |
476 | 476 | |
477 | 477 | #content #not-found, |
478 | 478 | #content #access-denied { |
479 | - padding: 20px; | |
480 | - margin: 20px; | |
481 | - border: 1px solid #DDD; | |
482 | 479 | -moz-border-radius: 6px; |
483 | 480 | margin-left: 20%; |
484 | 481 | margin-right: 20%; |
485 | 482 | } |
486 | 483 | |
487 | -#content #not-found h1, | |
488 | -#content #access-denied h1 { | |
489 | - text-align: left; | |
490 | - margin-top: 0px; | |
491 | -} | |
492 | - | |
493 | 484 | #content #not-found p, |
494 | 485 | #content #access-denied p { |
495 | 486 | text-align: justify; | ... | ... |