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.html.erb @ 1591:63650ae64bf2

History | View | Annotate | Download (4.92 KB)

1
<div class="contextual">
2
  <% if User.current.allowed_to?(:add_subprojects, @project) %>
3
    <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
4
  <% end %>
5
  <% if User.current.allowed_to?(:close_project, @project) %>
6
    <% if @project.active? %>
7
      <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %>
8
    <% else %>
9
      <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
10
    <% end %>
11
  <% end %>
12
</div>
13

    
14
<% if @project.has_welcome_page %>
15
<% page = @project.wiki.find_page("Overview") %>
16
<% end %>
17

    
18
<% if page %>
19

    
20
<% if @project.module_enabled? :wiki %>
21
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
22
<div class="contextual">
23
<%= link_to(l(:button_welcome_page_edit_this), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
24
</div>
25
<% end %>
26
<% end %>
27

    
28
<div class="contextual" style="clear: right">
29
<ul>
30
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li><% end %>
31
<% if @subprojects.any? %>
32
        <li><%=l(:label_subproject_plural)%>:
33
            <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ").html_safe %></li>
34
<% end %>
35
</ul>
36
</div>
37

    
38
<%= render(:partial => "wiki/content", :locals => {:content => page.content_for_version()}) %>
39

    
40
<% else %>
41

    
42
<h2><%=l(:label_overview)%></h2>
43

    
44
<% unless @project.active? %>
45
  <p class="warning"><span class="icon icon-lock"><%= l(:text_project_closed) %></span></p>
46
<% end %>
47

    
48
<div class="splitcontentleft">
49
  <% if @project.description.present? %>
50
  <div class="wiki">
51
    <%= textilizable @project.description %>
52
  </div>
53
  <% end %>
54
  <ul>
55
  <% unless @project.homepage.blank? %>
56
    <li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li>
57
  <% end %>
58
  <% if @subprojects.any? %>
59
    <li><%=l(:label_subproject_plural)%>:
60
      <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %></li>
61
  <% end %>
62
  <% @project.visible_custom_field_values.each do |custom_value| %>
63
  <% if !custom_value.value.blank? %>
64
     <li><%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %></li>
65
  <% end %>
66
  <% end %>
67
  </ul>
68

    
69
  <% if User.current.allowed_to?(:view_issues, @project) and @open_issues_by_tracker.values.any? %>
70

    
71
  <div class="issues box">
72
    <h3><%=l(:label_issue_tracking)%></h3>
73
    <ul>
74
    <% for tracker in @trackers %>
75
      <li><%= link_to h(tracker.name), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>:
76
          <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
77
                                                    :total => @total_issues_by_tracker[tracker].to_i) %>
78
      </li>
79
    <% end %>
80
    </ul>
81
    <p>
82
      <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
83
      <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
84
        | <%= link_to l(:label_calendar), project_calendar_path(@project) %>
85
      <% end %>
86
      <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
87
        | <%= link_to l(:label_gantt), project_gantt_path(@project) %>
88
      <% end %>
89
    </p>
90
  </div>
91

    
92
  <% end %>
93

    
94
  <%= call_hook(:view_projects_show_left, :project => @project) %>
95
</div>
96

    
97
<div class="splitcontentright">
98
  <%= render :partial => 'members_box' %>
99

    
100
  <% if @news.any? && authorize_for('news', 'index') %>
101
  <div class="news box">
102
    <h3><%=l(:label_news_latest)%></h3>
103
    <%= render :partial => 'news/news', :collection => @news %>
104
    <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
105
  </div>
106
  <% end %>
107

    
108
  <%= render :partial => 'activities/recent' %>
109

    
110
  <%= call_hook(:view_projects_show_right, :project => @project) %>
111
</div>
112

    
113
<% content_for :sidebar do %>
114
    <%= call_hook(:view_projects_show_sidebar_top, :project => @project) %>
115
    <% if @total_hours.present? %>
116
    <h3><%= l(:label_spent_time) %></h3>
117
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
118
    <p>
119
    <% if User.current.allowed_to?(:log_time, @project) %>
120
      <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
121
    <% end %>
122
    <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
123
    <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
124
    <% end %>
125
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
126
<% end %>
127

    
128
<% end %>
129

    
130
<% content_for :header_tags do %>
131
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
132
<% end %>
133

    
134
<% html_title('') -%>