Project

General

Profile

Patch #2198 » projects_show.rhtml.diff

Anh Kỳ Huỳnh, 2008-11-15 17:48

View differences:

app/views/projects/show.rhtml (working copy)
1
<h2><%=l(:label_overview)%></h2> 
2
	
1
<h2><%=l(:label_overview)%></h2>
2

  
3 3
<div class="splitcontentleft">
4
	<%= textilizable @project.description %>	
4
	<%= textilizable @project.description %>
5 5
	<ul>
6 6
	<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to(h(@project.homepage), @project.homepage) %></li><% end %>
7 7
    <% if @subprojects.any? %>
......
15 15
	   <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
16 16
	<% end %>
17 17
	<% end %>
18
	</ul>	
18
	</ul>
19 19

  
20 20
  <% if User.current.allowed_to?(:view_issues, @project) %>
21
  <div class="box">    
21
  <div class="box">
22 22
    <h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3>
23 23
    <ul>
24
    <% for tracker in @trackers %>    
25
      <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project, 
26
                                                :set_filter => 1, 
24
    <% for tracker in @trackers %>
25
      <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project,
26
                                                :set_filter => 1,
27 27
                                                "tracker_id" => tracker.id %>:
28 28
      <%= @open_issues_by_tracker[tracker] || 0 %> <%= lwr(:label_open_issues, @open_issues_by_tracker[tracker] || 0) %>
29 29
      <%= l(:label_on) %> <%= @total_issues_by_tracker[tracker] || 0 %></li>
......
37 37
<div class="splitcontentright">
38 38
    <% if @members_by_role.any? %>
39 39
	<div class="box">
40
		<h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>	
40
		<h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>
41 41
		<p><% @members_by_role.keys.sort.each do |role| %>
42 42
		<%= role.name %>:
43
		<%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %>
43
		<% users = @members_by_role[role].sort{|a,b| b[:created_on] <=> a[:created_on]} -%>
44
		<%= users[0,25].collect(&:user).collect{|u| link_to_user u}.join(", ") %>
45
		<%= "... (#{users.size} total)" if users.size > 25 -%>
44 46
		<br />
45 47
		<% end %></p>
46 48
	</div>
47 49
	<% end %>
48
    
50

  
49 51
  <% if @news.any? && authorize_for('news', 'index') %>
50 52
  <div class="box">
51
    <h3><%=l(:label_news_latest)%></h3>  
53
    <h3><%=l(:label_news_latest)%></h3>
52 54
    <%= render :partial => 'news/news', :collection => @news %>
53 55
    <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
54
  </div>  
56
  </div>
55 57
  <% end %>
56 58
</div>
57 59

  
......
64 66
    <h3><%= l(:label_planning) %></h3>
65 67
    <p><%= planning_links.join(' | ') %></p>
66 68
    <% end %>
67
    
69

  
68 70
    <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
69 71
    <h3><%= l(:label_spent_time) %></h3>
70 72
    <p><span class="icon icon-time"><%= lwr(:label_f_hour, @total_hours) %></span></p>
    (1-1/1)