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 @ 1268:2818bf60c84c

History | View | Annotate | Download (5.26 KB)

1
<div class="contextual">
2
  <% if User.current.allowed_to?(:add_subprojects, @project) %>
3
    <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :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(h(p), :action => 'show', :id => 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), :controller => 'issues', :action => 'index', :project_id => @project,
76
                                                :set_filter => 1,
77
                                                "tracker_id" => tracker.id %>:
78
          <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
79
                                                    :total => @total_issues_by_tracker[tracker].to_i) %>
80
      </li>
81
    <% end %>
82
    </ul>
83
    <p>
84
      <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
85
      <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
86
        | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
87
      <% end %>
88
      <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
89
        | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
90
      <% end %>
91
    </p>
92
  </div>
93

    
94
  <% end %>
95

    
96
  <%= call_hook(:view_projects_show_left, :project => @project) %>
97
</div>
98

    
99
<div class="splitcontentright">
100
  <%= render :partial => 'members_box' %>
101

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

    
110
  <%= render :partial => 'activities/recent' %>
111

    
112
  <%= call_hook(:view_projects_show_right, :project => @project) %>
113
</div>
114

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

    
130
<% end %>
131

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

    
136
<% html_title(l(:label_overview)) -%>