comparison vendor/plugins/redmine_bibliography/app/views/projects/show.rhtml @ 680:65abc6b39292 live

Transfer custom welcome-page code from mainline to bibliography plugin code. This is far too awkward. We need a better way.
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 14 Sep 2011 14:26:22 +0100
parents e2663e0bd5a6
children aaa26ccafb00
comparison
equal deleted inserted replaced
675:fccacd8505e3 680:65abc6b39292
7 <% if User.current.allowed_to?(:add_publication, @project) %> 7 <% if User.current.allowed_to?(:add_publication, @project) %>
8 <%= link_to l(:label_add_publication_to_project), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %> 8 <%= link_to l(:label_add_publication_to_project), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>
9 <% end %> 9 <% end %>
10 <% end %> 10 <% end %>
11 </div> 11 </div>
12
13 <% if @project.has_welcome_page %>
14 <% page = @project.wiki.find_page("Overview") %>
15 <% end %>
16
17 <% if page %>
18
19 <% if @project.module_enabled? :wiki %>
20 <% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
21 <div class="contextual">
22 <%= link_to(l(:button_welcome_page_edit_this), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
23 </div>
24 <% end %>
25 <% end %>
26
27 <div class="contextual" style="clear: right">
28 <ul>
29 <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
30 <% if @subprojects.any? %>
31 <li><%=l(:label_subproject_plural)%>:
32 <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
33 <% end %>
34 </ul>
35 </div>
36
37 <%= render(:partial => "wiki/content", :locals => {:content => page.content_for_version()}) %>
38
39 <% else %>
12 40
13 <h2><%=l(:label_overview)%></h2> 41 <h2><%=l(:label_overview)%></h2>
14 42
15 <div class="splitcontentleft"> 43 <div class="splitcontentleft">
16 <div class="wiki"> 44 <div class="wiki">
80 <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %></p> 108 <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %></p>
81 <% end %> 109 <% end %>
82 <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %> 110 <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
83 <% end %> 111 <% end %>
84 112
113 <% end %>
114
85 <% content_for :header_tags do %> 115 <% content_for :header_tags do %>
86 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %> 116 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
87 <% end %> 117 <% end %>
88 118
89 <% html_title(l(:label_overview)) -%> 119 <% html_title(l(:label_overview)) -%>