Makes versions resource shallow (#7403).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6183 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-07-05 16:29:06 +00:00
parent 25d900c787
commit 852cb183b1
8 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ class VersionsController < ApplicationController
}
end
format.api do
render :action => 'show', :status => :created, :location => project_version_url(@project, @version)
render :action => 'show', :status => :created, :location => version_url(@version)
end
end
else
+2 -2
View File
@@ -20,8 +20,8 @@
<td><%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
<td class="buttons">
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_project_version_path(@project, version), :class => 'icon icon-edit' %>
<%= link_to l(:button_delete), project_version_path(@project, version), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
<%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %>
<%= link_to l(:button_delete), version_path(version), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
<% end %>
</td>
</tr>
+1 -1
View File
@@ -5,7 +5,7 @@
select_tag('status_by',
status_by_options_for_select(criteria),
:id => 'status_by_select',
:onchange => remote_function(:url => status_by_project_version_path(version.project, version),
:onchange => remote_function(:url => status_by_version_path(version),
:with => "Form.serialize('status_by_form')"))) %>
</legend>
<% if counts.empty? %>
+1 -1
View File
@@ -1,6 +1,6 @@
<h2><%=l(:label_version)%></h2>
<% labelled_tabular_form_for :version, @version, :url => project_version_path(@project, @version), :html => {:method => :put} do |f| %>
<% labelled_tabular_form_for :version, @version, :url => version_path(@version), :html => {:method => :put} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
+2 -2
View File
@@ -1,7 +1,7 @@
<div class="contextual">
<%= link_to(l(:button_edit), edit_project_version_path(@version.project, @version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
<%= link_to(l(:button_delete), project_version_path(@version.project, @version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)),
<%= link_to(l(:button_delete), version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)),
:confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>