views cleaning
git-svn-id: http://redmine.rubyforge.org/svn/trunk@22 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
552d99d664
commit
893a433165
|
@ -115,6 +115,12 @@ module ApplicationHelper
|
||||||
options[:html].store :class, "tabular"
|
options[:html].store :class, "tabular"
|
||||||
form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc)
|
form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
class TabularFormBuilder < ActionView::Helpers::FormBuilder
|
class TabularFormBuilder < ActionView::Helpers::FormBuilder
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<h2><%=l(:field_mail_notification)%></h2>
|
<h2><%=l(:field_mail_notification)%></h2>
|
||||||
|
|
||||||
<p><%=l(:text_select_mail_notifications)%></p>
|
|
||||||
|
|
||||||
<%= start_form_tag ({}, :id => 'mail_options_form')%>
|
<%= 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 = @actions.group_by {|p| p.group_id } %>
|
||||||
<% actions.keys.sort.each do |group_id| %>
|
<% actions.keys.sort.each do |group_id| %>
|
||||||
<fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
|
<fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
|
||||||
|
@ -15,11 +16,9 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<p>
|
<p><%= check_all_links 'mail_options_form' %></p>
|
||||||
<a href="javascript:checkAll('mail_options_form', true)"><%=l(:button_check_all)%></a> |
|
</div>
|
||||||
<a href="javascript:checkAll('mail_options_form', false)"><%=l(:button_uncheck_all)%></a>
|
|
||||||
</p>
|
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<%= end_form_tag %>
|
<%= end_form_tag %>
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<h2><%=l(:label_change_log)%></h2>
|
<h2><%=l(:label_change_log)%></h2>
|
||||||
|
|
||||||
|
|
||||||
<%= start_form_tag %>
|
<%= start_form_tag %>
|
||||||
<% @trackers.each do |tracker| %>
|
<% @trackers.each do |tracker| %>
|
||||||
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
|
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
|
||||||
<%= tracker.name %>
|
<%= tracker.name %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= submit_tag l(:button_apply), :class => 'button-small' %>
|
<%= submit_tag l(:button_apply), :class => 'button-small' %>
|
||||||
<%= end_form_tag %>
|
<%= end_form_tag %><br />
|
||||||
|
|
||||||
<p> </p>
|
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
<% ver_id = nil
|
<% ver_id = nil
|
||||||
@fixed_issues.each do |issue| %>
|
@fixed_issues.each do |issue| %>
|
||||||
<% unless ver_id == issue.fixed_version_id %>
|
<% 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>
|
<li><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %> [<%= issue.tracker.name %>]: <%= issue.subject %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
|
@ -1,5 +1,7 @@
|
||||||
<h2><%=l(:label_document_plural)%></h2>
|
<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 = @documents.group_by {|d| d.category } %>
|
||||||
<% documents.each do |category, docs| %>
|
<% documents.each do |category, docs| %>
|
||||||
<h3><%= category.name %></h3>
|
<h3><%= category.name %></h3>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<h2><%=l(:label_news_plural)%></h2>
|
<h2><%=l(:label_news_plural)%></h2>
|
||||||
|
|
||||||
|
<% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
|
||||||
|
|
||||||
<% for news in @news %>
|
<% for news in @news %>
|
||||||
<p>
|
<p>
|
||||||
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
|
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<h2><%=l(:label_overview)%></h2>
|
<h2><%=l(:label_overview)%></h2>
|
||||||
|
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
<%= @project.description %>
|
<%= simple_format auto_link @project.description %>
|
||||||
<ul>
|
<ul>
|
||||||
<li><%=l(:field_homepage)%>: <%= link_to @project.homepage, @project.homepage %></li>
|
<li><%=l(:field_homepage)%>: <%= link_to @project.homepage, @project.homepage %></li>
|
||||||
<li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
|
<li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<% end %>
|
<% end %>
|
||||||
<br />
|
<br />
|
||||||
<a href="javascript:checkAll('role_form', true)"><%=l(:button_check_all)%></a> |
|
<%= check_all_links 'role_form' %>
|
||||||
<a href="javascript:checkAll('role_form', false)"><%=l(:button_uncheck_all)%></a><br />
|
|
||||||
<!--[eoform:role]-->
|
<!--[eoform:role]-->
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue