To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / projects / show.rhtml @ 811:b4e59a60b447

History | View | Annotate | Download (4.43 KB)

1 0:513646585e45 Chris
<div class="contextual">
2
        <% if User.current.allowed_to?(:add_subprojects, @project) %>
3 22:40f7cfd4df19 chris
                <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %>
4 0:513646585e45 Chris
        <% end %>
5
</div>
6
7 351:ebf53b46f3f3 chris
<% if @project.has_welcome_page %>
8 350:a1e6dc0e204b chris
<% page = @project.wiki.find_page("Overview") %>
9 351:ebf53b46f3f3 chris
<% end %>
10 350:a1e6dc0e204b chris
11
<% if page %>
12
13 490:cd64fb9ab701 chris
<% if @project.module_enabled? :wiki %>
14
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
15
<div class="contextual">
16
<%= link_to(l(:button_welcome_page_edit_this), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
17
</div>
18
<% end %>
19
<% end %>
20
21 350:a1e6dc0e204b chris
<div class="contextual" style="clear: right">
22
<ul>
23
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
24
<% if @subprojects.any? %>
25
        <li><%=l(:label_subproject_plural)%>:
26
            <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
27
<% end %>
28
</ul>
29
</div>
30
31
<%= render(:partial => "wiki/content", :locals => {:content => page.content_for_version()}) %>
32
33
<% else %>
34
35 0:513646585e45 Chris
<h2><%=l(:label_overview)%></h2>
36
37
<div class="splitcontentleft">
38
        <div class="wiki">
39
                <%= textilizable @project.description %>
40
        </div>
41
        <ul>
42
        <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
43
  <% if @subprojects.any? %>
44
         <li><%=l(:label_subproject_plural)%>:
45
            <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
46
  <% end %>
47 37:94944d00e43c chris
        <% @project.visible_custom_field_values.each do |custom_value| %>
48 0:513646585e45 Chris
        <% if !custom_value.value.blank? %>
49
           <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
50
        <% end %>
51
        <% end %>
52
        </ul>
53
54 345:361602c5e6bb chris
  <% if User.current.allowed_to?(:view_issues, @project) and @open_issues_by_tracker.values.any? %>
55
56 0:513646585e45 Chris
  <div class="issues box">
57
    <h3><%=l(:label_issue_tracking)%></h3>
58
    <ul>
59
    <% for tracker in @trackers %>
60
      <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project,
61
                                                :set_filter => 1,
62
                                                "tracker_id" => tracker.id %>:
63
                                        <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
64
                                                                                                                                                                                                                :total => @total_issues_by_tracker[tracker].to_i) %>
65
                        </li>
66
    <% end %>
67
    </ul>
68
    <p>
69
            <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
70
            <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
71
                                | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
72
                        <% end %>
73
                        <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
74
                                | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
75
                        <% end %>
76
                </p>
77
  </div>
78 345:361602c5e6bb chris
79 0:513646585e45 Chris
  <% end %>
80 344:1a514b9347d4 chris
81 0:513646585e45 Chris
  <%= call_hook(:view_projects_show_left, :project => @project) %>
82
</div>
83
84
<div class="splitcontentright">
85 14:1d32c0a0efbf Chris
  <%= render :partial => 'members_box' %>
86 0:513646585e45 Chris
87
  <% if @news.any? && authorize_for('news', 'index') %>
88
  <div class="news box">
89
    <h3><%=l(:label_news_latest)%></h3>
90
    <%= render :partial => 'news/news', :collection => @news %>
91
    <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
92
  </div>
93
  <% end %>
94 344:1a514b9347d4 chris
95
  <%= render :partial => 'activities/recent' %>
96
97 0:513646585e45 Chris
  <%= call_hook(:view_projects_show_right, :project => @project) %>
98
</div>
99
100
<% content_for :sidebar do %>
101 810:aaa26ccafb00 chris
    <%= call_hook(:view_projects_show_sidebar_top, :project => @project) %>
102 441:cbce1fd3b1b7 Chris
    <% if @total_hours.present? %>
103 0:513646585e45 Chris
    <h3><%= l(:label_spent_time) %></h3>
104
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
105 37:94944d00e43c chris
    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> |
106
    <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %></p>
107 0:513646585e45 Chris
    <% end %>
108
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
109
<% end %>
110
111 350:a1e6dc0e204b chris
<% end %>
112
113 0:513646585e45 Chris
<% content_for :header_tags do %>
114 22:40f7cfd4df19 chris
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
115 0:513646585e45 Chris
<% end %>
116
117
<% html_title(l(:label_overview)) -%>