| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.7 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright (C) 2011 Marty Wright | |
| 6 | | Licensed to CiviCRM under the Academic Free License version 3.0. | |
| 7 | +--------------------------------------------------------------------+ |
| 8 | | This file is a part of CiviCRM. | |
| 9 | | | |
| 10 | | CiviCRM is free software; you can copy, modify, and distribute it | |
| 11 | | under the terms of the GNU Affero General Public License | |
| 12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | |
| 13 | | | |
| 14 | | CiviCRM is distributed in the hope that it will be useful, but | |
| 15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 17 | | See the GNU Affero General Public License for more details. | |
| 18 | | | |
| 19 | | You should have received a copy of the GNU Affero General Public | |
| 20 | | License and the CiviCRM Licensing Exception along | |
| 21 | | with this program; if not, contact CiviCRM LLC | |
| 22 | | at info[AT]civicrm[DOT]org. If you have questions about the | |
| 23 | | GNU Affero General Public License or the licensing of CiviCRM, | |
| 24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | |
| 25 | +--------------------------------------------------------------------+ |
| 26 | *} |
| 27 | {* this template is for configuring label formats *} |
| 28 | <div class="help"> |
| 29 | {ts}You can configure one or more Label Formats for your CiviCRM installation. Label Formats are used when creating mailing labels.{/ts} |
| 30 | </div> |
| 31 | {if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 16384} |
| 32 | {include file="CRM/Admin/Form/LabelFormats.tpl"} |
| 33 | {else} |
| 34 | |
| 35 | {if $rows} |
| 36 | <div id="ltype"> |
| 37 | {strip} |
| 38 | <table id="labelFormats" class="row-highlight"> |
| 39 | <thead> |
| 40 | <tr class="columnheader"> |
| 41 | <th>{ts}Name{/ts}</th> |
| 42 | <th>{ts}Used for{/ts}</th> |
| 43 | <th>{ts}Order{/ts}</th> |
| 44 | <th>{ts}Grouping{/ts}</th> |
| 45 | <th>{ts}Default?{/ts}</th> |
| 46 | <th>{ts}Reserved?{/ts}</th> |
| 47 | <th></th> |
| 48 | </tr> |
| 49 | </thead> |
| 50 | {foreach from=$rows item=row} |
| 51 | <tr id="row_{$row.id}" class="crm-labelFormat {cycle values="odd-row,even-row"} {$row.class}"> |
| 52 | <td class="crm-labelFormat-name">{$row.label}</td> |
| 53 | <td class="crm-labelFormat-name">{$row.groupName}</td> |
| 54 | <td class="crm-labelFormat-order nowrap">{$row.weight}</td> |
| 55 | <td class="crm-labelFormat-description">{$row.grouping}</td> |
| 56 | <td class="crm-labelFormat-is_default">{if $row.is_default eq 1}<img |
| 57 | src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}"/>{/if} </td> |
| 58 | <td class="crm-labelFormat-is_reserved">{if $row.is_reserved eq 1}{ts}Yes{/ts}{else}{ts}No{/ts}{/if} |
| 59 | </td> |
| 60 | <td>{$row.action|replace:'xx':$row.id}</td> |
| 61 | </tr> |
| 62 | {/foreach} |
| 63 | </table> |
| 64 | {/strip} |
| 65 | |
| 66 | <div class="action-link"> |
| 67 | <a href="{crmURL q="action=add&reset=1"}" id="newLabelFormat" class="button"><span><div |
| 68 | class="icon ui-icon-circle-plus"></div>{ts}Add Label Format{/ts}</span></a> |
| 69 | </div> |
| 70 | </div> |
| 71 | {else} |
| 72 | <div class="messages status no-popup"> |
| 73 | <div class="icon inform-icon"></div> |
| 74 | {capture assign=crmURL}{crmURL p='civicrm/admin/labelFormats' q="action=add&reset=1"}{/capture} |
| 75 | {ts 1=$crmURL}There are no Label Formats configured. You can<a href='%1'>add one</a>.{/ts} |
| 76 | </div> |
| 77 | {/if} |
| 78 | {/if} |