summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-03 12:56:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-03 12:56:27 +0000
commit7d658e1477fcbdc28b77fa8ce3e3e7c7afe72f3a (patch)
tree158841768ea55cc783c82cdd38c0483345044e9f /app/views
parentf2af44b6feb9266c675427cd7390bb447dc9564b (diff)
downloadredmine-7d658e1477fcbdc28b77fa8ce3e3e7c7afe72f3a.tar.gz
redmine-7d658e1477fcbdc28b77fa8ce3e3e7c7afe72f3a.zip
Adds a 'New version' link on the roadmap.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6169 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/versions/_form.rhtml1
-rw-r--r--app/views/versions/index.html.erb4
-rw-r--r--app/views/versions/show.rhtml2
3 files changed, 7 insertions, 0 deletions
diff --git a/app/views/versions/_form.rhtml b/app/views/versions/_form.rhtml
index b829cf2f8..61bba046c 100644
--- a/app/views/versions/_form.rhtml
+++ b/app/views/versions/_form.rhtml
@@ -1,3 +1,4 @@
+<%= back_url_hidden_field_tag %>
<%= error_messages_for 'version' %>
<div class="box">
diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb
index d0c5dcac1..e8acb3d01 100644
--- a/app/views/versions/index.html.erb
+++ b/app/views/versions/index.html.erb
@@ -1,3 +1,7 @@
+<div class="contextual">
+ <%= link_to l(:label_version_new), {:controller => 'versions', :action => 'new'}, :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>
+</div>
+
<h2><%=l(:label_roadmap)%></h2>
<% if @versions.empty? %>
diff --git a/app/views/versions/show.rhtml b/app/views/versions/show.rhtml
index a769274bf..5fcdf8b82 100644
--- a/app/views/versions/show.rhtml
+++ b/app/views/versions/show.rhtml
@@ -1,6 +1,8 @@
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => @version}, :class => 'icon icon-edit' %>
<%= 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_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => @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' %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>