Project

General

Profile

RE: Projects Tree View Plugin - Version 0.0.1 ยป projects_tree_view_1.4.patch

Jonathan Himbing, 2012-06-21 09:32

View differences:

/Users/nathanjo/Downloads/dubcanada-projects_tree_view-81f1f44/app/views/admin/projects.rhtml 2011-12-01 07:01:32.000000000 +0800
81 81
    <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %>
82 82
    <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %>
83 83
    <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
84
    <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
84
    <%= link_to(l(:button_delete), project_destroy_confirm_path(project), :class => 'icon icon-del') %>
85 85
  </td>
86 86
  </tr>
87 87
<% end %>
/Users/nathanjo/Downloads/dubcanada-projects_tree_view-81f1f44/app/views/projects/index.rhtml 2011-12-01 07:01:32.000000000 +0800
1 1
<% content_for :header_tags do %>
2 2
    <%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
3 3
<% end %>
4

  
5 4
<div class="contextual">
5
    <% if authorize_global_implemented %>
6 6
    <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
7
    <% else %>
8
      <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.admin? %>
9
    <% end %>
7 10
    <%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
8
    <%= link_to(l(:label_overall_spent_time), time_entries_path) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
9
    <%= link_to l(:label_overall_activity),
10
                { :controller => 'activities', :action => 'index',
11
                  :id => nil } %>
11
    <%= link_to(l(:label_overall_spent_time), { :controller => 'time_entries' }) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
12
    <%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%>
12 13
</div>
13 14

  
14 15
<h2><%=l(:label_project_plural)%></h2>
/Users/nathanjo/Downloads/dubcanada-projects_tree_view-81f1f44/app/views/projects/show.rhtml 2011-12-01 07:01:32.000000000 +0800
2 2
	
3 3
<div class="splitcontentleft">
4 4
	<%= textilizable @project.description %>
5
	<% @project.custom_values.each do |custom_value| %>
6
	<% if !custom_value.value.empty? %>
7
	   <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
8
	<% end %>
9
	<% end %>
10 5
	<ul>
11 6
	<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to(h(@project.homepage), @project.homepage) %></li><% end %>
12 7
	</ul>
......
50 45
	  </tbody>
51 46
	</table>
52 47
  <% end %>
48
	<% @project.custom_values.each do |custom_value| %>
49
	<% if !custom_value.value.empty? %>
50
	   <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
51
	<% end %>
52
	<% end %>
53 53

  
54 54
  <% if User.current.allowed_to?(:view_issues, @project) %>
55 55
  <div class="box">    
......
71 71
</div>
72 72

  
73 73
<div class="splitcontentright">
74
  <%= render :partial => 'members_box' %>
74
<% if users_by_role_implemented %>
75
	<% if @members_by_role.any? %>
76
	  <div class="box">
77
		<h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>	
78
		<p><% @members_by_role.keys.sort.each do |role| %>
79
		<%= role.name %>:
80
		<%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %>
81
		<br />
82
		<% end %></p>
83
	  </div>
84
	<% end %>
85
<% else %>
86
	<% if @users_by_role.any? %>
87
	  <div class="box">
88
		<h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>    
89
		<p><% @users_by_role.keys.sort.each do |role| %>
90
		<%=h role %>: <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ") %><br />
91
		<% end %></p>
92
	  </div>
93
	<% end %>
94
<% end %>
75 95
  
76 96
  <% if @news.any? && authorize_for('news', 'index') %>
77 97
  <div class="box">
......
96 116
    <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
97 117
    <h3><%= l(:label_spent_time) %></h3>
98 118
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
99
    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> |
119
    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'details', :project_id => @project}) %> |
100 120
    <%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %></p>
101 121
    <% end %>
102 122
<% end %>
103 123

  
104 124
<% content_for :header_tags do %>
105
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
125
<%= auto_discovery_link_tag(:atom, {:action => 'activity', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
106 126
<% end %>
107 127

  
108 128
<% html_title(l(:label_overview)) -%>
    (1-1/1)