# HG changeset patch # User Chris Cannam # Date 1363179991 0 # Node ID 345e08eee1664373fcfbdf8f10a36c24d6b238bb # Parent c2e85aec91b2fa195b82fb3e3971e0d073d28ad7 Some fixes from comparing plugin views to core app views diff -r c2e85aec91b2 -r 345e08eee166 app/views/projects/index.html.erb --- a/app/views/projects/index.html.erb Wed Mar 13 11:11:16 2013 +0000 +++ b/app/views/projects/index.html.erb Wed Mar 13 13:06:31 2013 +0000 @@ -4,7 +4,6 @@
<%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%> - <%= ('| ' + link_to(l(:label_issue_view_all), issues_path)).html_safe if User.current.allowed_to?(:view_issues, nil, :global => true) %> <%= ('| ' + link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add')).html_safe if User.current.allowed_to?(:add_project, nil, :global => true) %>
diff -r c2e85aec91b2 -r 345e08eee166 plugins/redmine_bibliography/app/views/projects/show.html.erb --- a/plugins/redmine_bibliography/app/views/projects/show.html.erb Wed Mar 13 11:11:16 2013 +0000 +++ b/plugins/redmine_bibliography/app/views/projects/show.html.erb Wed Mar 13 13:06:31 2013 +0000 @@ -3,6 +3,13 @@ <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %> <% end %> + <% if User.current.allowed_to?(:close_project, @project) %> + <% if @project.active? %> + <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %> + <% else %> + <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %> + <% end %> + <% if @project.module_enabled? :redmine_bibliography %> <% if User.current.allowed_to?(:add_publication, @project) %> <%= link_to l(:label_add_publication_to_project), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %> @@ -26,10 +33,10 @@
@@ -40,15 +47,21 @@

<%=l(:label_overview)%>

+<% unless @project.active? %> +

<%= l(:text_project_closed) %>

+<% end %> +
+ <% if @project.description.present? %>
<%= textilizable @project.description %>
+ <% end %> - <% if User.current.allowed_to?(:view_issues, @project) %> + <% if User.current.allowed_to?(:view_issues, @project) and @open_issues_by_tracker.values.any? %>

<%=l(:label_issue_tracking)%>

@@ -97,16 +110,23 @@

<%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %>

<% end %> + + <%= render :partial => 'activities/recent' %> + <%= call_hook(:view_projects_show_right, :project => @project) %>
<% content_for :sidebar do %> <%= call_hook(:view_projects_show_sidebar_top, :project => @project) %> - <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %> + <% if @total_hours.present? && User.current.allowed_to?(:view_time_entries, @project) %>

<%= l(:label_spent_time) %>

<%= l_hours(@total_hours) %>

-

<%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> | - <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %>

+

+ <% if User.current.allowed_to?(:log_time, @project) %> + <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> | + <% end %> + <%= link_to(l(:label_details), project_time_entries_path(@project)) %> | + <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %>

<% end %> <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %> <% end %>