Commit 893a4331 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

views cleaning

git-svn-id: http://redmine.rubyforge.org/svn/trunk@22 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 552d99d6
......@@ -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
......
<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 %>
<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 %>
&nbsp;&nbsp;<%= submit_tag l(:button_apply), :class => 'button-small' %>
<%= end_form_tag %>
<p>&nbsp;</p>
<%= end_form_tag %><br />
&nbsp;
<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
<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>
......
<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 />
......
<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>
......
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment