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 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <div class="contextual">
  2. <% if User.current.allowed_to?(:add_subprojects, @project) %>
  3. <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
  4. <% end %>
  5. <% if User.current.allowed_to?(:close_project, @project) %>
  6. <% if @project.active? %>
  7. <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %>
  8. <% else %>
  9. <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
  10. <% end %>
  11. <% end %>
  12. </div>
  13. <h2><%=l(:label_overview)%></h2>
  14. <% unless @project.active? %>
  15. <p class="warning"><span class="icon icon-lock"><%= l(:text_project_closed) %></span></p>
  16. <% end %>
  17. <div class="splitcontentleft">
  18. <% if @project.description.present? %>
  19. <div class="wiki">
  20. <%= textilizable @project.description %>
  21. </div>
  22. <% end %>
  23. <% if @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?) %>
  24. <ul>
  25. <% unless @project.homepage.blank? %>
  26. <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
  27. <% end %>
  28. <% render_custom_field_values(@project) do |custom_field, formatted| %>
  29. <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
  30. <% end %>
  31. </ul>
  32. <% end %>
  33. <% if User.current.allowed_to?(:view_issues, @project) %>
  34. <div class="issues box">
  35. <h3 class="icon icon-issue"><%=l(:label_issue_tracking)%></h3>
  36. <% if @trackers.present? %>
  37. <table class="list issue-report">
  38. <thead>
  39. <tr>
  40. <th></th>
  41. <th><%=l(:label_open_issues_plural)%></th>
  42. <th><%=l(:label_closed_issues_plural)%></th>
  43. <th><%=l(:label_total)%></th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <% @trackers.each do |tracker| %>
  48. <tr>
  49. <td class="name">
  50. <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
  51. </td>
  52. <td>
  53. <%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
  54. </td>
  55. <td>
  56. <%= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => 'c') %>
  57. </td>
  58. <td>
  59. <%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %>
  60. </td>
  61. </tr>
  62. <% end %>
  63. </tbody>
  64. </table>
  65. <% end %>
  66. <p>
  67. <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
  68. <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
  69. | <%= link_to l(:label_calendar), project_calendar_path(@project) %>
  70. <% end %>
  71. <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
  72. | <%= link_to l(:label_gantt), project_gantt_path(@project) %>
  73. <% end %>
  74. </p>
  75. </div>
  76. <% end %>
  77. <% if User.current.allowed_to?(:view_time_entries, @project) %>
  78. <div class="spent_time box">
  79. <h3 class="icon icon-time"><%= l(:label_spent_time) %></h3>
  80. <% if @total_hours.present? %>
  81. <p><%= l_hours(@total_hours) %></p>
  82. <% end %>
  83. <p>
  84. <% if User.current.allowed_to?(:log_time, @project) %>
  85. <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
  86. <% end %>
  87. <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
  88. <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %>
  89. </p>
  90. </div>
  91. <% end %>
  92. <%= call_hook(:view_projects_show_left, :project => @project) %>
  93. </div>
  94. <div class="splitcontentright">
  95. <%= render :partial => 'members_box' %>
  96. <% if @news.any? && authorize_for('news', 'index') %>
  97. <div class="news box">
  98. <h3 class="icon icon-news"><%=l(:label_news_latest)%></h3>
  99. <%= render :partial => 'news/news', :collection => @news %>
  100. <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
  101. </div>
  102. <% end %>
  103. <% if @subprojects.any? %>
  104. <div class="projects box">
  105. <h3 class="icon icon-projects"><%=l(:label_subproject_plural)%></h3>
  106. <%= @subprojects.collect{|p| link_to p, project_path(p), :class => p.css_classes}.join(", ").html_safe %>
  107. </div>
  108. <% end %>
  109. <%= call_hook(:view_projects_show_right, :project => @project) %>
  110. </div>
  111. <% content_for :sidebar do %>
  112. <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
  113. <% end %>
  114. <% content_for :header_tags do %>
  115. <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
  116. <% end %>
  117. <% html_title(l(:label_overview)) -%>