From: Kurund Jalmi Date: Sat, 29 Jun 2013 10:14:23 +0000 (+0530) Subject: more fixes for label configuration screen, CRM-12965 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=252708df2110ac2c7505f388ea6362d0039dc9e2;p=civicrm-core.git more fixes for label configuration screen, CRM-12965 --- diff --git a/CRM/Admin/Page/LabelFormats.php b/CRM/Admin/Page/LabelFormats.php index 060b3b4f1e..a438342e3c 100644 --- a/CRM/Admin/Page/LabelFormats.php +++ b/CRM/Admin/Page/LabelFormats.php @@ -134,6 +134,8 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic { if (CRM_Utils_Array::value('is_reserved', $format)) { $action -= CRM_Core_Action::DELETE; } + + $format['groupName'] = ts('Mailing Label'); $format['action'] = CRM_Core_Action::formLink(self::links(), $action, array('id' => $format['id'], 'group' => 'label_format')); } @@ -144,6 +146,8 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic { if (CRM_Utils_Array::value('is_reserved', $format)) { $action -= CRM_Core_Action::DELETE; } + + $format['groupName'] = ts('Name Badge'); $format['action'] = CRM_Core_Action::formLink(self::links(), $action, array('id' => $format['id'], 'group' => 'name_badge')); } diff --git a/templates/CRM/Admin/Page/LabelFormats.tpl b/templates/CRM/Admin/Page/LabelFormats.tpl index 02d1d97421..e0f85126bd 100644 --- a/templates/CRM/Admin/Page/LabelFormats.tpl +++ b/templates/CRM/Admin/Page/LabelFormats.tpl @@ -26,51 +26,56 @@ *} {* this template is for configuring label formats *}
- {ts}You can configure one or more Label Formats for your CiviCRM installation. Label Formats are used when creating mailing labels.{/ts} + {ts}You can configure one or more Label Formats for your CiviCRM installation. Label Formats are used when creating mailing labels.{/ts}
{if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 16384} - {include file="CRM/Admin/Form/LabelFormats.tpl"} + {include file="CRM/Admin/Form/LabelFormats.tpl"} {else} -{if $rows} -
- {strip} + {if $rows} +
+ {strip} {include file="CRM/common/jsortable.tpl"} - - + + + - - + + - - - - {foreach from=$rows item=row} - - - - - - - - - - {/foreach} + + + + {foreach from=$rows item=row} + + + + + + + + + + + {/foreach}
{ts}Name{/ts}{ts}Used for{/ts} {ts}Grouping{/ts}{ts}Default?{/ts}{ts}Reserved?{/ts}{ts}Default?{/ts}{ts}Reserved?{/ts} {ts}Order{/ts}
{$row.label}{$row.grouping}{if $row.is_default eq 1}{ts}Default{/ts}{/if} {if $row.is_reserved eq 1}{ts}Yes{/ts}{else}{ts}No{/ts}{/if} {$row.order}{$row.weight}{$row.action|replace:'xx':$row.id}
{$row.label}{$row.groupName}{$row.grouping}{if $row.is_default eq 1}{ts}Default{/ts}{/if} {if $row.is_reserved eq 1}{ts}Yes{/ts}{else}{ts}No{/ts}{/if} +  {$row.order}{$row.weight}{$row.action|replace:'xx':$row.id}
- {/strip} + {/strip} -
-{else} +
{ts}Add Label Format{/ts}
+
+ + {else}
- {capture assign=crmURL}{crmURL p='civicrm/admin/labelFormats' q="action=add&reset=1"}{/capture} - {ts 1=$crmURL}There are no Label Formats configured. You can add one.{/ts} + {capture assign=crmURL}{crmURL p='civicrm/admin/labelFormats' q="action=add&reset=1"}{/capture} + {ts 1=$crmURL}There are no Label Formats configured. You canadd one.{/ts}
-{/if} + {/if} {/if}