Patch #16042 » nicer_overview_boxes.patch
| app/controllers/projects_controller.rb | ||
|---|---|---|
|
include RepositoriesHelper
|
||
|
include ProjectsHelper
|
||
|
helper :members
|
||
|
helper :reports
|
||
|
# Lists visible projects
|
||
|
def index
|
||
| app/views/projects/show.html.erb | ||
|---|---|---|
|
<div class="splitcontentleft">
|
||
|
<% if @project.description.present? %>
|
||
|
<div class="wiki">
|
||
|
<div class="wiki box">
|
||
|
<%= textilizable @project.description %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<ul>
|
||
|
<% unless @project.homepage.blank? %>
|
||
|
<li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li>
|
||
|
<div class="homepage box">
|
||
|
<h3><%=l(:field_homepage)%></h3>
|
||
|
<%= link_to h(@project.homepage), @project.homepage %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% if @subprojects.any? %>
|
||
|
<li><%=l(:label_subproject_plural)%>:
|
||
|
<%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %></li>
|
||
|
<% issues_by_subproject = Issue.by_subproject(@project) || [] %>
|
||
|
<div class="subprojects box">
|
||
|
<h3><%=l(:label_subproject_plural)%></h3>
|
||
|
<table class="list">
|
||
|
<thead><tr>
|
||
|
<th style="width:25%"></th>
|
||
|
<th align="center" style="width:25%"><%=l(:label_open_issues_plural)%></th>
|
||
|
<th align="center" style="width:25%"><%=l(:label_closed_issues_plural)%></th>
|
||
|
<th align="center" style="width:25%"><%=l(:label_total)%></th>
|
||
|
</tr></thead>
|
||
|
<tbody>
|
||
|
<% for row in @subprojects %>
|
||
|
<tr class="<%= cycle("odd", "even") %>">
|
||
|
<td><%= link_to h(row.name), aggregate_path(@project, row.name, row) %></td>
|
||
|
<td align="center"><%= aggregate_link issues_by_subproject, { "project_id" => row.id, "closed" => 0 }, aggregate_path(@project, row.id, row, :status_id => "o") %></td>
|
||
|
<td align="center"><%= aggregate_link issues_by_subproject, { "project_id" => row.id, "closed" => 1 }, aggregate_path(@project, row.name, row, :status_id => "c") %></td>
|
||
|
<td align="center"><%= aggregate_link issues_by_subproject, { "project_id" => row.id }, aggregate_path(@project, row.name, row, :status_id => "*") %></td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% @project.visible_custom_field_values.each do |custom_value| %>
|
||
|
<% if !custom_value.value.blank? %>
|
||
|
<li><%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %></li>
|
||
|
<% end %>
|
||
|
<% if !custom_value.value.blank? %>
|
||
|
<div class="custom box">
|
||
|
<h3><%=h custom_value.custom_field.name %></h3>
|
||
|
<%=h show_value(custom_value) %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
<% if User.current.allowed_to?(:view_issues, @project) %>
|
||
|
<div class="issues box">
|
||