annotate app/views/projects/show.rhtml @ 1452:d6b9fd02bb89 feature_36_js_refactoring

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