Feature #21203 » add_issue_tracking_box_to_home.diff
app/controllers/welcome_controller.rb (working copy) | ||
---|---|---|
20 | 20 | |
21 | 21 |
def index |
22 | 22 |
@news = News.latest User.current |
23 |
@projects = Project.latest User.current |
|
23 |
@trackers = Tracker.sorted.to_a |
|
24 |
@open_issues_by_tracker = Issue.visible.open.group(:tracker).count |
|
25 |
@total_issues_by_tracker = Issue.visible.group(:tracker).count |
|
24 | 26 |
end |
25 | 27 | |
26 | 28 |
def robots |
app/views/projects/show.html.erb (working copy) | ||
---|---|---|
41 | 41 |
<% if User.current.allowed_to?(:view_issues, @project) %> |
42 | 42 |
<div class="issues box"> |
43 | 43 |
<h3><%=l(:label_issue_tracking)%></h3> |
44 |
<% if @trackers.present? %> |
|
45 |
<table class="list issue-report"> |
|
46 |
<thead> |
|
47 |
<tr> |
|
48 |
<th></th> |
|
49 |
<th><%=l(:label_open_issues_plural)%></th> |
|
50 |
<th><%=l(:label_closed_issues_plural)%></th> |
|
51 |
<th><%=l(:label_total)%></th> |
|
52 |
</tr> |
|
53 |
</thead> |
|
54 |
<tbody> |
|
55 |
<% @trackers.each do |tracker| %> |
|
56 |
<tr class="<%= cycle("odd", "even") %>"> |
|
57 |
<td class="name"> |
|
58 |
<%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %> |
|
59 |
</td> |
|
60 |
<td> |
|
61 |
<%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %> |
|
62 |
</td> |
|
63 |
<td> |
|
64 |
<%= 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') %> |
|
65 |
</td> |
|
66 |
<td> |
|
67 |
<%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %> |
|
68 |
</td> |
|
69 |
</tr> |
|
70 |
<% end %> |
|
71 |
</tbody> |
|
72 |
</table> |
|
73 |
<% end %> |
|
44 |
<%= render :partial => 'issues/total_issues_list', :locals => {:project => @project, :trackers => @trackers, :open_issues_by_tracker => @open_issues_by_tracker, :total_issues_by_tracker => @total_issues_by_tracker} %> |
|
74 | 45 |
<p> |
75 | 46 |
<%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %> |
76 | 47 |
<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %> |
app/views/welcome/index.html.erb (working copy) | ||
---|---|---|
4 | 4 |
<div class="wiki"> |
5 | 5 |
<%= textilizable Setting.welcome_text %> |
6 | 6 |
</div> |
7 |
<% if @news.any? %> |
|
8 |
<div class="news box"> |
|
9 |
<h3><%=l(:label_news_latest)%></h3> |
|
10 |
<%= render :partial => 'news/news', :collection => @news %> |
|
11 |
<%= link_to l(:label_news_view_all), :controller => 'news' %> |
|
12 |
</div> |
|
13 |
<% end %> |
|
14 | 7 |
<%= call_hook(:view_welcome_index_left, :projects => @projects) %> |
15 | 8 |
</div> |
16 | 9 | |
17 | 10 |
<div class="splitcontentright"> |
18 |
<% if @projects.any? %> |
|
19 |
<div class="projects box"> |
|
20 |
<h3><%=l(:label_project_latest)%></h3> |
|
21 |
<ul> |
|
22 |
<% for project in @projects %> |
|
23 |
<% @project = project %> |
|
24 |
<li> |
|
25 |
<%= link_to_project project %> (<%= format_time(project.created_on) %>) |
|
26 |
<div class="wiki"> |
|
27 |
<%= textilizable project.short_description, :project => project %> |
|
11 |
<% if @news.any? %> |
|
12 |
<div class="news box"> |
|
13 |
<h3><%=l(:label_news_latest)%></h3> |
|
14 |
<%= render :partial => 'news/news', :collection => @news %> |
|
15 |
<%= link_to l(:label_news_view_all), :controller => 'news' %> |
|
16 |
</div> |
|
17 |
<% if User.current.allowed_to?(:view_issues, nil, :global => true) %> |
|
18 |
<div class="issues box"> |
|
19 |
<h3><%=l(:label_issue_tracking)%></h3> |
|
20 |
<%= render :partial => 'issues/total_issues_list', :locals => {:project => nil, :trackers => @trackers, :open_issues_by_tracker => @open_issues_by_tracker, :total_issues_by_tracker => @total_issues_by_tracker} %> |
|
21 |
<p> |
|
22 |
<%= link_to l(:label_issue_view_all), _project_issues_path(nil, :set_filter => 1) %> |
|
23 |
<% if User.current.allowed_to?(:view_calendar, nil, :global => true) %> |
|
24 |
| <%= link_to l(:label_calendar), _project_calendar_path(nil) %> |
|
25 |
<% end %> |
|
26 |
<% if User.current.allowed_to?(:view_gantt, nil, :global => true) %> |
|
27 |
| <%= link_to l(:label_gantt), _project_gantt_path(nil) %> |
|
28 |
<% end %> |
|
29 |
</p> |
|
28 | 30 |
</div> |
29 |
</li> |
|
30 | 31 |
<% end %> |
31 |
<% @project = nil %> |
|
32 |
</ul> |
|
33 |
</div> |
|
34 | 32 |
<% end %> |
35 |
<%= call_hook(:view_welcome_index_right, :projects => @projects) %>
|
|
33 |
<%= call_hook(:view_welcome_index_right, :projects => @projects) %> |
|
36 | 34 |
</div> |
37 | 35 | |
38 | 36 |
<% content_for :header_tags do %> |
- « Previous
- 1
- 2
- Next »