summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-19 20:33:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-19 20:33:24 +0000
commit4398386c48bb70e99e543cca166f704853d3c664 (patch)
tree1dc3a6da6843787e2c0e7b7c10a15a973d681123
parent503d613403aeb19b376d329350621b536e856b05 (diff)
downloadredmine-4398386c48bb70e99e543cca166f704853d3c664.tar.gz
redmine-4398386c48bb70e99e543cca166f704853d3c664.zip
Admin info cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3200 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/admin_controller.rb12
-rw-r--r--app/views/admin/info.rhtml10
2 files changed, 12 insertions, 10 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index d0bfc41c5..2dc3ab1ca 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -76,11 +76,11 @@ class AdminController < ApplicationController
def info
@db_adapter_name = ActiveRecord::Base.connection.adapter_name
- @flags = {
- :default_admin_changed => User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?,
- :file_repository_writable => File.writable?(Attachment.storage_path),
- :plugin_assets_writable => File.writable?(Engines.public_directory),
- :rmagick_available => Object.const_defined?(:Magick)
- }
+ @checklist = [
+ [:text_default_administrator_account_changed, User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?],
+ [:text_file_repository_writable, File.writable?(Attachment.storage_path)],
+ [:text_plugin_assets_writable, File.writable?(Engines.public_directory)],
+ [:text_rmagick_available, Object.const_defined?(:Magick)]
+ ]
end
end
diff --git a/app/views/admin/info.rhtml b/app/views/admin/info.rhtml
index fcbebac05..eef1a674f 100644
--- a/app/views/admin/info.rhtml
+++ b/app/views/admin/info.rhtml
@@ -3,10 +3,12 @@
<p><strong><%= Redmine::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p>
<table class="list">
-<tr class="odd"><td><%= l(:text_default_administrator_account_changed) %></td><td><%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
-<tr class="even"><td><%= l(:text_file_repository_writable) %> (<%= Attachment.storage_path %>)</td><td><%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
-<tr class="odd"><td><%= l(:text_plugin_assets_writable) %> (<%= Engines.public_directory %>)</td><td><%= image_tag (@flags[:plugin_assets_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
-<tr class="even"><td><%= l(:text_rmagick_available) %></td><td><%= image_tag (@flags[:rmagick_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
+<% @checklist.each do |label, result| %>
+ <tr class="<%= cycle 'odd', 'even' %>">
+ <td><%= l(label) %></td>
+ <td width="30px"><%= image_tag((result ? 'true.png' : 'exclamation.png'), :style => "vertical-align:bottom;") %></td>
+ </tr>
+<% end %>
</table>
<% html_title(l(:label_information_plural)) -%>