To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / projects / show.rhtml @ 829:7a613c0eefe2
History | View | Annotate | Download (4.43 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 |
</div>
|
| 6 |
|
| 7 |
<% if @project.has_welcome_page %>
|
| 8 |
<% page = @project.wiki.find_page("Overview") %>
|
| 9 |
<% end %>
|
| 10 |
|
| 11 |
<% if page %>
|
| 12 |
|
| 13 |
<% 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 |
<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 |
<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 |
<% @project.visible_custom_field_values.each do |custom_value| %>
|
| 48 |
<% 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 |
<% if User.current.allowed_to?(:view_issues, @project) and @open_issues_by_tracker.values.any? %>
|
| 55 |
|
| 56 |
<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 |
|
| 79 |
<% end %>
|
| 80 |
|
| 81 |
<%= call_hook(:view_projects_show_left, :project => @project) %>
|
| 82 |
</div>
|
| 83 |
|
| 84 |
<div class="splitcontentright"> |
| 85 |
<%= render :partial => 'members_box' %>
|
| 86 |
|
| 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 |
|
| 95 |
<%= render :partial => 'activities/recent' %>
|
| 96 |
|
| 97 |
<%= call_hook(:view_projects_show_right, :project => @project) %>
|
| 98 |
</div>
|
| 99 |
|
| 100 |
<% content_for :sidebar do %>
|
| 101 |
<%= call_hook(:view_projects_show_sidebar_top, :project => @project) %>
|
| 102 |
<% if @total_hours.present? %>
|
| 103 |
<h3><%= l(:label_spent_time) %></h3> |
| 104 |
<p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p> |
| 105 |
<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 |
<% end %>
|
| 108 |
<%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
|
| 109 |
<% end %>
|
| 110 |
|
| 111 |
<% end %>
|
| 112 |
|
| 113 |
<% content_for :header_tags do %>
|
| 114 |
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
|
| 115 |
<% end %>
|
| 116 |
|
| 117 |
<% html_title(l(:label_overview)) -%>
|