Commit 4edc9cf26e81b96e2b9639a1f8d00653cdbb560a
1 parent
d6be7e30
Exists in
master
and in
29 other branches
ActionItem152: load the controller's css
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1249 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
12 additions
and
3 deletions
Show diff stats
app/views/layouts/application.rhtml
... | ... | @@ -18,6 +18,11 @@ |
18 | 18 | <%= stylesheet_link_tag 'blocks' %> |
19 | 19 | <%= stylesheet_link_tag 'forms' %> |
20 | 20 | <%= stylesheet_link_tag 'login-box' %> |
21 | + <%= | |
22 | + # Load the controller's css file if it exists: | |
23 | + css = "controller_"+ @controller.controller_name() +".css" | |
24 | + stylesheet_link_tag( css ) if File.exists?( "public/stylesheets/"+css ) | |
25 | + %> | |
21 | 26 | |
22 | 27 | <%# FIXME %> |
23 | 28 | <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %> |
... | ... | @@ -32,7 +37,11 @@ |
32 | 37 | <% end %> |
33 | 38 | </head> |
34 | 39 | |
35 | - <body class='noosfero category<%= category_color %>' onload='noosfero_init();'> | |
40 | + <body class='noosfero category<%= category_color %><%= | |
41 | + # Identify the current controller and action for the CSS: | |
42 | + " controller_"+ @controller.controller_name() + | |
43 | + " action_"+ @controller.controller_name() +"_"+ @controller.action_name() | |
44 | + %>' onload='noosfero_init();'> | |
36 | 45 | |
37 | 46 | <% unless flash[:notice].nil? %> |
38 | 47 | <div id='notice' onclick="Element.hide('notice');"> | ... | ... |
app/views/profile_editor/index.rhtml
app/views/profile_editor/person_info.rhtml