GLM_GeoMap.initializeLargeMap();
});
}
+ $('#glm-event-pdf-submit').click(function(event){
+ eventForm = $('#glm-member-event-search');
+ eventForm.attr('action', eventForm.attr('action') + '?pdf=1');
+ });
}).call(this);
*/
public function modelAction($actionData = false)
{
- $allEvents = $this->getList();
- //echo '<pre>' . print_r( $allEvents, true ) . '</pre>';
+ //$allEvents = $this->getList();
$status = $categoryId = null;
$action = '';
$settings = $events = $event = $categoryEvents = array();
$search = true;
$action = 'event-list';
}
+ if (isset($_REQUEST['pdf']) && $pdf = filter_var($_REQUEST['pdf'], FILTER_VALIDATE_BOOLEAN)) {
+ $search = true;
+ $action = 'pdf';
+ }
if ( isset($_REQUEST['glm_event_from']) ) {
$fromDate = filter_var($_REQUEST['glm_event_from'], FILTER_SANITIZE_STRING);
} else {
$events = $this->getModelEventsData($categoryId);
$view = 'agenda.html';
break;
+ case 'pdf':
+ $events = $this->getModelEventsData($categoryId);
+ echo '<pre>$events: ' . print_r($events, true) . '</pre>';
+ exit;
+ break;
default:
$view = 'agenda.html';
$events = $this->getModelEventsData($categoryId);
}
ksort($eventsByDate);
}
- //echo '<pre>$eventsByDate: ' . print_r($eventsByDate, true) . '</pre>';
- //if ($eventNameSearch) {
- //$events = array_filter($events, function($event) use($eventNameSearch){
- //return preg_match('/' . preg_quote( $eventNameSearch ) . '/i', $event['title']);
- //});
- //}
// Compile template data
$templateData = array(
),
'events' => array(
'index' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
- 'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ 'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
'settings' => array(
'eventCategories' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
),
'frontActions' => array(
'events' => array(
- 'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
- 'detail' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
- 'frontAdd' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
+ 'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ 'detail' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ 'frontAdd' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ 'pdf' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
)
)
);
</div>
<div id="glm-event-agenda-view" class="row">
<div class="small-12 column">
- <form action="{$currentUrl}" method="post">
+ <form id="glm-member-event-search" action="{$currentUrl}" method="post">
<input type="hidden" name="search" value="1">
<div class="row">
<div class="small-3 column">
</div>
<div class="small-3 column">
<input type="submit" class="button tiny radius" value="Search">
+ <input type="submit" class="button tiny radius" id="glm-event-pdf-submit" value="Print PDF">
</div>
</div>
</form>