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:
parent
0803e6fcaa
commit
22ad806a43
@ -67,6 +67,5 @@ class AdminController < ApplicationController
|
|||||||
@flags = Hash.new
|
@flags = Hash.new
|
||||||
@flags[:default_admin_changed] = User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?
|
@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[:file_repository_writable] = File.writable?(Attachment.storage_path)
|
||||||
@flags[:textile_available] = ActionView::Helpers::TextHelper.method_defined? "textilize"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -29,6 +29,5 @@ class SettingsController < ApplicationController
|
|||||||
params[:settings].each { |name, value| Setting[name] = value }
|
params[:settings].each { |name, value| Setting[name] = value }
|
||||||
redirect_to :action => 'edit' and return
|
redirect_to :action => 'edit' and return
|
||||||
end
|
end
|
||||||
@textile_available = ActionView::Helpers::TextHelper.method_defined?("textilize")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -101,7 +101,7 @@ module ApplicationHelper
|
|||||||
html
|
html
|
||||||
end
|
end
|
||||||
|
|
||||||
# textilize text according to system settings and RedCloth availability
|
# format text according to system settings
|
||||||
def textilizable(text, options = {})
|
def textilizable(text, options = {})
|
||||||
return "" if text.blank?
|
return "" if text.blank?
|
||||||
|
|
||||||
|
@ -5,5 +5,4 @@
|
|||||||
<table class="list">
|
<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="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="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>
|
</table>
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
|
<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
|
||||||
|
|
||||||
<p><label><%= l(:setting_text_formatting) %></label>
|
<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>
|
<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>
|
<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user