From 3d5ee0f63502001c0f75438a344e2162d76c9e51 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Wed, 6 Feb 2008 14:55:39 +0000 Subject: [PATCH] ActionItem153: adding a description attribute to Environment class and displaying it in the root of the site --- app/controllers/admin/admin_panel_controller.rb | 8 ++++++++ app/views/admin_panel/index.rhtml | 1 + app/views/admin_panel/site_info.rhtml | 14 ++++++++++++++ app/views/home/index.rhtml | 11 +---------- test/functional/admin_panel_controller_test.rb | 16 ++++++++++++++++ 5 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 app/views/admin_panel/site_info.rhtml diff --git a/app/controllers/admin/admin_panel_controller.rb b/app/controllers/admin/admin_panel_controller.rb index 0281196..2cde1da 100644 --- a/app/controllers/admin/admin_panel_controller.rb +++ b/app/controllers/admin/admin_panel_controller.rb @@ -12,6 +12,14 @@ class AdminPanelController < AdminController environment end + def site_info + if request.post? + if @environment.update_attributes(params[:environment]) + redirect_to :action => 'index' + end + end + end + protected def load_default_enviroment diff --git a/app/views/admin_panel/index.rhtml b/app/views/admin_panel/index.rhtml index 2030d51..b9a0d75 100644 --- a/app/views/admin_panel/index.rhtml +++ b/app/views/admin_panel/index.rhtml @@ -3,6 +3,7 @@

<%= _('You, as an environment administrator, has the following options:')%>