Admin info cleanup.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3200 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-12-19 20:33:24 +00:00
parent 503d613403
commit 4398386c48
2 changed files with 12 additions and 10 deletions

View File

@ -76,11 +76,11 @@ class AdminController < ApplicationController
def info def info
@db_adapter_name = ActiveRecord::Base.connection.adapter_name @db_adapter_name = ActiveRecord::Base.connection.adapter_name
@flags = { @checklist = [
:default_admin_changed => User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?, [:text_default_administrator_account_changed, User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?],
:file_repository_writable => File.writable?(Attachment.storage_path), [:text_file_repository_writable, File.writable?(Attachment.storage_path)],
:plugin_assets_writable => File.writable?(Engines.public_directory), [:text_plugin_assets_writable, File.writable?(Engines.public_directory)],
:rmagick_available => Object.const_defined?(:Magick) [:text_rmagick_available, Object.const_defined?(:Magick)]
} ]
end end
end end

View File

@ -3,10 +3,12 @@
<p><strong><%= Redmine::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p> <p><strong><%= Redmine::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p>
<table class="list"> <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> <% @checklist.each do |label, result| %>
<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="<%= cycle 'odd', 'even' %>">
<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> <td><%= l(label) %></td>
<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> <td width="30px"><%= image_tag((result ? 'true.png' : 'exclamation.png'), :style => "vertical-align:bottom;") %></td>
</tr>
<% end %>
</table> </table>
<% html_title(l(:label_information_plural)) -%> <% html_title(l(:label_information_plural)) -%>