diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-09-03 10:25:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-09-03 10:25:21 +0000 |
commit | 893a433165489ddd5029e430f5a225d330e42e66 (patch) | |
tree | 742b0db69fac33fa72c4778b525047ba06663d21 /redmine | |
parent | 552d99d664b6c67d021e0b04fb5c6bde3a23c8ce (diff) | |
download | redmine-893a433165489ddd5029e430f5a225d330e42e66.tar.gz redmine-893a433165489ddd5029e430f5a225d330e42e66.zip |
views cleaning
git-svn-id: http://redmine.rubyforge.org/svn/trunk@22 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'redmine')
-rw-r--r-- | redmine/app/helpers/application_helper.rb | 6 | ||||
-rw-r--r-- | redmine/app/views/admin/mail_options.rhtml | 15 | ||||
-rw-r--r-- | redmine/app/views/projects/changelog.rhtml | 8 | ||||
-rw-r--r-- | redmine/app/views/projects/list_documents.rhtml | 2 | ||||
-rw-r--r-- | redmine/app/views/projects/list_news.rhtml | 2 | ||||
-rw-r--r-- | redmine/app/views/projects/show.rhtml | 2 | ||||
-rw-r--r-- | redmine/app/views/roles/_form.rhtml | 5 |
7 files changed, 24 insertions, 16 deletions
diff --git a/redmine/app/helpers/application_helper.rb b/redmine/app/helpers/application_helper.rb index 7a82bcd3a..9212a5952 100644 --- a/redmine/app/helpers/application_helper.rb +++ b/redmine/app/helpers/application_helper.rb @@ -115,6 +115,12 @@ module ApplicationHelper options[:html].store :class, "tabular"
form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc)
end
+
+ def check_all_links(form_name)
+ link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") +
+ " | " +
+ link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
+ end
end class TabularFormBuilder < ActionView::Helpers::FormBuilder
diff --git a/redmine/app/views/admin/mail_options.rhtml b/redmine/app/views/admin/mail_options.rhtml index 7424d3f8c..54e2daf3e 100644 --- a/redmine/app/views/admin/mail_options.rhtml +++ b/redmine/app/views/admin/mail_options.rhtml @@ -1,9 +1,10 @@ <h2><%=l(:field_mail_notification)%></h2>
-<p><%=l(:text_select_mail_notifications)%></p>
-
<%= start_form_tag ({}, :id => 'mail_options_form')%>
+<div class="box">
+<p><%=l(:text_select_mail_notifications)%></p>
+
<% actions = @actions.group_by {|p| p.group_id } %>
<% actions.keys.sort.each do |group_id| %>
<fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
@@ -15,11 +16,9 @@ </fieldset>
<% end %>
-
<br />
-<p>
-<a href="javascript:checkAll('mail_options_form', true)"><%=l(:button_check_all)%></a> |
-<a href="javascript:checkAll('mail_options_form', false)"><%=l(:button_uncheck_all)%></a>
-</p>
+<p><%= check_all_links 'mail_options_form' %></p>
+</div>
+
<%= submit_tag l(:button_save) %>
-<%= end_form_tag %>
\ No newline at end of file +<%= end_form_tag %>
diff --git a/redmine/app/views/projects/changelog.rhtml b/redmine/app/views/projects/changelog.rhtml index fc9d2beba..d5234ec61 100644 --- a/redmine/app/views/projects/changelog.rhtml +++ b/redmine/app/views/projects/changelog.rhtml @@ -1,16 +1,15 @@ <h2><%=l(:label_change_log)%></h2>
-
<%= start_form_tag %>
<% @trackers.each do |tracker| %>
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
<%= tracker.name %>
<% end %>
<%= submit_tag l(:button_apply), :class => 'button-small' %>
-<%= end_form_tag %>
-
-<p> </p>
+<%= end_form_tag %><br />
+
+<div class="box">
<% ver_id = nil
@fixed_issues.each do |issue| %>
<% unless ver_id == issue.fixed_version_id %>
@@ -23,3 +22,4 @@ <li><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %> [<%= issue.tracker.name %>]: <%= issue.subject %></li>
<% end %>
+</div>
\ No newline at end of file diff --git a/redmine/app/views/projects/list_documents.rhtml b/redmine/app/views/projects/list_documents.rhtml index 7e6eff0ba..e47abceb3 100644 --- a/redmine/app/views/projects/list_documents.rhtml +++ b/redmine/app/views/projects/list_documents.rhtml @@ -1,5 +1,7 @@ <h2><%=l(:label_document_plural)%></h2>
+<% if @documents.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
+
<% documents = @documents.group_by {|d| d.category } %>
<% documents.each do |category, docs| %>
<h3><%= category.name %></h3>
diff --git a/redmine/app/views/projects/list_news.rhtml b/redmine/app/views/projects/list_news.rhtml index f31f927ac..31a5f86a4 100644 --- a/redmine/app/views/projects/list_news.rhtml +++ b/redmine/app/views/projects/list_news.rhtml @@ -1,5 +1,7 @@ <h2><%=l(:label_news_plural)%></h2> +<% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> + <% for news in @news %>
<p>
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
diff --git a/redmine/app/views/projects/show.rhtml b/redmine/app/views/projects/show.rhtml index b9e28ce33..dcd52aa3a 100644 --- a/redmine/app/views/projects/show.rhtml +++ b/redmine/app/views/projects/show.rhtml @@ -1,7 +1,7 @@ <h2><%=l(:label_overview)%></h2>
<div class="splitcontentleft">
- <%= @project.description %>
+ <%= simple_format auto_link @project.description %>
<ul>
<li><%=l(:field_homepage)%>: <%= link_to @project.homepage, @project.homepage %></li>
<li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
diff --git a/redmine/app/views/roles/_form.rhtml b/redmine/app/views/roles/_form.rhtml index ea7bafc33..e0ab1c099 100644 --- a/redmine/app/views/roles/_form.rhtml +++ b/redmine/app/views/roles/_form.rhtml @@ -14,8 +14,7 @@ <% end %>
</fieldset>
<% end %>
-<br />
-<a href="javascript:checkAll('role_form', true)"><%=l(:button_check_all)%></a> |
-<a href="javascript:checkAll('role_form', false)"><%=l(:button_uncheck_all)%></a><br />
+<br /> +<%= check_all_links 'role_form' %>
<!--[eoform:role]--> </div> |