Skip to content

Commit

Permalink
add to collections on card + hide if no collection
Browse files Browse the repository at this point in the history
  • Loading branch information
octavioamu committed Sep 24, 2020
1 parent 7df8b5f commit 7ceaa02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/grants/templates/grants/components/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h2 class="grant-item__title font-subheader">
<i :class="`${!grant.favorite ? 'far' : 'fa' } fa-star`" ></i>
<span class="ml-1 font-body">[[ !grant.favorite ? 'Follow' : 'Following' ]]</span>
</button>
<b-dropdown size="sm" variant="link" toggle-class="text-decoration-none text-muted" id="dropdown-1" text="Add to Collection" class="m-md-2">
<b-dropdown size="sm" variant="link" toggle-class="text-decoration-none text-muted" id="dropdown-1" text="Add to Collection" class="m-md-2" menu-class="shadow-sm" v-if="has_collections">
<template v-slot:button-content>
<span class="text-muted"><i class="fas fa-th-large mr-1"></i> Add to Collection</span>
</template>
Expand Down Expand Up @@ -213,6 +213,12 @@ <h2 class="font-title font-weight-bold amount pt-1 mb-2">
<div class="col-12 pb-3" v-if="grant.is_clr_eligible && grant.is_clr_active">
{% include 'grants/components/clr_estimate.html' %}
</div>
<b-dropdown size="sm" variant="link" toggle-class="text-decoration-none text-muted" id="dropdown-1" text="Add to Collection" class="m-md-2" menu-class="shadow-sm" v-if="has_collections">
<template v-slot:button-content>
<span class="text-muted"><i class="fas fa-th-large mr-1"></i> Add to Collection</span>
</template>
<b-dropdown-item @click.prevent="addToCollection({grant, collection})" v-for="collection in collections">[[collection.title]]</b-dropdown-item>
</b-dropdown>

<div class="col-12 pb-4">
<button @click.prevent="addToCart(grant)" class="btn btn-gc-blue cart-btn large font-body font-weight-semibold mt-1 mr-1">
Expand Down

0 comments on commit 7ceaa02

Please sign in to comment.