diff options
Diffstat (limited to 'app/views')
23 files changed, 69 insertions, 30 deletions
diff --git a/app/views/account/login.rhtml b/app/views/account/login.rhtml index 8f092b525..346f7d52b 100644 --- a/app/views/account/login.rhtml +++ b/app/views/account/login.rhtml @@ -12,7 +12,7 @@ <p><center><input type="submit" name="login" value="<%=l(:button_login)%> »" class="primary" /></center> <%= end_form_tag %>
-<br><% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %>
+<br><% if Setting.self_registration? %><%= link_to l(:label_register), :action => 'register' %> |<% end %>
<%= link_to l(:label_password_lost), :action => 'lost_password' %></p> </div>
</center>
\ No newline at end of file diff --git a/app/views/admin/index.rhtml b/app/views/admin/index.rhtml index 901134c27..535a90b59 100644 --- a/app/views/admin/index.rhtml +++ b/app/views/admin/index.rhtml @@ -36,6 +36,10 @@ <%= link_to l(:label_authentication), :controller => 'auth_sources' %>
</p>
+<p class="icon22 icon22-settings">
+<%= link_to l(:label_settings), :controller => 'settings' %>
+</p>
+
<p class="icon22 icon22-info">
<%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %>
</p>
\ No newline at end of file diff --git a/app/views/documents/_form.rhtml b/app/views/documents/_form.rhtml index 873c96329..b075b4657 100644 --- a/app/views/documents/_form.rhtml +++ b/app/views/documents/_form.rhtml @@ -14,7 +14,7 @@ <!--[eoform:document]--> </div> -<% unless $RDM_TEXTILE_DISABLED %> +<% if Setting.text_formatting == 'textile' %> <%= javascript_include_tag 'jstoolbar' %> <script type="text/javascript"> //<![CDATA[ diff --git a/app/views/documents/show.rhtml b/app/views/documents/show.rhtml index dab360eda..d756aad62 100644 --- a/app/views/documents/show.rhtml +++ b/app/views/documents/show.rhtml @@ -31,7 +31,7 @@ <%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") %>
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
<%= image_to_function "add.png", "addFileField();return false" %></label>
- <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
+ <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
<%= submit_tag l(:button_add) %>
<%= end_form_tag %>
<% end %>
diff --git a/app/views/feeds/news.rxml b/app/views/feeds/news.rxml index 50d4a9aba..41fb0cade 100644 --- a/app/views/feeds/news.rxml +++ b/app/views/feeds/news.rxml @@ -1,10 +1,10 @@ xml.instruct!
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
xml.channel do
- xml.title "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
+ xml.title "#{Setting.header_title}: #{l(:label_news_latest)}"
xml.link url_for(:controller => '', :only_path => false)
xml.pubDate CGI.rfc1123_date(@news.first.created_on)
- xml.description "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
+ xml.description l(:label_news_latest)
@news.each do |news|
xml.item do
xml.title "#{news.project.name}: #{news.title}"
diff --git a/app/views/issues/edit.rhtml b/app/views/issues/edit.rhtml index da3805c29..78fc4a7a8 100644 --- a/app/views/issues/edit.rhtml +++ b/app/views/issues/edit.rhtml @@ -34,7 +34,7 @@ <%= submit_tag l(:button_save) %> <% end %> -<% unless $RDM_TEXTILE_DISABLED %> +<% if Setting.text_formatting == 'textile' %> <%= javascript_include_tag 'jstoolbar' %> <script type="text/javascript"> //<![CDATA[ diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index f2441f964..29adf66ae 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -93,7 +93,7 @@ end %> <%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") %>
<p id="attachments_p"><label><%=l(:label_attachment_new)%>
<%= image_to_function "add.png", "addFileField();return false" %></label>
- <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
+ <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
<%= submit_tag l(:button_add) %>
<%= end_form_tag %>
<% end %>
diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 4768f29dd..e4c35b6bd 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -1,7 +1,7 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
-<title><%= $RDM_HEADER_TITLE + (@html_title ? ": #{@html_title}" : "") %></title>
+<title><%= Setting.header_title + (@html_title ? ": #{@html_title}" : "") %></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="redMine" />
<meta name="keywords" content="issue,bug,tracker" />
@@ -23,8 +23,8 @@ <div id="header">
<div style="float: left;">
- <h1><%= $RDM_HEADER_TITLE %></h1>
- <h2><%= $RDM_HEADER_SUBTITLE %></h2>
+ <h1><%= Setting.header_title %></h1>
+ <h2><%= Setting.header_subtitle %></h2>
</div>
<div style="float: right; padding-right: 1em; padding-top: 0.2em;">
<% if loggedin? %><small><%=l(:label_logged_as)%> <b><%= @logged_in_user.login %></b></small><% end %>
@@ -69,6 +69,7 @@ <a class="menuItem" href="/enumerations"><%=l(:label_enumerations)%></a>
<a class="menuItem" href="/admin/mail_options"><%=l(:field_mail_notification)%></a>
<a class="menuItem" href="/auth_sources"><%=l(:label_authentication)%></a>
+ <a class="menuItem" href="/settings"><%=l(:label_settings)%></a>
<a class="menuItem" href="/admin/info"><%=l(:label_information_plural)%></a>
</div>
<div id="menuTrackers" class="menu">
@@ -134,10 +135,7 @@ </div>
<div id="footer">
- <p>
- <%= auto_link $RDM_FOOTER_SIG %> |
- <a href="http://redmine.rubyforge.org/"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %>
- </p>
+ <p><a href="http://redmine.rubyforge.org/"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %></p>
</div>
</div>
diff --git a/app/views/mailer/_issue.rhtml b/app/views/mailer/_issue.rhtml index c123ae30c..4c5255d3e 100644 --- a/app/views/mailer/_issue.rhtml +++ b/app/views/mailer/_issue.rhtml @@ -4,4 +4,4 @@ <%= issue.description %>
-http://<%= $RDM_HOST_NAME %>/issues/show/<%= issue.id %>
\ No newline at end of file +http://<%= Setting.host_name %>/issues/show/<%= issue.id %>
\ No newline at end of file diff --git a/app/views/mailer/lost_password_de.rhtml b/app/views/mailer/lost_password_de.rhtml index 2593edbda..0b391498b 100644 --- a/app/views/mailer/lost_password_de.rhtml +++ b/app/views/mailer/lost_password_de.rhtml @@ -1,3 +1,3 @@ To change your password, use the following link:
-http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/mailer/lost_password_en.rhtml b/app/views/mailer/lost_password_en.rhtml index 2593edbda..0b391498b 100644 --- a/app/views/mailer/lost_password_en.rhtml +++ b/app/views/mailer/lost_password_en.rhtml @@ -1,3 +1,3 @@ To change your password, use the following link:
-http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/mailer/lost_password_es.rhtml b/app/views/mailer/lost_password_es.rhtml index 2593edbda..0b391498b 100644 --- a/app/views/mailer/lost_password_es.rhtml +++ b/app/views/mailer/lost_password_es.rhtml @@ -1,3 +1,3 @@ To change your password, use the following link:
-http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/mailer/lost_password_fr.rhtml b/app/views/mailer/lost_password_fr.rhtml index 30996f118..18b6bf6ae 100644 --- a/app/views/mailer/lost_password_fr.rhtml +++ b/app/views/mailer/lost_password_fr.rhtml @@ -1,3 +1,3 @@ Pour changer votre mot de passe, utilisez le lien suivant:
-http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/mailer/register_de.rhtml b/app/views/mailer/register_de.rhtml index 2c0341b24..95cc7c4a6 100644 --- a/app/views/mailer/register_de.rhtml +++ b/app/views/mailer/register_de.rhtml @@ -1,3 +1,3 @@ To activate your redMine account, use the following link:
-http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/mailer/register_en.rhtml b/app/views/mailer/register_en.rhtml index 2c0341b24..95cc7c4a6 100644 --- a/app/views/mailer/register_en.rhtml +++ b/app/views/mailer/register_en.rhtml @@ -1,3 +1,3 @@ To activate your redMine account, use the following link:
-http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/mailer/register_es.rhtml b/app/views/mailer/register_es.rhtml index 2c0341b24..95cc7c4a6 100644 --- a/app/views/mailer/register_es.rhtml +++ b/app/views/mailer/register_es.rhtml @@ -1,3 +1,3 @@ To activate your redMine account, use the following link:
-http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/mailer/register_fr.rhtml b/app/views/mailer/register_fr.rhtml index 3f5d0ccaf..402b2a5d4 100644 --- a/app/views/mailer/register_fr.rhtml +++ b/app/views/mailer/register_fr.rhtml @@ -1,3 +1,3 @@ Pour activer votre compte sur redMine, utilisez le lien suivant:
-http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
\ No newline at end of file +http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
\ No newline at end of file diff --git a/app/views/news/_form.rhtml b/app/views/news/_form.rhtml index 2dcdc9f80..497c071c1 100644 --- a/app/views/news/_form.rhtml +++ b/app/views/news/_form.rhtml @@ -5,7 +5,7 @@ <p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p> </div> -<% unless $RDM_TEXTILE_DISABLED %> +<% if Setting.text_formatting == 'textile' %> <%= javascript_include_tag 'jstoolbar' %> <script type="text/javascript"> //<![CDATA[ diff --git a/app/views/projects/add_document.rhtml b/app/views/projects/add_document.rhtml index b570eabbd..57a62756b 100644 --- a/app/views/projects/add_document.rhtml +++ b/app/views/projects/add_document.rhtml @@ -6,7 +6,7 @@ <div class="box">
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%> <%= image_to_function "add.png", "addFileField();return false" %></label> -<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p> +<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p> </div> <%= submit_tag l(:button_create) %> diff --git a/app/views/projects/add_file.rhtml b/app/views/projects/add_file.rhtml index baffbe8e8..6efc1d2c5 100644 --- a/app/views/projects/add_file.rhtml +++ b/app/views/projects/add_file.rhtml @@ -9,7 +9,7 @@ <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
<%= image_to_function "add.png", "addFileField();return false" %></label>
-<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
+<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
</div>
<%= submit_tag l(:button_add) %>
<%= end_form_tag %>
\ No newline at end of file diff --git a/app/views/projects/add_issue.rhtml b/app/views/projects/add_issue.rhtml index 951b53bb9..fd463b5b4 100644 --- a/app/views/projects/add_issue.rhtml +++ b/app/views/projects/add_issue.rhtml @@ -27,7 +27,7 @@ <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%> <%= image_to_function "add.png", "addFileField();return false" %></label> -<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p> +<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p> </div> <!--[eoform:issue]--> @@ -35,7 +35,7 @@ <%= submit_tag l(:button_create) %>
<% end %> -<% unless $RDM_TEXTILE_DISABLED %> +<% if Setting.text_formatting == 'textile' %> <%= javascript_include_tag 'jstoolbar' %> <script type="text/javascript"> //<![CDATA[ diff --git a/app/views/settings/edit.rhtml b/app/views/settings/edit.rhtml new file mode 100644 index 000000000..fcbb40f91 --- /dev/null +++ b/app/views/settings/edit.rhtml @@ -0,0 +1,37 @@ +<h2><%= l(:label_settings) %></h2> + +<%= start_form_tag({:action => 'edit'}, :class => "tabular") %> +<div class="box"> +<p><label>header_title</label> +<%= text_field_tag 'settings[header_title]', Setting.header_title, :size => 30 %></p> + +<p><label>header_subtitle</label> +<%= text_field_tag 'settings[header_subtitle]', Setting.header_subtitle, :size => 60 %></p> + +<p><label>welcome_text</label> +<%= text_area_tag 'settings[welcome_text]', Setting.welcome_text, :cols => 60, :rows => 5 %></p> + +<p><label>default_language</label> +<%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p> + +<p><label>login_required</label> +<%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p> + +<p><label>self_registration</label> +<%= check_box_tag 'settings[self_registration]', 1, Setting.self_registration? %><%= hidden_field_tag 'settings[self_registration]', 0 %></p> + +<p><label>attachment_max_size</label> +<%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %></p> + +<p><label>mail_from</label> +<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p> + +<p><label>host_name</label> +<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p> + +<p><label>text_formatting</label> +<%= select_tag 'settings[text_formatting]', options_for_select( [[l(:label_none), 0], ["textile", "textile"]], Setting.text_formatting) %></p> + +</div> +<%= submit_tag l(:button_save) %> +<%= end_form_tag %>
\ No newline at end of file diff --git a/app/views/welcome/index.rhtml b/app/views/welcome/index.rhtml index d32771c0f..95683c849 100644 --- a/app/views/welcome/index.rhtml +++ b/app/views/welcome/index.rhtml @@ -1,7 +1,7 @@ -<h2><%= $RDM_WELCOME_TITLE || l(:label_home) %></h2>
+<h2><%= l(:label_home) %></h2>
<div class="splitcontentleft">
- <% if $RDM_WELCOME_TEXT %><p><%= $RDM_WELCOME_TEXT %></p><br /><% end %>
+ <p><%= Setting.welcome_text %></p>
<div class="box">
<h3><%=l(:label_news_latest)%></h3> <%= render :partial => 'news/news', :collection => @news %>
|