View cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7939 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5a1fcf826f
commit
0e2733a7cb
|
@ -871,6 +871,13 @@ module ApplicationHelper
|
|||
form_for(*args, &proc)
|
||||
end
|
||||
|
||||
def labelled_form_for(*args, &proc)
|
||||
args << {} unless args.last.is_a?(Hash)
|
||||
options = args.last
|
||||
options.merge!({:builder => TabularFormBuilder})
|
||||
form_for(*args, &proc)
|
||||
end
|
||||
|
||||
def back_url_hidden_field_tag
|
||||
back_url = params[:back_url] || request.env['HTTP_REFERER']
|
||||
back_url = CGI.unescape(back_url.to_s)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% labelled_tabular_form_for :group, @group, :url => group_path(@group), :html => {:method => :put} do |f| %>
|
||||
<% labelled_form_for @group do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<tbody>
|
||||
<% @groups.each do |group| %>
|
||||
<tr class="<%= cycle 'odd', 'even' %>">
|
||||
<td><%= link_to h(group), :action => 'edit', :id => group %></td>
|
||||
<td><%= link_to h(group), edit_group_path(group) %></td>
|
||||
<td align="center"><%= group.users.size %></td>
|
||||
<td class="buttons"><%= link_to l(:button_delete), group, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %></td>
|
||||
</tr>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h2><%= link_to l(:label_group_plural), groups_path %> » <%= l(:label_group_new) %></h2>
|
||||
|
||||
<% form_for(@group, :builder => TabularFormBuilder, :lang => current_language) do |f| %>
|
||||
<% labelled_form_for @group do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<p>
|
||||
<%= f.submit l(:button_create) %>
|
||||
|
|
Loading…
Reference in New Issue