From 1877dd0a10d07fd0b512e779deb042b9d165e594 Mon Sep 17 00:00:00 2001
From: Henriette Dinger
Date: Fri, 4 Mar 2016 17:04:56 +0100
Subject: [PATCH] Change block buttons
---
app/views/my_projects_overviews/blocks/_members.html.erb | 6 ++++++
.../my_projects_overviews/blocks/_news_latest.html.erb | 4 ++++
.../blocks/_project_description.html.erb | 7 +++++++
.../blocks/_work_package_tracking.html.erb | 7 ++++---
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/app/views/my_projects_overviews/blocks/_members.html.erb b/app/views/my_projects_overviews/blocks/_members.html.erb
index 85e9041b89..f7021baf49 100644
--- a/app/views/my_projects_overviews/blocks/_members.html.erb
+++ b/app/views/my_projects_overviews/blocks/_members.html.erb
@@ -44,4 +44,10 @@ See doc/COPYRIGHT.md for more details.
<% end %>
+ <% if current_user.admin? %>
+ <%= link_to new_user_path, class: 'button -alt-highlight' do %>
+
+ <%= l('activerecord.models.member') %>
+ <% end %>
+ <% end %>
<% end %>
diff --git a/app/views/my_projects_overviews/blocks/_news_latest.html.erb b/app/views/my_projects_overviews/blocks/_news_latest.html.erb
index c3123b613e..3a29ea7380 100644
--- a/app/views/my_projects_overviews/blocks/_news_latest.html.erb
+++ b/app/views/my_projects_overviews/blocks/_news_latest.html.erb
@@ -37,6 +37,10 @@ See doc/COPYRIGHT.md for more details.
:action => 'index',
:project_id => project},
:class => 'button -highlight' %>
+ <%= link_to new_project_news_path(@project), class: 'button -alt-highlight' do %>
+
+ <%= l('activerecord.models.news') %>
+ <% end %>
<% end %>
diff --git a/app/views/my_projects_overviews/blocks/_project_description.html.erb b/app/views/my_projects_overviews/blocks/_project_description.html.erb
index ba452733e0..9f63523a30 100644
--- a/app/views/my_projects_overviews/blocks/_project_description.html.erb
+++ b/app/views/my_projects_overviews/blocks/_project_description.html.erb
@@ -30,3 +30,10 @@ See doc/COPYRIGHT.md for more details.
<%= textilizable @project.description %>
+
+<% if current_user.admin? %>
+ <%= link_to settings_project_path(project), class: 'button -highlight' do %>
+
+ <%= l(:button_edit) %>
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/my_projects_overviews/blocks/_work_package_tracking.html.erb b/app/views/my_projects_overviews/blocks/_work_package_tracking.html.erb
index b4b2c7a6c4..5f3865f79e 100644
--- a/app/views/my_projects_overviews/blocks/_work_package_tracking.html.erb
+++ b/app/views/my_projects_overviews/blocks/_work_package_tracking.html.erb
@@ -40,12 +40,13 @@ See doc/COPYRIGHT.md for more details.
<%= link_to l(:label_work_package_view_all), {:controller => '/work_packages', :action => 'index', :project_id => project}, :class => 'button -highlight' %>
- <% if User.current.allowed_to?(:view_calendar, project, :global => true) %>
- <%= link_to(l(:label_calendar), {:controller => '/work_packages/calendars', :action => 'index', :project_id => project}, :class => 'button -highlight') %>
- <% end %>
<% if User.current.allowed_to?(:view_gantt, project, :global => true) %>
<%= link_to(l(:label_gantt), {:controller => '/gantts', :action => 'show', :project_id => project}, :class => 'button -highlight') %>
<% end %>
+ <%= link_to new_project_work_packages_path(project), class: 'button -alt-highlight' do %>
+
+ <%= l('activerecord.models.work_package') %>
+ <% end %>
<% end %>