Skip to content

Commit f9403ae

Browse files
committed
Merge pull request cforce#12 from chiastolite/setting_show_project_progress
add setting 'show project progress'
2 parents 8fac1a8 + 4d1c913 commit f9403ae

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

app/views/projects/index.rhtml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
<th><%=l(:label_project)%></th>
2020
<th><%=l(:field_description)%></th>
2121
<th><%=l(:field_go_to)%></th>
22-
<th><%=l(:field_versions)%></th>
22+
<% if Setting.plugin_projects_tree_view['show_project_progress'] %>
23+
<th><%=l(:field_versions)%></th>
24+
<% end %>
2325
<th><%=l(:field_created_on)%></th>
2426
</tr>
2527
</thead>
@@ -77,7 +79,9 @@
7779
<td class="name"><%= "<span style=\"padding-left: " + (2*(ancestors.length-1)).to_s + "em;\"></span>" %><%= spanicon %><%= project.active? ? link_to(h(project.name), {:controller => 'projects', :action => 'show', :id => project}, :class => "project") : h(project.name) %><span <%= openonclick %> class="empty <%=User.current.member_of?(project) ? 'my-project' : nil%>">&nbsp</span></td>
7880
<td <%= openonclick %> ><%= textilizable project.short_description.gsub(/\!.+\!/,""), :project => project %></td>
7981
<td><%= favorite_project_modules_links(project) %></td>
80-
<td <%= render_project_progress(project) %></td>
82+
<% if Setting.plugin_projects_tree_view['show_project_progress'] %>
83+
<td <%= render_project_progress(project) %></td>
84+
<% end %>
8185
<td align="center"><%= format_date(project.created_on) %></td>
8286
</tr>
8387
<% end %>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<p>
2+
<table>
3+
<tr>
4+
<td><%= l(:show_progress) %></td>
5+
<td><%= check_box_tag('settings[show_project_progress]', true, @settings['show_project_progress'])%></td>
6+
</tr>
7+
</table>
8+
</p>
9+

config/locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ en:
55
field_go_to: Go to module
66
subprojects: sub projects
77
expand_all: "Expand All"
8+
show_progress: "Show project progress"

init.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
author 'Chris Peterson and github contributors'
99
description 'This is a Redmine plugin which will turn the projects page into a tree view'
1010
version '0.0.5'
11+
12+
settings :default => {
13+
'show_project_progress' => true
14+
}, :partial => 'settings/project_tree_settings'
1115
end
1216

1317
class ProjectsTreeViewListener < Redmine::Hook::ViewListener

0 commit comments

Comments
 (0)