From bb8e2beeac3663848f81a1badc77dfd2b12ff68a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 26 Nov 2011 14:53:52 +0000 Subject: [PATCH] Version routes cleanup in views. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7936 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/settings/_versions.html.erb | 2 +- app/views/versions/edit.html.erb | 2 +- app/views/versions/new.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb index 7fc7dd272..785dcfa71 100644 --- a/app/views/projects/settings/_versions.html.erb +++ b/app/views/projects/settings/_versions.html.erb @@ -38,4 +38,4 @@ <% end %> -

<%= link_to_if_authorized l(:label_version_new), {:controller => 'versions', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>

+

<%= link_to l(:label_version_new), new_project_version_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>

diff --git a/app/views/versions/edit.html.erb b/app/views/versions/edit.html.erb index 8a859626e..47d80ac42 100644 --- a/app/views/versions/edit.html.erb +++ b/app/views/versions/edit.html.erb @@ -1,6 +1,6 @@

<%=l(:label_version)%>

-<% labelled_tabular_form_for :version, @version, :url => version_path(@version), :html => {:method => :put} do |f| %> +<% labelled_tabular_form_for @version do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <% end %> diff --git a/app/views/versions/new.html.erb b/app/views/versions/new.html.erb index d60468159..e141a112b 100644 --- a/app/views/versions/new.html.erb +++ b/app/views/versions/new.html.erb @@ -1,6 +1,6 @@

<%=l(:label_version_new)%>

-<% labelled_tabular_form_for :version, @version, :url => project_versions_path(@project) do |f| %> +<% labelled_tabular_form_for @version, :url => project_versions_path(@project) do |f| %> <%= render :partial => 'versions/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> <% end %>