Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
4 | +--------------------------------------------------------------------+ |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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"> | |
96cfe0d7 | 40 | <a accesskey="N" href="{crmURL p=$newMassUrl q='reset=1'}" class="button"><span><div class="icon email-icon"></div>{ts}{$linkTitle}{/ts}</span></a><br/><br/> |
6a488035 TO |
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"> | |
51 | <thead class="sticky"> | |
52 | {foreach from=$columnHeaders item=header} | |
53 | {if $unscheduled} {* Hide columnns not relevant for unscheduled mailings. *} | |
54 | {if $header.sort NEQ 'scheduled_by' && $header.sort NEQ 'scheduled_date' && $header.sort NEQ 'start_date' & $header.sort NEQ 'end_date'} | |
55 | <th> | |
56 | {if $header.sort} | |
57 | {assign var='key' value=$header.sort} | |
58 | {$sort->_response.$key.link} | |
59 | {else} | |
60 | {$header.name} | |
61 | {/if} | |
62 | </th> | |
63 | {/if} | |
64 | {elseif $header.sort NEQ 'created_date'} | |
65 | <th> | |
66 | {if $header.sort} | |
67 | {assign var='key' value=$header.sort} | |
68 | {$sort->_response.$key.link} | |
69 | {else} | |
70 | {$header.name} | |
71 | {/if} | |
72 | </th> | |
73 | {/if} | |
74 | {/foreach} | |
75 | </thead> | |
76 | ||
77 | {counter start=0 skip=1 print=false} | |
78 | {foreach from=$rows item=row} | |
79 | <tr id="crm-mailing_{$row.id}" class="{cycle values="odd-row,even-row"} crm-mailing crm-mailing_status-{$row.status}"> | |
80 | <td class="crm-mailing-name">{$row.name}</td> | |
81 | <td class="crm-mailing-status crm-mailing_status-{$row.status}">{$row.status}</td> | |
82 | <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> | |
83 | {if $unscheduled} | |
84 | <td class="crm-mailing-created_date">{$row.created_date}</td> | |
85 | {else} | |
86 | <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> | |
87 | <td class="crm-mailing-scheduled">{$row.scheduled}</td> | |
88 | <td class="crm-mailing-start">{$row.start}</td> | |
89 | <td class="crm-mailing-end">{$row.end}</td> | |
90 | {/if} | |
91 | {if call_user_func(array('CRM_Campaign_BAO_Campaign','isCampaignEnable'))} | |
92 | <td class="crm-mailing-campaign">{$row.campaign}</td> | |
93 | {/if} | |
94 | <td>{$row.action|replace:'xx':$row.id}</td> | |
95 | </tr> | |
96 | {/foreach} | |
97 | </table> | |
98 | {/strip} | |
99 | ||
100 | {include file="CRM/common/pager.tpl" location="bottom"} | |
101 | {if $showLinks} | |
102 | <div class="action-link"> | |
103 | <a accesskey="N" href="{crmURL p=$newMassUrl q='reset=1'}" class="button"><span><div class="icon email-icon"></div>{ts}{$linkTitle}{/ts}</span></a><br/> | |
104 | </div> | |
105 | {/if} | |
106 | ||
107 | {* No mailings to list. Check isSearch flag to see if we're in a search or not. *} | |
108 | {elseif $isSearch eq 1} | |
109 | {if $archived} | |
110 | {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/archived' q="reset=1"}{$qVal}{/capture} | |
111 | {assign var="browseType" value="Archived"} | |
112 | {elseif $unscheduled} | |
113 | {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/unscheduled' q="scheduled=false&reset=1"}{$qVal}{/capture} | |
114 | {assign var="browseType" value="Draft and Unscheduled"} | |
115 | {else} | |
116 | {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/scheduled' q="scheduled=true&reset=1"}{$qVal}{/capture} | |
117 | {assign var="browseType" value="Scheduled and Sent"} | |
118 | {/if} | |
119 | <div class="status messages"> | |
120 | <table class="form-layout"> | |
121 | <tr><div class="icon inform-icon"></div> | |
96cfe0d7 | 122 | {ts 1=$componentName}No %1 match your search criteria. Suggestions:{/ts} |
6a488035 TO |
123 | </tr> |
124 | <div class="spacer"></div> | |
125 | <ul> | |
126 | <li>{ts}Check your spelling.{/ts}</li> | |
127 | <li>{ts}Try a different spelling or use fewer letters.{/ts}</li> | |
128 | </ul> | |
129 | <tr>{ts 1=$browseURL 2=$browseType 3=$componentName}Or you can <a href='%1'>browse all %2 %3</a>.{/ts}</tr> | |
130 | </table> | |
131 | </div> | |
132 | {elseif $unscheduled} | |
133 | ||
134 | <div class="messages status no-popup"> | |
135 | <div class="icon inform-icon"></div> | |
136 | {capture assign=crmURL}{crmURL p=$newMassUrl q='reset=1'}{/capture} | |
137 | {ts 1=$componentName}There are no Unscheduled %1.{/ts} | |
138 | {if $showLinks}{ts 1=$crmURL}You can <a href='%1'>create and send one</a>.{/ts}{/if} | |
139 | </div> | |
140 | ||
141 | {elseif $archived} | |
142 | <div class="messages status no-popup"> | |
143 | <div class="icon inform-icon"></div>  | |
144 | {capture assign=crmURL}{crmURL p='civicrm/mailing/browse/scheduled' q='scheduled=true&reset=1'}{$qVal}{/capture} | |
145 | {ts 1=$crmURL 2=$componentName}There are no Archived %2. You can archive %2 from <a href='%1'>Scheduled or Sent %2</a>.{/ts} | |
146 | </div> | |
147 | {else} | |
148 | <div class="messages status no-popup"> | |
149 | <div class="icon inform-icon"></div> | |
150 | {capture assign=crmURL}{crmURL p=$newMassUrl q='reset=1'}{/capture} | |
151 | {capture assign=archiveURL}{crmURL p='civicrm/mailing/browse/archived' q='reset=1'}{$qVal}{/capture} | |
152 | {ts 1=$componentName}There are no Scheduled or Sent %1.{/ts} | |
96cfe0d7 | 153 | {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}. |
6a488035 TO |
154 | </div> |
155 | {/if} |