##// END OF EJS Templates
Text formatting drop down disabled if RedCloth is not available (system settings)....
Jean-Philippe Lang -
r494:124cca3af030
parent child
Show More
@@ -29,5 +29,6 class SettingsController < ApplicationController
29 params[:settings].each { |name, value| Setting[name] = value }
29 params[:settings].each { |name, value| Setting[name] = value }
30 redirect_to :action => 'edit' and return
30 redirect_to :action => 'edit' and return
31 end
31 end
32 @textile_available = ActionView::Helpers::TextHelper.method_defined?("textilize")
32 end
33 end
33 end
34 end
@@ -37,7 +37,7
37 <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
37 <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
38
38
39 <p><label><%= l(:setting_text_formatting) %></label>
39 <p><label><%= l(:setting_text_formatting) %></label>
40 <%= select_tag 'settings[text_formatting]', options_for_select( [[l(:label_none), 0], ["textile", "textile"]], Setting.text_formatting) %></p>
40 <%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), 0], ["textile", "textile"]], (@textile_available ? Setting.text_formatting : 0)), :disabled => !@textile_available %></p>
41
41
42 <p><label><%= l(:setting_wiki_compression) %></label>
42 <p><label><%= l(:setting_wiki_compression) %></label>
43 <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
43 <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
General Comments 0
You need to be logged in to leave comments. Login now