Files
grecia/app/views/dashboard/_resource.html.erb
taitus 9d85b39356 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".
2019-03-21 12:29:31 +01:00

32 lines
1.4 KiB
Plaintext

<div id="<%= dom_id(resource) %>" class="small-12 medium-6 large-3 column end">
<div class="resource-card <%= resource_card_class(resource, proposal) %>"
data-equalizer-watch="resources"
title="<%= resource_tooltip(resource, proposal) %>">
<h4><%= resource.title %></h4>
<% if is_new_action_since_last_login?(resource, @new_actions_since_last_login) %>
<span class="label"><%= t("dashboard.progress.new_action") %></span>
<% end %>
<p class="resource-description">
<%= resource.short_description %>
</p>
<div class="small-12 column small-centered margin-top">
<% 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" %>
<% elsif resource.requested_for?(proposal) %>
<strong><%= t("dashboard.resource.resource_requested") %></strong>
<% elsif resource.active_for?(proposal) %>
<%= link_to t("dashboard.resource.request_resource"),
new_request_proposal_dashboard_action_path(proposal, resource),
class: "button" %>
<% else %>
<strong>
<%== resoure_availability_label(resource) %>
</strong>
<% end %>
</div>
</div>
</div>