Removed RedCloth checks since it's now supplied with the application.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@708 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-09-05 20:51:11 +00:00
parent 0803e6fcaa
commit 22ad806a43
5 changed files with 2 additions and 5 deletions

View File

@ -67,6 +67,5 @@ class AdminController < ApplicationController
@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

View File

@ -29,6 +29,5 @@ class SettingsController < ApplicationController
params[:settings].each { |name, value| Setting[name] = value }
redirect_to :action => 'edit' and return
end
@textile_available = ActionView::Helpers::TextHelper.method_defined?("textilize")
end
end

View File

@ -101,7 +101,7 @@ module ApplicationHelper
html
end
# textilize text according to system settings and RedCloth availability
# format text according to system settings
def textilizable(text, options = {})
return "" if text.blank?

View File

@ -5,5 +5,4 @@
<table class="list">
<tr class="odd"><td>File repository writable</td><td><%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
<tr class="even"><td>Default administrator account changed</td><td><%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
<tr class="odd"><td>Textile available</td><td><%= image_tag (@flags[:textile_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
</table>

View File

@ -35,7 +35,7 @@
<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
<p><label><%= l(:setting_text_formatting) %></label>
<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), 0], ["textile", "textile"]], (@textile_available ? Setting.text_formatting : 0)), :disabled => !@textile_available %></p>
<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p>
<p><label><%= l(:setting_wiki_compression) %></label>
<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>