houdini/app/views/campaign_gift_options/_manage_modal.html.erb

92 lines
3.2 KiB
Text
Raw Normal View History

2020-06-12 20:03:43 +00:00
<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
<div class='modal fullScreen' id='manageGiftOptionsModal'>
<%= render 'common/modal_header', title: t('campaign_gift_options.manage_gift_options') %>
<section class='modal-body'>
<p>
<a class='button'>
<!--= on 'click' gift_options.open_new -->
<i class='fa fa-plus'></i> <%= t('campaign_gift_options.new_gift_option')%>
</a>
</p>
<p class='noResults'>
<!--= show_if (empty gift_options.data) -->
<%= t('campaign_gift_options.no_gift_options') %>
</p>
<form>
<table class='table'>
<!--= show_if (length gift_options.data) -->
<thead>
<th></th>
<th><%= t('campaign_gift_options.name')%></th>
<th><%= t('campaign_gift_options.one_time_br_amount')%></th>
<th><%= t('campaign_gift_options.recurring_br_amount')%></th>
<th>
<!--= show_if gift_options.has_any_quantities -->
<%= t('campaign_gift_options.limit')%>
</th>
<th>
<!--= show_if gift_options.has_any_quantities -->
<%= t('campaign_gift_options.remaining')%>
</th>
<th><%= t('campaign_gift_options.id') %></th>
<th></th>
</thead>
<tbody id='js-reorderGifts'>
<tr class='u-width--full draggable-item'>
<!--= repeat gift_options.data -->
<td class='u-paddingX--0'>
<i class='draggable-grip'></i>
<input type='hidden' name='id'></input>
<!--= set_value this.id -->
</td>
<td class='u-paddingLeft--0'>
<strong><!--= put this.name --></strong>
</td>
<td>
<span>
<!--= show_if this.amount_one_time -->
$<!--= put (cents_to_dollars this.amount_one_time) -->
</span>
</td>
<td>
<span>
<!--= show_if this.amount_recurring -->
$<!--= put (cents_to_dollars this.amount_recurring) -->
</span>
</td>
<td>
<!--= show_if gift_options.has_any_quantities -->
<!--= put this.quantity -->
</td>
<td>
<!--= show_if gift_options.has_any_quantities -->
<!--= put this.remaining -->
</td>
<td>
<!--= put this.id -->
</td>
<td style='width: 200px'>
<a class='button--tiny edit u-marginRight--10'>
<!--= on 'click' (gift_options.open_edit this)-->
<i class='fa fa-pencil'></i> <%= t('ui.edit') %>
</a>
<a class='button--tiny red'>
<!--= on 'click' (confirm (ajax_gift_options.del this.id)) -->
<i class='fa fa-times'></i> <%= t('ui.remove') %>
</a>
</td>
</tr>
</tbody>
</table>
</form>
</section>
</div>