You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

show.html.erb 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <div class="contextual">
  2. <%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
  3. <%= 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? %>
  4. <%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
  5. <%= link_to_new_issue(@version, @project) %>
  6. <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
  7. </div>
  8. <div id="roadmap" class="<%= @version.css_classes %>">
  9. <h2 class="inline-flex"><%= @version.name %></h2>
  10. <span class="badge badge-status-<%= @version.status %>"><%= l("version_status_#{@version.status}") %></span>
  11. <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
  12. <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
  13. <div id="version-summary">
  14. <% if @version.visible_fixed_issues.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
  15. <fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
  16. <table>
  17. <tr>
  18. <th><%= l(:field_estimated_hours) %></th>
  19. <td class="total-hours"><%= link_to html_hours(l_hours(@version.visible_fixed_issues.estimated_hours)),
  20. project_issues_path(@version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => @version.id, :c => [:tracker, :status, :subject, :estimated_hours], :t => [:estimated_hours]) %></td>
  21. </tr>
  22. <% if User.current.allowed_to_view_all_time_entries?(@project) %>
  23. <tr>
  24. <th><%= l(:label_spent_time) %></th>
  25. <td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)),
  26. project_time_entries_path(@version.project, :set_filter => 1, :"issue.fixed_version_id" => @version.id) %></td>
  27. </tr>
  28. <% end %>
  29. </table>
  30. </fieldset>
  31. <% end %>
  32. <div id="status_by">
  33. <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.exists? %>
  34. </div>
  35. </div>
  36. <% if @issues.present? %>
  37. <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
  38. <table class="list related-issues">
  39. <caption><%= l(:label_related_issues) %></caption>
  40. <%- @issues.each do |issue| -%>
  41. <tr class="hascontextmenu <%= issue.css_classes %>">
  42. <td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
  43. <td class="assigned_to"><%= assignee_avatar(issue.assigned_to, :size => 16) %></td>
  44. <td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
  45. <td class="buttons"><%= link_to_context_menu %></td>
  46. </tr>
  47. <% end %>
  48. </table>
  49. <% end %>
  50. <%= context_menu %>
  51. <% end %>
  52. </div>
  53. <%= call_hook :view_versions_show_bottom, :version => @version %>
  54. <% html_title @version.name %>