more fixes for label configuration screen, CRM-12965
authorKurund Jalmi <kurund@civicrm.org>
Sat, 29 Jun 2013 10:14:23 +0000 (15:44 +0530)
committerKurund Jalmi <kurund@civicrm.org>
Sat, 29 Jun 2013 10:14:23 +0000 (15:44 +0530)
CRM/Admin/Page/LabelFormats.php
templates/CRM/Admin/Page/LabelFormats.tpl

index 060b3b4f1eca58a4ffac263ca8c721877f34388e..a438342e3c8387bc64f8afb83a35b937d231f827 100644 (file)
@@ -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'));
     }
index 02d1d97421126bc8babc931f1052e7991383d7cc..e0f85126bde286d90d4dbbc9456ff5714d0dfdfa 100644 (file)
 *}
 {* this template is for configuring label formats *}
 <div class="help">
-    {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}
 </div>
 {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}
-<div id="ltype">
-        {strip}
+  {if $rows}
+    <div id="ltype">
+      {strip}
         {include file="CRM/common/jsortable.tpl"}
         <table id="labelFormats" class="display">
-        <thead>
-        <tr class="columnheader">
+          <thead>
+          <tr class="columnheader">
             <th class="sortable">{ts}Name{/ts}</th>
+            <th class="sortable">{ts}Used for{/ts}</th>
             <th class="sortable">{ts}Grouping{/ts}</th>
-            <th >{ts}Default?{/ts}</th>
-            <th >{ts}Reserved?{/ts}</th>
+            <th>{ts}Default?{/ts}</th>
+            <th>{ts}Reserved?{/ts}</th>
             <th id="order" class="sortable">{ts}Order{/ts}</th>
             <th class="hiddenElement"></th>
-            <th ></th>
-        </tr>
-        </thead>
-        {foreach from=$rows item=row}
-        <tr id="row_{$row.id}" class="crm-labelFormat {cycle values="odd-row,even-row"} {$row.class}">
-            <td class="crm-labelFormat-name">{$row.label}</td>
-            <td class="crm-labelFormat-description">{$row.grouping}</td>
-            <td class="crm-labelFormat-is_default">{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
-            <td class="crm-labelFormat-is_reserved">{if $row.is_reserved eq 1}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}&nbsp;</td>
-          <td class="crm-labelFormat-order nowrap">{$row.order}</td>
-          <td class="order hiddenElement">{$row.weight}</td>
-          <td>{$row.action|replace:'xx':$row.id}</td>
-        </tr>
-        {/foreach}
+            <th></th>
+          </tr>
+          </thead>
+          {foreach from=$rows item=row}
+            <tr id="row_{$row.id}" class="crm-labelFormat {cycle values="odd-row,even-row"} {$row.class}">
+              <td class="crm-labelFormat-name">{$row.label}</td>
+              <td class="crm-labelFormat-name">{$row.groupName}</td>
+              <td class="crm-labelFormat-description">{$row.grouping}</td>
+              <td class="crm-labelFormat-is_default">{if $row.is_default eq 1}<img
+                src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}"/>{/if}&nbsp;</td>
+              <td class="crm-labelFormat-is_reserved">{if $row.is_reserved eq 1}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
+                &nbsp;</td>
+              <td class="crm-labelFormat-order nowrap">{$row.order}</td>
+              <td class="order hiddenElement">{$row.weight}</td>
+              <td>{$row.action|replace:'xx':$row.id}</td>
+            </tr>
+          {/foreach}
         </table>
-        {/strip}
+      {/strip}
 
       <div class="action-link">
-      <a href="{crmURL q="action=add&reset=1"}" id="newLabelFormat" class="button"><span><div class="icon add-icon"></div>{ts}Add Label Format{/ts}</span></a>
-        </div>
-</div>
-{else}
+        <a href="{crmURL q="action=add&reset=1"}" id="newLabelFormat" class="button"><span><div
+              class="icon add-icon"></div>{ts}Add Label Format{/ts}</span></a>
+      </div>
+    </div>
+  {else}
     <div class="messages status no-popup">
       <div class="icon inform-icon"></div>
-        {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 <a href='%1'>add one</a>.{/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 can<a href='%1'>add one</a>.{/ts}
     </div>
-{/if}
+  {/if}
 {/if}