'use' => 'ilged'
),
+ // Member Name (need to update this to be Reference Type aware
+ 'ref_name' => array(
+ 'field' => 'ref_dest',
+ 'as' => 'ref_name',
+ 'type' => 'pointer',
+ 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'members',
+ 'p_field' => 'name',
+ 'p_static' => true,
+ 'use' => 'lge'
+ ),
+
// Hide Address flag
'hide_address' => array (
'field' => 'hide_address',
'use' => 'a'
),
- // Evnet URL
+ // Event URL
'url' => array (
'field' => 'url',
'type' => 'text',
'use' => 'a'
),
+ // Ticket URL
+ 'ticket_url' => array (
+ 'field' => 'ticket_url',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
// Cost (description)
'cost' => array (
'field' => 'cost',
'use' => 'a'
),
+ // Admin Reference Type
+ 'admin_ref_type' => array (
+ 'field' => 'admin_ref_type',
+ 'type' => 'list',
+ 'list' => $this->config['ref_type'],
+ 'use' => 'ilged'
+ ),
+
+ // Admnin Reference Target
+ 'admin_ref_dest' => array (
+ 'field' => 'admin_ref_dest',
+ 'type' => 'integer',
+ 'use' => 'ilged'
+ ),
+
+ // Admin Contact Name
+ 'admin_name' => array (
+ 'field' => 'admin_name',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Admin Contact Organization Name
+ 'admin_org' => array (
+ 'field' => 'admin_org',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Admin Contact E-Mail Name
+ 'admin_email' => array (
+ 'field' => 'admin_email',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Admin Contact Phone
+ 'admin_phone' => array (
+ 'field' => 'admin_phone',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
// Notes (informational)
'notes' => array (
'field' => 'notes',
public function deleteEvent($id = false)
{
+ // Load locations data class
+ require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataLocations.php');
+ $Locations = new GlmDataEventsLocations($this->wpdb, $this->config);
+
// Load recurrences data class to deal with event times
require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataRecurrences.php');
$Recurrences = new GlmDataEventsRecurrences($this->wpdb, $this->config);
return false;
}
+ // Delete all location data for this event
+ $sql = "
+ DELETE FROM ".GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'locations'."
+ WHERE event = $id
+ ;";
+ $this->wpdb->query($sql);
+
// Get list of all recurrences
$recur = $Recurrences->getList("T.event = $id");
if ($recur) {
foreach($recur as $k=>$v) {
// Delete all times and custom events
- $this->deleteTimeEntriesForRecurrance($v['id'], true);
+ $Recurrences->deleteTimeEntriesForRecurrance($v['id'], true);
+
+ // Delete the Recurrence record
+ $Recurrences->deleteEntry($v['id'], true);
}
}
'type' => 'date',
'default' => time(),
'required' => true,
- 'use' => 'ne'
+ 'use' => 'negil'
+ ),
+
+ // Start Time Only Flag
+ 'start_time_only' => array (
+ 'field' => 'start_time_only',
+ 'type' => 'checkbox',
+ 'default' => true,
+ 'use' => 'a'
),
// End Date & Time
$from = new DateTime($recurData['from_date']['date']);
$to = new DateTime($recurData['to_date']['date']);
- // Calculate interval for single event
+ // Calculate interval for single event - If start time only, then start and end are the same
$start = new DateTime($recurData['start_time']['datetime']);
- $end = new DateTime($recurData['end_time']['datetime']);
+ if ($recurData['start_time_only']) {
+ $end = new DateTime($recurData['start_time']['datetime']);
+ } else {
+ $end = new DateTime($recurData['end_time']['datetime']);
+ }
$length = $start->diff($end);
// Determine years for scan
* version from this plugin.
*/
define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '0.0.1');
-define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.4');
+define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.5');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
define('GLM_MEMBERS_EVENTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.58');
$haveTimes = false;
$firstTime = false;
$lastTime = false;
+ $memberID = false;
+ $haveMember = false;
+ $memberName = false;
+ $memberData = false;
+
+ // Check for Member Menu Use
+ if (defined('GLM_EVENTS_MEMBER_MENU')) {
+
+ // Try to get member ID
+ $memberID = (isset($_REQUEST['member']) ? $_REQUEST['member'] : 0);
+
+ // If not a valid member ID
+ if ($memberID > 0) {
+
+ // Get member data
+ require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php');
+ $MemberInfo = new GlmDataMemberInfo($this->wpdb, $this->config);
+ $memberData = $MemberInfo->getEntry($memberID);
+
+ if (!$memberData) {
+ return array(
+ 'status' => false,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => array(
+ 'reason' => 'No member data found for provided member ID.'
+ )
+ );
+ }
+ } else {
+ return array(
+ 'status' => false,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => array(
+ 'reason' => 'No member ID was provided.'
+ )
+ );
+ }
+
+ $haveMember = true;
+ $memberName = $memberData['member_name'];
+
+ }
// Get a list of categories
$Categories = new GlmDataEventsCategories($this->wpdb, $this->config);
case 'list':
default:
+ $where = '';
+
// Add "selected" element default false;
reset($categories);
while (list($k, $v) = each($categories)) {
$categories[$k]['selected'] = false;
}
+ // Check if the list is for a specific member
+ if (defined('GLM_EVENTS_MEMBER_MENU') && $memberID) {
+ $where .= "T.ref_dest = $memberID";
+ }
+
// Determine number of events in list
- $events = $this->getList();
+ $events = $this->getList($where);
if ($events) {
$numbEvents = count($events);
}
'times' => $times,
'haveTimes' => $haveTimes,
'firstTime' => $firstTime,
- 'lastTime' => $lastTime
+ 'lastTime' => $lastTime,
+ 'memberID' => $memberID,
+ 'haveMember' => $haveMember,
+ 'memberName' => $memberName,
+ 'memberData' => $memberData
);
// Return status, any suggested view, and any data to controller
* @link http://dev.gaslightmedia.com/
*/
-// Load Contacts data abstract
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php');
+// Inform the events code that we're working from the member area
+define('GLM_EVENTS_MEMBER_MENU', true);
-class GlmMembersAdmin_events_list extends GlmDataEvents
+// Load the events index
+require GLM_MEMBERS_EVENTS_PLUGIN_PATH."/models/admin/events/list.php";
+
+// Extend the events index class
+class GlmMembersAdmin_member_events extends GlmMembersAdmin_events_list
{
/**
$this->config = $config;
/*
- * Run constructor for the Contacts data class
- *
- * Note, the third parameter is a flag that indicates to the Contacts
- * data class that it should flag a group of fields as 'view_only'.
+ * Run constructor for the Events class
*/
- parent::__construct(false, false, true);
+ parent::__construct($wpdb, $config);
}
- public function modelAction($actionData = false)
- {
-
- $numbEvents = 0;
- $option = 'list';
- $events = false;
- $event = false;
- $haveEvent = false;
- $eventID = false;
- $eventUpdated = false;
- $eventUpdateError = false;
- $view = 'list';
-
- // Get a list of categories
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php');
- $Categories = new GlmDataEventsCategories($this->wpdb, $this->config);
- $categories = $Categories->getListSortedParentChild(false);
-
- // Get any provided option
- if (isset($_REQUEST['option'])) {
- $option = $_REQUEST['option'];
- }
-
- // Get event ID if supplied
- if (isset($_REQUEST['event'])) {
-
- // Make sure it's numeric
- $eventID = ($_REQUEST['event'] - 0);
-
- if ($eventID <= 0) {
- $eventID = false;
- }
- }
-
- // Do selected option
- switch ($option) {
-
- case 'add':
-
- $event = $this->newEntry();
-
- $view = 'edit';
-
- break;
-
- case 'insert':
-
- $event = $this->insertEntry();
- if ($event['status']) {
- $eventID = $event['id'];
- $haveEvent = true;
- $eventUpdated = true;
- } else {
- $option = 'add';
- }
-
- $view = 'edit';
-
- break;
-
- case 'edit':
-
- $event = $this->editEntry($eventID);
-
- if ($event['status']) {
- $haveEvent = true;
- }
- $view = 'edit';
-
- break;
-
- case 'update':
-
- // Try to update this event
- $event = $this->updateEntry($eventID);
-
- // Check if that was successful
- if ($event['status']) {
- $eventUpdated = true;
- $event = $this->editEntry($eventID);
- } else {
- $eventUpdateError = true;
- }
-
- $haveEvent = true;
- $view = 'edit';
-
- break;
-
- case 'list':
- default:
-
- // Add "selected" element default false;
- reset($categories);
- while (list($k, $v) = each($categories)) {
- $categories[$k]['selected'] = false;
- }
-
- // Determine number of events in list
- $events = $this->getList();
- if ($events) {
- $numbEvents = count($events);
- }
-
- break;
-
- }
-
- $templateData = array(
- 'option' => $option,
- 'events' => $events,
- 'event' => $event,
- 'haveEvent' => $haveEvent,
- 'eventID' => $eventID,
- 'eventUpdated' => $eventUpdated,
- 'eventUpdateError' => $eventUpdateError,
- 'numbEvents' => $numbEvents,
- 'categories' => $categories
- );
-
- // Return status, any suggested view, and any data to controller
- return array(
- 'status' => true,
- 'modelRedirect' => false,
- 'view' => "admin/events/$view.html",
- 'data' => $templateData
- );
-
- }
-
-
-}
+}
\ No newline at end of file
array(
'text' => 'Events',
'menu' => 'member',
- 'action' => 'events'
+ 'action' => 'events',
+ 'option' => 'list'
),
);
id INT NOT NULL AUTO_INCREMENT,
event INTEGER NULL, -- Pointer to event
start_time DATETIME NULL, -- Start of first occurrence (date and time)
+ start_time_only BOOLEAN NULL, -- Use end of first occurrence flag
end_time DATETIME NULL, -- End of first occurrence (date and time)
from_date DATE NULL, -- From Date for recurrences
to_date DATE NULL, -- To Date for recurrences
descr TEXT NULL, -- Full description text
image TINYTEXT NULL, -- Image file name
url TINYTEXT NULL, -- Event URL
+ ticket_url TINYTEXT NULL, -- Ticket URL
cost TINYTEXT NULL, -- Description of event cost
+ admin_ref_type INT NULL, -- Type of admin contact if using a member contact
+ admin_ref_dest INT NULL, -- Pointer to admin contact record if using a member contact
+ admin_name TINYTEXT NULL, -- Admin Contact Name if not using a member contact
+ admin_org TINYTEXT NULL, -- Admin Contact Organization if not using a member contact
+ admin_email TINYTEXT NULL, -- Admin Contact E-Mail if not using a member contact
+ admin_phone TINYTEXT NULL, -- Admin Contact Phone if not using a member contact
old_event_id INT NULL, -- ID of event from old site for reference
notes TEXT NULL, -- Internal notes for this event
PRIMARY KEY (id),
'0.0.1' => array('version' => '0.0.1', 'tables' => 6),
'0.0.2' => array('version' => '0.0.2', 'tables' => 7),
'0.0.3' => array('version' => '0.0.3', 'tables' => 7),
- '0.0.4' => array('version' => '0.0.4', 'tables' => 7)
+ '0.0.4' => array('version' => '0.0.4', 'tables' => 7),
+ '0.0.5' => array('version' => '0.0.5', 'tables' => 7)
);
--- /dev/null
+-- Gaslight Media Members Database - Events Add-On
+-- File Created: 12/09/14 15:27:15
+-- Database Version: 0.0.2
+-- Database Update From Previous Version Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashses
+
+
+-- Add contact refernce type
+ALTER TABLE {prefix}events ADD COLUMN admin_ref_type INTEGER;
+
+----
+
+-- Add contact pointer
+ALTER TABLE {prefix}events ADD COLUMN admin_ref_dest INTEGER;
+
+----
+
+-- Add contact name
+ALTER TABLE {prefix}events ADD COLUMN admin_name TINYTEXT;
+
+----
+
+-- Add contact organization
+ALTER TABLE {prefix}events ADD COLUMN admin_org TINYTEXT;
+
+----
+
+-- Add contact email
+ALTER TABLE {prefix}events ADD COLUMN admin_email TINYTEXT;
+
+----
+
+-- Add contact phone
+ALTER TABLE {prefix}events ADD COLUMN admin_phone TINYTEXT;
+
+----
+
+-- Add use end time
+ALTER TABLE {prefix}recurrences ADD COLUMN start_time_only BOOLEAN;
+
+----
+
+-- Set start_time_only to false
+UPDATE {prefix}recurrences SET start_time_only = FALSE;
+
+----
+
+-- Add ticket URL
+ALTER TABLE {prefix}events ADD COLUMN ticket_url TINYTEXT;
+
+
+
+
+
+
+
+
-{include file='admin/events/header.html'}
+{if $haveMember}
+ {include file='admin/member/header.html'}
+{else}
+ {include file='admin/events/header.html'}
+{/if}
{if apply_filters('glm_members_permit_admin_members_packaging_edit_package', true)}
-
+ {if $haveMember}
+ <a href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=events&member={$memberID}" class="button button-primary glm-button glm-right">Return to Events List</a>
+ {else}
<a href="{$thisUrl}?page={$thisPage}&glm_action=list" class="button button-primary glm-button glm-right">Return to Events List</a>
+ {/if}
{if $option == 'edit'}
<a id="deleteEventButton" class="button button-primary glm-button glm-right">Delete this Event</a>
-
<h2>Edit Event</h2>
{else}
<h2>Add new Event</h2>
{/if}
- <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
- <input type="hidden" name="glm_action" value="list">
+ <form action="{$thisUrl}?page={if $haveMember}glm-members-admin-menu-member{else}{$thisPage}{/if}" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="glm_action" value="{if $haveMember}events{else}list{/if}">
+ {if $haveMember}
+ <input type="hidden" name="member" value="{$memberID}">
+ <input type="hidden" name="ref_type" value="{$ref_type_numb.Member}">
+ <input type="hidden" name="ref_dest" value="{$memberID}">
+ {else}
<input type="hidden" name="ref_type" value="0">
<input type="hidden" name="ref_dest" value="0">
- {if $haveEvent}
+ {/if}
+ {if $haveEvent}
<input type="hidden" name="option" value="update">
<input type="hidden" name="event" value="{$event.fieldData.id}">
- {else}
+ {else}
<input type="hidden" name="option" value="insert">
- {/if}
+ {/if}
<h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
<a id="glm-event-descr" data-show-table="glm-table-descr" class="glm-event-tab nav-tab nav-tab-active">Status & Description</a>
+ <a id="glm-event-settings" data-show-table="glm-table-settings" class="glm-event-tab nav-tab">Options & Settings</a>
<a id="glm-event-location" data-show-table="glm-table-location" class="glm-event-tab nav-tab">Location</a>
<a id="glm-event-recurrence" data-show-table="glm-table-recurrence" class="glm-event-tab nav-tab">Event Schedule</a>
<a id="glm-event-calendar" data-show-table="glm-table-calendar" class="glm-event-tab nav-tab">Calendar</a>
{include file='admin/events/editStatus.html'}
+ <!-- General Settings -->
+
+ {include file='admin/events/editSettings.html'}
+
<!-- Location -->
{include file='admin/events/editLocation.html'}
}
if (table == 'glm-table-calendar' && !fullCalendarLoaded) {
+
$('#eventCalendar').fullCalendar({
{if $haveTimes}
events: [
{$sep = ''}
{foreach $times as $t}
{$sep}{
- title : '{$t.event_name}',
start : '{$t.start_time.datetime}',
end : '{$t.end_time.datetime}',
allday : {$t.all_day.value}
{$sep = ','}
{/foreach}
],
- defaultDate : '{$firstTime.start_time.datetime}'
- {/if}
+ defaultDate : '{$firstTime.start_time.datetime}',
+ timeFormat : 'h:mma'
+ {/if}
});
+
fullCalendarLoaded = true;
}
$("#deleteEventDialog").dialog("close");
});
$('#deleteEventSubmit').click( function() {
+ {if $haveMember}
+ window.location.replace("{$thisUrl}?page=glm-members-admin-menu-member&glm_action=events&option=delete&member={$memberID}&event={$event.fieldData.id}");
+ {else}
window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=list&option=delete&event={$event.fieldData.id}");
+ {/if}
});
{/if}
if ($("#allDayEvent_" + recurID)[0].checked) {
$(".not-all-day-" + recurID).addClass('glm-hidden');
$(".all-day-" + recurID).removeClass('glm-hidden');
+ $(".start-time-only-" + recurID).addClass('glm-hidden');
} else {
$(".not-all-day-" + recurID).removeClass('glm-hidden');
$(".all-day-" + recurID).addClass('glm-hidden');
+ if (!$("#startTimeOnly_" + recurID)[0].checked) {
+ $(".start-time-only-" + recurID).removeClass('glm-hidden');
+ startTimeOnlyInit();
+ }
}
});
+ function startTimeOnlyInit() {
+ // Start Time only selection
+ $('.start-time-only-checkbox').click( function() {
+ recurID = $(this).attr('data-id');
+ if ($("#startTimeOnly_" + recurID)[0].checked) {
+ $(".start-time-only-" + recurID).addClass('glm-hidden');
+ } else {
+ if (!$("#allDayEvent_" + recurID)[0].checked) {
+ $(".start-time-only-" + recurID).removeClass('glm-hidden');
+ }
+ }
+ });
+ }
+ startTimeOnlyInit();
+
// All Dates Event selection
$('.all-dates-checkbox').click( function() {
recurID = $(this).attr('data-id');
<input data-id="{$r.id}" type="text" name="{$r.id}_start_time" value="{$r.start_time.datetime}" class="glm-form-text-input-small glm-datetime-input recurrence-input" placeholder="Click to Select Date/Time">
</td>
</tr>
- <tr class="not-all-day-{$r.id}{if $r.all_day.value} glm-hidden{/if}">
+ <tr class="not-all-day-{$r.id} {if $r.all_day.value} glm-hidden{/if}">
+ <th>Start Date & Time Only</th>
+ <td>
+ <input id="startTimeOnly_{$r.id}" data-id="{$r.id}" type="checkbox" name="{$r.id}_start_time_only" class="start-time-only-checkbox recurrence-input" {if $r.start_time_only.value} checked{/if}>
+ </td>
+ </tr>
+ <tr class="start-time-only-{$r.id}{if $r.all_day.value || $r.start_time_only.value} glm-hidden{/if}">
<th>End Date & Time:</th>
<td>
<input data-id="{$r.id}" type="text" name="{$r.id}_end_time" value="{$r.end_time.datetime}" class="glm-form-text-input-small glm-datetime-input recurrence-input" placeholder="Click to Select Date/Time">
</td>
</tr>
-
<tr class="all-day-{$r.id}{if !$r.all_day.value} glm-hidden{/if}">
<th>Event Date:</th>
<td>
- <input data-id="{$r.id}" type="text" name="{$r.id}_event_date" value="{$r.start_time.datetime}" class="glm-form-text-input-small glm-date-input recurrence-input" placeholder="Click to Select Date/Time">
+ <input data-id="{$r.id}" type="text" name="{$r.id}_event_date" value="{$r.start_date.date}" class="glm-form-text-input-small glm-date-input recurrence-input" placeholder="Click to Select Date/Time">
</td>
</tr>
<tr><td colspan="2"> </td></tr>
--- /dev/null
+
+<!-- Options and Settings -->
+
+ <table id="glm-table-settings" class="glm-admin-table glm-event-table glm-hidden">
+ <tr>
+ <td>
+ <table>
+ <tr><td> </td><th>Administrative Contact Information</th></tr>
+ <tr>
+ <th>Admin Contact Name:</th>
+ <td>
+ <input type="text" name="admin_name" value="{$event.fieldData.admin_name}" class="glm-form-text-input-medium">
+ </td>
+ </tr>
+ <tr>
+ <th>Admin Contact Organization:</th>
+ <td>
+ <input type="text" name="admin_org" value="{$event.fieldData.admin_org}" class="glm-form-text-input-medium">
+ </td>
+ </tr>
+ <tr>
+ <th>Admin Contact E-Mail:</th>
+ <td>
+ <input type="text" name="admin_email" value="{$event.fieldData.admin_email}" class="glm-form-text-input-medium">
+ </td>
+ </tr>
+ <tr>
+ <th>Admin Contact Phone:</th>
+ <td>
+ <input type="text" name="admin_phone" value="{$event.fieldData.admin_phone}" class="glm-form-text-input-medium">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <table>
+ <tr><td> </td><th>Event Options</th></tr>
+ <tr>
+ <th>Hide Member Address:</th>
+ <td>
+ <input type="checkbox" name="hide_address" {if $event.fieldData.hide_address.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <th>Featured Event:</th>
+ <td>
+ <input type="checkbox" name="featured" {if $event.fieldData.featured.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <th>Include in Slideshow:</th>
+ <td>
+ <input type="checkbox" name="slideshow" {if $event.fieldData.slideshow.value} checked{/if}>
+ </td>
+ </tr>
+ <tr>
+ <th>Major Event:</th>
+ <td>
+ <input type="checkbox" name="major" {if $event.fieldData.major.value} checked{/if}>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
<!-- Status and Description -->
<table id="glm-table-descr" class="glm-admin-table glm-event-table">
+ <tr>
+ <th>Member:</th>
+ <td>
+ {if $haveMember}
+ {$memberData.member_name}
+ {else}
+ (n/a)
+ {/if}
+ </td>
<tr>
<th {if $event.fieldRequired.name}class="glm-required"{/if}>Event Name:</th>
<td {if $event.fieldFail.name}class="glm-form-bad-input" data-tabid="glm-event-descr"{/if}>
{if $event.fieldFail.status}<p>{$event.fieldFail.status}</p>{/if}
</td>
</tr>
- <tr>
- <th>Hide Member Address:</th>
- <td>
- <input type="checkbox" name="hide_address" {if $event.fieldData.hide_address.value} checked{/if}>
- </td>
- </tr>
- <tr>
- <th>Featured Event:</th>
- <td>
- <input type="checkbox" name="featured" {if $event.fieldData.featured.value} checked{/if}>
- </td>
- </tr>
- <tr>
- <th>Include in Slideshow:</th>
- <td>
- <input type="checkbox" name="slideshow" {if $event.fieldData.slideshow.value} checked{/if}>
- </td>
- </tr>
- <tr>
- <th>Major Event:</th>
- <td>
- <input type="checkbox" name="major" {if $event.fieldData.major.value} checked{/if}>
- </td>
- </tr>
<tr>
<th>Categories</th>
<td class="glm-item-container">
-{include file='admin/events/header.html'}
+{if $haveMember}
+ {include file='admin/member/header.html'}
+{else}
+ {include file='admin/events/header.html'}
+{/if}
{if apply_filters('glm_members_permit_admin_events_index_add_event', true)}
<h2 style="margin-bottom: 1em;">
+ {if $haveMember} {* This is if we're processing events for a specific member *}
+ <a href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=events&option=add&member={$memberID}" class="button button-primary glm-button glm-right">Add A New Event</a>
+ {else}
<a href="{$thisUrl}?page={$thisPage}&glm_action=list&option=add" class="button button-primary glm-button glm-right">Add A New Event</a>
+ {/if}
{if $eventDeleted}<span class="glm-notice glm-flash-updated glm-right">Event Deleted</span>{/if}
{if $eventDeleteError}<span class="glm-error glm-flash-updated glm-right">Event Delete Error</span>{/if}
<h2>List of Events</h2>
<tr>
<th>ID</th>
<th>Event Name</th>
+ <th>Member</th>
<th>Status</th>
<th>Created</th>
<th>Updated</th>
{$e.id}
</td>
<td class="glm-nowrap">
+ {if $haveMember}
+ <a href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=events&member={$memberID}&option=edit&event={$e.id}">{$e.name}</a>
+ {else}
<a href="{$thisUrl}?page={$thisPage}&glm_action=list&option=edit&event={$e.id}">{$e.name}</a>
+ {/if}
+ </td>
+ <td class="glm-nowrap">
+ {$e.ref_name}
</td>
<td class="glm-nowrap">
{$e.status.name}