From 9d85b39356d9f29c7cf7a66cacb2e8ac34c366c8 Mon Sep 17 00:00:00 2001
From: taitus
Date: Thu, 14 Mar 2019 11:39:20 +0100
Subject: [PATCH] Display correcty link for resources with
request_to_administrator: false
Fix: When a resource not need request_for_administrator always show text "request_resource" when the correct text is "view_resource".
---
app/views/dashboard/_resource.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/dashboard/_resource.html.erb b/app/views/dashboard/_resource.html.erb
index a0447d518..7b0f77d35 100644
--- a/app/views/dashboard/_resource.html.erb
+++ b/app/views/dashboard/_resource.html.erb
@@ -11,7 +11,7 @@
- <% if resource.executed_for?(proposal) %>
+ <% if resource.executed_for?(proposal) || (!resource.request_to_administrators && resource.active_for?(proposal)) %>
<%= link_to t("dashboard.resource.view_resource"),
new_request_proposal_dashboard_action_path(proposal, resource),
class: "button" %>