Replace all instances of check.gif appearing in listings
[civicrm-core.git] / templates / CRM / Price / Page / Option.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
10{if ($action eq 1 or $action eq 2 or $action eq 4 or $action eq 8 and !$usedBy) and !$isReserved}
1d61ba2b 11 {include file="CRM/Price/Form/Option.tpl"}
6a488035 12
e5e8ab99 13{elseif $usedBy}
1d61ba2b
CW
14 <div class='spacer'></div>
15 <div id="price_set_used_by" class="messages status no-popup">
6a488035 16 <div class="icon inform-icon"></div>
1d61ba2b
CW
17 {if $action eq 8}
18 {ts 1=$usedPriceSetTitle}Unable to delete the '%1' Price Field Option - it is currently in use by one or more active events or contribution pages or contributions.{/ts}
19 {/if}
6a488035 20
1d61ba2b
CW
21 {if $usedBy.civicrm_event or $usedBy.civicrm_contribution_page}
22 {include file="CRM/Price/Page/table.tpl"}
6a488035
TO
23 {/if}
24
1d61ba2b 25 </div>
e5e8ab99 26{else}
6a488035
TO
27
28
e5e8ab99 29 {if $customOption}
6a488035
TO
30
31 <div id="field_page">
e5e8ab99
CW
32 <p></p>
33 {strip}
34 {* handle enable/disable actions*}
35 {include file="CRM/common/enableDisableApi.tpl"}
e5e1786f 36 <table id="options" class="row-highlight">
e5e8ab99
CW
37 <thead>
38 <tr>
39 <th>{ts}Option Label{/ts}</th>
40 <th>{ts}Option Amount{/ts}</th>
5afce5ad 41 <th>{ts}Non-deductible Amount{/ts}</th>
5bfef8fa
SL
42 <th>{ts}Pre Help{/ts}</th>
43 <th>{ts}Post Help{/ts}</th>
a8e4ceb4
DG
44 {if $isEvent}
45 <th>{ts}Participant Count{/ts}</th>
46 <th>{ts}Maximum{/ts}</th>
47 {/if}
e5e8ab99
CW
48 <th>{ts}Default{/ts}</th>
49 <th>{ts}Financial Type{/ts}</th>
50 <th>{ts}Order{/ts}</th>
a32709be
PB
51 {if $getTaxDetails}
52 <th>{ts}Tax Label{/ts}</th>
53 <th>{ts}Tax Amount{/ts}</th>
54 {/if}
e5e8ab99
CW
55 <th>{ts}Enabled?{/ts}</th>
56 <th></th>
1d61ba2b 57 </tr>
e5e8ab99
CW
58 </thead>
59 <tbody>
60 {foreach from=$customOption item=row}
61 <tr id="price_field_value-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
62 <td class="crm-price-option-label crm-editable" data-field="label">{$row.label}</td>
63 <td class="crm-price-option-value">{$row.amount|crmMoney}</td>
5afce5ad 64 <td class="crm-price-option-non-deductible-amount">{$row.non_deductible_amount|crmMoney}</td>
5bfef8fa
SL
65 <td class="crm-price-option-pre-help">{$row.help_pre}</td>
66 <td class="crm-price-option-post-help">{$row.help_post}</td>
a8e4ceb4
DG
67 {if $isEvent}
68 <td class="crm-price-option-count">{$row.count}</td>
69 <td class="crm-price-option-max">{$row.max_value}</td>
70 {/if}
f4388b57 71 <td class="crm-price-option-is_default">{icon condition=$row.is_default}{ts}Default{/ts}{/icon}</td>
e5e8ab99
CW
72 <td class="nowrap crm-price-option-financial-type-id">{$row.financial_type_id}</td>
73 <td class="nowrap crm-price-option-order">{$row.weight}</td>
3b5db8ce 74 {if $getTaxDetails}
75 <td>{if $row.tax_rate != '' }
cc3f313d 76 {$taxTerm} ({$row.tax_rate}%)
3b5db8ce 77 {/if}
78 </td>
79 <td>{$row.tax_amount|crmMoney}</td>
80 {/if}
e5e8ab99
CW
81 <td id="row_{$row.id}_status" class="crm-price-option-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
82 <td>{$row.action|replace:'xx':$row.id}</td>
83 </tr>
84 {/foreach}
85 </tbody>
6a488035 86 </table>
e5e8ab99 87 {/strip}
6a488035
TO
88 </div>
89
e5e8ab99 90 {else}
6a488035 91 {if $action eq 16}
e5e8ab99
CW
92 <div class="messages status no-popup">
93 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
94 {ts}None found.{/ts}
1d61ba2b 95 </div>
6a488035 96 {/if}
e5e8ab99
CW
97 {/if}
98 {if $addMoreFields && !$isReserved}
99 <div class="action-link">
80bc2820
AH
100 {crmButton q="reset=1&action=add&fid=$fid&sid=$sid" icon="plus-circle"}{ts 1=$fieldTitle}New Option for '%1'{/ts}{/crmButton}
101 {crmButton p="civicrm/admin/price/field" q="reset=1&sid=$sid" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
1d61ba2b
CW
102 </div>
103 {/if}
6a488035 104{/if}