Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {* Block to display upcoming events. *} | |
11 | {* You can add the following additional event elements to this tpl as needed: $ev.end_date, $ev.location, $ev.description, $ev.contact_email *} | |
12 | {* Change truncate:80 to a larger or smaller value to show more or less of the summary. Remove it to show complete summary. *} | |
13 | <div id="crm-event-block" class="crm-container"> | |
14 | {if $eventBlock} | |
15 | {foreach from=$eventBlock item=ev} | |
16 | <p> | |
17 | <a href="{$ev.url}">{$ev.title}</a><br /> | |
18 | {$ev.start_date|truncate:10:""|crmDate}<br /> | |
19 | {assign var=evSummary value=$ev.summary|truncate:80:""} | |
20 | <em>{$evSummary}{if $ev.summary|count_characters:true GT 80} (<a href="{$ev.url}">{ts}more{/ts}...</a>){/if}</em> | |
21 | </p> | |
22 | {/foreach} | |
23 | {else} | |
24 | <p>{ts}There are no upcoming events.{/ts}</p> | |
25 | {/if} | |
26 | </div> |