Merge pull request #12995 from eileenmcnaughton/activity_extract2
[civicrm-core.git] / templates / CRM / Mailing / Page / Browse.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
6b83d5bd 5 | Copyright CiviCRM LLC (c) 2004-2019 |
6a488035
TO
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">
80bc2820 40 {crmButton accesskey="N" p=$newMassUrl q='reset=1' icon="envelope"}{ts}{$linkTitle}{/ts}{/crmButton}<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}
16850d34 50 <table class="selector row-highlight">
6a488035
TO
51 <thead class="sticky">
52 {foreach from=$columnHeaders item=header}
753f3087
DS
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>
6a488035
TO
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>
cc6d1477
SV
68 {if $multilingual}
69 <td class="crm-mailing-language">{$row.language}</td>
70 {/if}
6a488035 71 <td class="crm-mailing-status crm-mailing_status-{$row.status}">{$row.status}</td>
94008fba 72 <td class="crm-mailing-created_by">
73 <a href ={crmURL p='civicrm/contact/view' q="reset=1&cid="}{$row.created_id} title="{$row.created_by|escape}">
74 {$row.created_by|mb_truncate:20:"..."}
75 </a>
76 </td>
753f3087 77 <td class="crm-mailing-created_date">{$row.created_date}</td>
94008fba 78 <td class="crm-mailing-scheduled_by">
79 <a href ={crmURL p='civicrm/contact/view' q="reset=1&cid="}{$row.scheduled_id} title="{$row.scheduled_by|escape}">
80 {$row.scheduled_by|mb_truncate:20:"..."}
81 </a>
82 </td>
753f3087
DS
83 <td class="crm-mailing-scheduled">{$row.scheduled}</td>
84 <td class="crm-mailing-start">{$row.start}</td>
85 <td class="crm-mailing-end">{$row.end}</td>
86 {if call_user_func(array('CRM_Campaign_BAO_Campaign','isCampaignEnable'))}
6a488035
TO
87 <td class="crm-mailing-campaign">{$row.campaign}</td>
88 {/if}
89 <td>{$row.action|replace:'xx':$row.id}</td>
90 </tr>
91 {/foreach}
92 </table>
93 {/strip}
94
95 {include file="CRM/common/pager.tpl" location="bottom"}
96 {if $showLinks}
97 <div class="action-link">
80bc2820 98 {crmButton accesskey="N" p=$newMassUrl q='reset=1' icon="envelope"}{ts}{$linkTitle}{/ts}{/crmButton}<br/>
6a488035
TO
99 </div>
100 {/if}
101
102{* No mailings to list. Check isSearch flag to see if we're in a search or not. *}
103{elseif $isSearch eq 1}
104 {if $archived}
105 {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/archived' q="reset=1"}{$qVal}{/capture}
106 {assign var="browseType" value="Archived"}
107 {elseif $unscheduled}
108 {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/unscheduled' q="scheduled=false&reset=1"}{$qVal}{/capture}
109 {assign var="browseType" value="Draft and Unscheduled"}
110 {else}
111 {capture assign=browseURL}{crmURL p='civicrm/mailing/browse/scheduled' q="scheduled=true&reset=1"}{$qVal}{/capture}
112 {assign var="browseType" value="Scheduled and Sent"}
113 {/if}
114 <div class="status messages">
115 <table class="form-layout">
116 <tr><div class="icon inform-icon"></div>
96cfe0d7 117 {ts 1=$componentName}No %1 match your search criteria. Suggestions:{/ts}
6a488035
TO
118 </tr>
119 <div class="spacer"></div>
120 <ul>
121 <li>{ts}Check your spelling.{/ts}</li>
122 <li>{ts}Try a different spelling or use fewer letters.{/ts}</li>
123 </ul>
124 <tr>{ts 1=$browseURL 2=$browseType 3=$componentName}Or you can <a href='%1'>browse all %2 %3</a>.{/ts}</tr>
125 </table>
126 </div>
127{elseif $unscheduled}
128
129 <div class="messages status no-popup">
130 <div class="icon inform-icon"></div>&nbsp;
131 {capture assign=crmURL}{crmURL p=$newMassUrl q='reset=1'}{/capture}
132 {ts 1=$componentName}There are no Unscheduled %1.{/ts}
133 {if $showLinks}{ts 1=$crmURL}You can <a href='%1'>create and send one</a>.{/ts}{/if}
134 </div>
135
136{elseif $archived}
137 <div class="messages status no-popup">
138 <div class="icon inform-icon"></div>&nbsp
139 {capture assign=crmURL}{crmURL p='civicrm/mailing/browse/scheduled' q='scheduled=true&reset=1'}{$qVal}{/capture}
140 {ts 1=$crmURL 2=$componentName}There are no Archived %2. You can archive %2 from <a href='%1'>Scheduled or Sent %2</a>.{/ts}
141 </div>
142{else}
143 <div class="messages status no-popup">
144 <div class="icon inform-icon"></div>&nbsp;
145 {capture assign=crmURL}{crmURL p=$newMassUrl q='reset=1'}{/capture}
146 {capture assign=archiveURL}{crmURL p='civicrm/mailing/browse/archived' q='reset=1'}{$qVal}{/capture}
147 {ts 1=$componentName}There are no Scheduled or Sent %1.{/ts}
96cfe0d7 148 {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
149 </div>
150{/if}