| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.7 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
| 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 | {* Displays current and upcoming public Events Listing as an HTML page. *} |
| 27 | {include file="CRM/common/jsortable.tpl"} |
| 28 | <table id="options" class="display"> |
| 29 | <thead> |
| 30 | <tr> |
| 31 | <th>{ts}Event{/ts}</th> |
| 32 | <th></th> |
| 33 | <th>{ts}When{/ts}</th> |
| 34 | <th>{ts}Location{/ts}</th> |
| 35 | <th>{ts}Category{/ts}</th> |
| 36 | <th>{ts}Email{/ts}</th> |
| 37 | {if $registration_links}<th>{ts}Register{/ts}</th>{/if} |
| 38 | </tr> |
| 39 | </thead> |
| 40 | {foreach from=$events key=uid item=event} |
| 41 | <tr class="{cycle values="odd-row,even-row"} {$row.class}"> |
| 42 | <td><a href="{crmURL p='civicrm/event/info' q="reset=1&id=`$event.event_id`"}" title="{ts}read more{/ts}"><strong>{$event.title}</strong></a></td> |
| 43 | <td>{if $event.summary}{$event.summary} (<a href="{crmURL p='civicrm/event/info' q="reset=1&id=`$event.event_id`"}" title="{ts}details...{/ts}">{ts}read more{/ts}...</a>){else} {/if}</td> |
| 44 | <td class="nowrap"> |
| 45 | {if $event.start_date}{$event.start_date|crmDate}{if $event.end_date}<br /><em>{ts}through{/ts}</em><br />{strip} |
| 46 | {* Only show end time if end date = start date *} |
| 47 | {if $event.end_date|date_format:"%Y%m%d" == $event.start_date|date_format:"%Y%m%d"} |
| 48 | {$event.end_date|crmDate:0:1} |
| 49 | {else} |
| 50 | {$event.end_date|crmDate} |
| 51 | {/if}{/strip}{/if} |
| 52 | {else}{ts}(not available){/ts}{/if} |
| 53 | </td> |
| 54 | <td>{if $event.is_show_location EQ 1 AND $event.location}{$event.location}{else}{ts}(not available){/ts}{/if}</td> |
| 55 | <td>{if $event.event_type}{$event.event_type}{else} {/if}</td> |
| 56 | <td>{if $event.contact_email}<a href="mailto:{$event.contact_email}">{$event.contact_email}</a>{else} {/if}</td> |
| 57 | {if $registration_links}<td><a href="{$event.registration_link}">{$event.registration_link_text}</a></td>{/if} |
| 58 | </tr> |
| 59 | {/foreach} |
| 60 | </table> |