From fc64fc3e9c1004171c495e055dd482e364284d7b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 15 Sep 2007 20:39:40 +0000 Subject: [PATCH] Added RMagick availability on admin/info. git-svn-id: http://redmine.rubyforge.org/svn/trunk@738 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/admin_controller.rb | 8 +++++--- app/views/admin/info.rhtml | 5 +++-- doc/INSTALL | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 2451f5ef6..ccc107507 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -70,8 +70,10 @@ class AdminController < ApplicationController def info @db_adapter_name = ActiveRecord::Base.connection.adapter_name - @flags = Hash.new - @flags[:default_admin_changed] = User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil? - @flags[:file_repository_writable] = File.writable?(Attachment.storage_path) + @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), + :rmagick_available => Object.const_defined?(:Magick) + } end end diff --git a/app/views/admin/info.rhtml b/app/views/admin/info.rhtml index 22d3148f0..59b1c3f26 100644 --- a/app/views/admin/info.rhtml +++ b/app/views/admin/info.rhtml @@ -3,6 +3,7 @@

<%=l(:field_version)%>: <%= Redmine::Info.versioned_name %> (<%= @db_adapter_name %>)

- - + + +
File repository writable<%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %>
Default administrator account changed<%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %>
Default administrator account changed<%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %>
File repository writable<%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %>
RMagick available<%= image_tag (@flags[:rmagick_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %>
diff --git a/doc/INSTALL b/doc/INSTALL index 35410a87b..8532d7a14 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -12,6 +12,7 @@ http://redmine.rubyforge.org/ Optional: * SVN binaries >= 1.3 (needed for repository browsing, must be available in PATH) +* RMagick (gantt export to png) Supported databases: * MySQL (tested with MySQL 5) -- 2.39.5