From 4edc9cf26e81b96e2b9639a1f8d00653cdbb560a Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Tue, 22 Jan 2008 21:31:29 +0000 Subject: [PATCH] ActionItem152: load the controller's css --- app/views/layouts/application.rhtml | 11 ++++++++++- app/views/profile_editor/index.rhtml | 2 +- app/views/profile_editor/person_info.rhtml | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index f4e7657..7a7dfd6 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -18,6 +18,11 @@ <%= stylesheet_link_tag 'blocks' %> <%= stylesheet_link_tag 'forms' %> <%= stylesheet_link_tag 'login-box' %> + <%= + # Load the controller's css file if it exists: + css = "controller_"+ @controller.controller_name() +".css" + stylesheet_link_tag( css ) if File.exists?( "public/stylesheets/"+css ) + %> <%# FIXME %> <%= stylesheet_link_tag '/designs/templates/default/stylesheets/style.css' %> @@ -32,7 +37,11 @@ <% end %> - + <% unless flash[:notice].nil? %>
diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml index df32cc2..76086de 100644 --- a/app/views/profile_editor/index.rhtml +++ b/app/views/profile_editor/index.rhtml @@ -1,4 +1,4 @@ -

<%= _('My profile') %>

+

<%= _('My profile') %>

<%= link_to (@profile.image ? image_tag( @profile.image.public_filename) : _('Put image')), :action => 'change_image' %> diff --git a/app/views/profile_editor/person_info.rhtml b/app/views/profile_editor/person_info.rhtml index 4bba4d4..447fc89 100644 --- a/app/views/profile_editor/person_info.rhtml +++ b/app/views/profile_editor/person_info.rhtml @@ -1,4 +1,4 @@ -

<%= _('Edit person info') %>

+

<%= _('Edit person info') %>

<% labelled_form_for :info, @info do |f| %> -- libgit2 0.21.2