Commit 836d3f26 authored by mattwire's avatar mattwire
Browse files

Add Copy template link to event templates list

parent eed5d938
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2018 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/* https://civicrm.org/licensing */
/**
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2018
*/
use CRM_AdvancedEvents_ExtensionUtil as E;
/**
* Page for displaying list of event templates.
......@@ -63,23 +35,30 @@ class CRM_AdvancedEvents_Page_ManageEventTemplate extends CRM_Core_Page_Basic {
if (!(self::$_links)) {
// helper variable for nicer formatting
self::$_links = [
CRM_Core_Action::ADD => [
'name' => E::ts('Create Event'),
'title' => ts('Create a new event using this template'),
'url' => 'civicrm/event/add',
'qs' => 'reset=1&action=add&template_id=%%id%%',
],
CRM_Core_Action::UPDATE => [
'name' => ts('Edit'),
'name' => E::ts('Edit'),
'title' => E::ts('Edit Event Template'),
'url' => 'civicrm/event/manage/settings',
'qs' => 'action=update&id=%%id%%&reset=1',
'title' => ts('Edit Event Template'),
],
CRM_Core_Action::DELETE => [
'name' => ts('Delete'),
'name' => E::ts('Delete'),
'title' => E::ts('Delete Event Template'),
'url' => 'civicrm/admin/advancedevents/delete',
'qs' => 'action=delete&istemplate=1&id=%%id%%',
'title' => ts('Delete Event Template'),
],
CRM_Core_Action::ADD => [
'name' => ts('Add Event'),
'url' => 'civicrm/event/add',
'qs' => 'reset=1&action=add&template_id=%%id%%',
'title' => ts('Add Event using template'),
CRM_Core_Action::COPY => [
'name' => E::ts('Copy'),
'title' => E::ts('Create Template from existing template'),
'url' => 'civicrm/admin/eventTemplate',
'qs' => 'reset=1&action=copy&id=%%id%%',
'extra' => 'onclick = "return confirm(\'Are you sure you want to copy this template?\');"',
],
];
}
......@@ -149,7 +128,7 @@ class CRM_AdvancedEvents_Page_ManageEventTemplate extends CRM_Core_Page_Basic {
//add action links.
$allEventTemplates[$eventTemplate->id]['action'] = CRM_Core_Action::formLink(self::links(), $action,
['id' => $eventTemplate->id],
ts('more'),
E::ts('more'),
FALSE,
'eventTemplate.manage.action',
'Event',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment