From 3a28fa01b096f59b5e72989a1e70a31f28d14f65 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 26 Mar 2007 18:03:25 +0000 Subject: [PATCH] added info about textile availabality on admin/info git-svn-id: http://redmine.rubyforge.org/svn/trunk@386 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/admin_controller.rb | 6 ++++-- app/views/admin/info.rhtml | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 907c0e743..1c10722de 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -52,7 +52,9 @@ class AdminController < ApplicationController def info @db_adapter_name = ActiveRecord::Base.connection.adapter_name - @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) + @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[:textile_available] = ActionView::Helpers::TextHelper.method_defined? "textilize" end end diff --git a/app/views/admin/info.rhtml b/app/views/admin/info.rhtml index 0107fe915..dd11aeb1a 100644 --- a/app/views/admin/info.rhtml +++ b/app/views/admin/info.rhtml @@ -3,6 +3,7 @@

<%=l(:field_version)%>: redMine <%= Redmine::VERSION %> (<%= @db_adapter_name %>)

- - + + +
File repository writable<%= image_tag (@file_repository_writable ? 'true' : 'false'), :style => "vertical-align:bottom;" %>
Default administrator account changed<%= image_tag (@default_admin_changed ? 'true' : 'false'), :style => "vertical-align:bottom;" %>
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;" %>
Textile available<%= image_tag (@flags[:textile_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %>