@@ -67,6 +67,5 class AdminController < ApplicationController | |||||
67 | @flags = Hash.new |
|
67 | @flags = Hash.new | |
68 | @flags[:default_admin_changed] = User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil? |
|
68 | @flags[:default_admin_changed] = User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil? | |
69 | @flags[:file_repository_writable] = File.writable?(Attachment.storage_path) |
|
69 | @flags[:file_repository_writable] = File.writable?(Attachment.storage_path) | |
70 | @flags[:textile_available] = ActionView::Helpers::TextHelper.method_defined? "textilize" |
|
|||
71 | end |
|
70 | end | |
72 | end |
|
71 | end |
@@ -29,6 +29,5 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") |
|
|||
33 | end |
|
32 | end | |
34 | end |
|
33 | end |
@@ -101,7 +101,7 module ApplicationHelper | |||||
101 | html |
|
101 | html | |
102 | end |
|
102 | end | |
103 |
|
103 | |||
104 |
# t |
|
104 | # format text according to system settings | |
105 | def textilizable(text, options = {}) |
|
105 | def textilizable(text, options = {}) | |
106 | return "" if text.blank? |
|
106 | return "" if text.blank? | |
107 |
|
107 |
@@ -5,5 +5,4 | |||||
5 | <table class="list"> |
|
5 | <table class="list"> | |
6 | <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> |
|
6 | <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> | |
7 | <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> |
|
7 | <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> | |
8 | <tr class="odd"><td>Textile available</td><td><%= image_tag (@flags[:textile_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> |
|
|||
9 | </table> |
|
8 | </table> |
@@ -35,7 +35,7 | |||||
35 | <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p> |
|
35 | <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p> | |
36 |
|
36 | |||
37 | <p><label><%= l(:setting_text_formatting) %></label> |
|
37 | <p><label><%= l(:setting_text_formatting) %></label> | |
38 |
<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), 0], ["textile", "textile"]], |
|
38 | <%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p> | |
39 |
|
39 | |||
40 | <p><label><%= l(:setting_wiki_compression) %></label> |
|
40 | <p><label><%= l(:setting_wiki_compression) %></label> | |
41 | <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p> |
|
41 | <%= 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