Move resource cards layout inside #available-resources-section and switch from equalizer alignment to a responsive grid layout. Note that using `grid-auto-rows: 1fr` requires us to change the CSS of the card itself so the "see resource" link remains at the bottom of the card.
24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
<div id="<%= dom_id(resource) %>"
|
|
class="resource-card <%= resource_card_class %>"
|
|
title="<%= resource_tooltip %>">
|
|
<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>
|
|
|
|
<% 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><%= resource_availability_label %></strong>
|
|
<% end %>
|
|
</div>
|