CRM-16352 - improve browsing by language
[civicrm-core.git] / templates / CRM / Mailing / Page / Browse.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 {if $sms}
27 {assign var='newMassUrl' value='civicrm/sms/send'}
28 {assign var='qVal' value='&sms=1'}
29 {assign var='linkTitle' value='New SMS'}
30 {assign var='componentName' value='Mass SMS'}
31 {else}
32 {assign var='newMassUrl' value='civicrm/mailing/send'}
33 {assign var='qVal' value=''}
34 {assign var='linkTitle' value='New Mailing'}
35 {assign var='componentName' value='Mailings'}
36 {/if}
37
38 {if $showLinks}
39 <div class="action-link">
40 {crmButton accesskey="N" p=$newMassUrl q='reset=1' icon="envelope"}{ts}{$linkTitle}{/ts}{/crmButton}<br/><br/>
41 </div>
42 {/if}
43 {include file="CRM/Mailing/Form/Search.tpl"}
44
45 {if $rows}
46 {include file="CRM/common/pager.tpl" location="top"}
47 {include file="CRM/common/pagerAToZ.tpl"}
48
49 {strip}
50 <table class="selector row-highlight">
51 <thead class="sticky">
52 {foreach from=$columnHeaders item=header}
53 <th>
54 {if $header.sort}
55 {assign var='key' value=$header.sort}
56 {$sort->_response.$key.link}
57 {else}
58 {$header.name}
59 {/if}
60 </th>
61 {/foreach}
62 </thead>
63
64 {counter start=0 skip=1 print=false}
65 {foreach from=$rows item=row}
66 <tr id="crm-mailing_{$row.id}" class="{cycle values="odd-row,even-row"} crm-mailing crm-mailing_status-{$row.status}">
67 <td class="crm-mailing-name">{$row.name}</td>
68 {if $multilingual}
69 <td class="crm-mailing-language">{$row.language}</td>
70 {/if}
71 <td class="crm-mailing-status crm-mailing_status-{$row.status}">{$row.status}</td>
72 <td class="crm-mailing-created_by"><a href ={crmURL p='civicrm/contact/view' q="reset=1&cid="}{$row.created_id}>{$row.created_by}</a></td>
73 <td class="crm-mailing-created_date">{$row.created_date}</td>
74 <td class="crm-mailing-scheduled_by"><a href ={crmURL p='civicrm/contact/view' q="reset=1&cid="}{$row.scheduled_id}>{$row.scheduled_by}</a></td>
75 <td class="crm-mailing-scheduled">{$row.scheduled}</td>
76 <td class="crm-mailing-start">{$row.start}</td>
77 <td class="crm-mailing-end">{$row.end}</td>
78 {if call_user_func(array('CRM_Campaign_BAO_Campaign','isCampaignEnable'))}
79 <td class="crm-mailing-campaign">{$row.campaign}</td>
80 {/if}
81 <td>{$row.action|replace:'xx':$row.id}</td>
82 </tr>
83 {/foreach}
84 </table>
85 {/strip}
86
87 {include file="CRM/common/pager.tpl" location="bottom"}
88 {if $showLinks}
89 <div class="action-link">
90 {crmButton accesskey="N" p=$newMassUrl q='reset=1' icon="envelope"}{ts}{$linkTitle}{/ts}{/crmButton}<br/>
91 </div>
92 {/if}
93
94 {* No mailings to list. Check isSearch flag to see if we're in a search or not. *}
95 {elseif $isSearch eq 1}
96 {if $archived}
97 {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/archived' q="reset=1"}{$qVal}{/capture}
98 {assign var="browseType" value="Archived"}
99 {elseif $unscheduled}
100 {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/unscheduled' q="scheduled=false&reset=1"}{$qVal}{/capture}
101 {assign var="browseType" value="Draft and Unscheduled"}
102 {else}
103 {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/scheduled' q="scheduled=true&reset=1"}{$qVal}{/capture}
104 {assign var="browseType" value="Scheduled and Sent"}
105 {/if}
106 <div class="status messages">
107 <table class="form-layout">
108 <tr><div class="icon inform-icon"></div>
109 {ts 1=$componentName}No %1 match your search criteria. Suggestions:{/ts}
110 </tr>
111 <div class="spacer"></div>
112 <ul>
113 <li>{ts}Check your spelling.{/ts}</li>
114 <li>{ts}Try a different spelling or use fewer letters.{/ts}</li>
115 </ul>
116 <tr>{ts 1=$browseURL 2=$browseType 3=$componentName}Or you can <a href='%1'>browse all %2 %3</a>.{/ts}</tr>
117 </table>
118 </div>
119 {elseif $unscheduled}
120
121 <div class="messages status no-popup">
122 <div class="icon inform-icon"></div>&nbsp;
123 {capture assign=crmURL}{crmURL p=$newMassUrl q='reset=1'}{/capture}
124 {ts 1=$componentName}There are no Unscheduled %1.{/ts}
125 {if $showLinks}{ts 1=$crmURL}You can <a href='%1'>create and send one</a>.{/ts}{/if}
126 </div>
127
128 {elseif $archived}
129 <div class="messages status no-popup">
130 <div class="icon inform-icon"></div>&nbsp
131 {capture assign=crmURL}{crmURL p='civicrm/mailing/browse/scheduled' q='scheduled=true&reset=1'}{$qVal}{/capture}
132 {ts 1=$crmURL 2=$componentName}There are no Archived %2. You can archive %2 from <a href='%1'>Scheduled or Sent %2</a>.{/ts}
133 </div>
134 {else}
135 <div class="messages status no-popup">
136 <div class="icon inform-icon"></div>&nbsp;
137 {capture assign=crmURL}{crmURL p=$newMassUrl q='reset=1'}{/capture}
138 {capture assign=archiveURL}{crmURL p='civicrm/mailing/browse/archived' q='reset=1'}{$qVal}{/capture}
139 {ts 1=$componentName}There are no Scheduled or Sent %1.{/ts}
140 {if $showLinks}{ts 1=$crmURL}You can <a href='%1'>create and send one</a>{/ts}{/if}{if $archiveLinks}{ts 1=$archiveURL 2=$componentName} OR you can search the <a href='%1'>Archived %2</a>{/ts}{/if}.
141 </div>
142 {/if}