Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redmine3.x #24

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.0.6 (2012-05-30):
* patched to work with redmine 2.0
* UI updated to enforce breakline properly utilised
0.0.5 (2011-01-23):
* added js exapnd all button
* Fixed missing spent time link
Expand Down
3 changes: 2 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ propagates the tree view to the project show page's subprojects list.
* Anton-zaytsev
* Shadowbq
* cforce
* danmunn
==Changelog

For the complete changelog see the <tt>CHANGELOG</tt>-file in the Projects Tree View plugin directory.

==Latest stable release

The currently available, latest stable release of the plugin is version <b>0.0.3</b>.
The currently available, latest stable release of the plugin is version <b>0.0.6</b>.

==Compatibility

Expand Down
97 changes: 0 additions & 97 deletions app/views/admin/projects.rhtml

This file was deleted.

74 changes: 74 additions & 0 deletions app/views/projects/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<% content_for :header_tags do %>
<%= javascript_include_tag 'projects_tree_view', :plugin => 'projects_tree_view' %>
<%= stylesheet_link_tag 'projects_tree_view', :plugin => 'projects_tree_view' %>
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
<% end %>

<div class="contextual">
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
<%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
<%= link_to(l(:label_overall_spent_time), time_entries_path) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
<%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index', :id => nil } %>
</div>

<h2><%= l(:label_project_plural)%></h2>

<p>
<%= link_to(l(:expand_all), "#", :onclick => 'expandAll()')%><span>&nbsp;/&nbsp;</span><%= link_to l(:collapse_all), "#", :onclick => 'collapseAll()' %>
</p>

<table class="list">
<% show_project_progress = Setting.plugin_projects_tree_view['show_project_progress'] %>
<thead>
<tr>
<th><%= l(:label_project)%></th>
<th><%= l(:field_description)%></th>
<th><%= l(:field_go_to)%></th>
<% if show_project_progress %>
<th><%= l(:field_versions)%></th>
<% end %>
<th><%= l(:field_created_on)%></th>
</tr>
</thead>
<tbody>
<% ancestors = [] %>
<% plevel = 0 %>
<% project_tree(@projects) do |project, level| %>
<% project_id = "%04d" % project.id %>
<% (plevel - level).times { ancestors.pop } if (level < plevel) %>
<% has_children = !project.children.empty? %>
<tr id="<%= project_id %>" class="<%= project.css_classes %> <%= level > 0 ? "hide #{ancestors.last}" : cycle("odd", "even") %>">
<td class="name" style="padding-left: <%= 18 * level %>px">
<% if has_children %>
<span class="expander" onclick="toggleShowHide(<%= "'#{project_id}'" %>)">&nbsp;</span>
<% end %>
<%= project.active? ? link_to_project(project) : h(project.name) %>
<span class="empty <%= "my-project" if User.current.member_of?(project) %>">&nbsp;</span></td>
<td><%= textilizable project.short_description.gsub(/\!.+\!/,""), :project => project %></td>
<td><%= favorite_project_modules_links(project) %></td>
<% if show_project_progress %>
<td><%= render_project_progress(project) %></td>
<% end %>
<td align="center"><%= format_date(project.created_on) %></td>
</tr>
<% ancestors << project_id if has_children %>
<% plevel = level %>
<% end %>
</tbody>
</table>

<p>
<%= link_to(l(:expand_all), "#", :onclick => 'expandAll()')%><span>&nbsp;/&nbsp;</span><%= link_to l(:collapse_all), "#", :onclick => 'collapseAll()' %>
</p>

<% if User.current.logged? %>
<p style="text-align:right;">
<span class="my-project"><%= l(:label_my_projects) %></span>
</p>
<% end %>

<% other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<% end %>

<% html_title(l(:label_project_plural)) -%>
101 changes: 0 additions & 101 deletions app/views/projects/index.rhtml

This file was deleted.

4 changes: 4 additions & 0 deletions app/views/settings/_project_tree_settings.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p>
<%= content_tag(:label, l(:show_progress)) %>
<%= check_box_tag('settings[show_project_progress]', true, @settings['show_project_progress'])%>
</p>
Loading