From dd8b987cf7415ad58b5036102076b5c81e39b405 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 10 Oct 2016 16:06:59 -0400 Subject: [PATCH] fixing agenda view event date output after searching, recurrences set to true in the event-list action. display days of the week in agenda view only if there are less than 7 and more than 0. bumping plugin version number --- index.php | 6 +++--- models/front/events/list.php | 4 +++- views/front/events/agenda.html | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 0eea4e6..d0d55e1 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database Events * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 1.4.0 + * Version: 1.4.3 * Author: Chuck Scott * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -20,7 +20,7 @@ * @package glmMembersDatabaseEventsAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.4.0 + * @version 1.4.3 */ /* @@ -38,7 +38,7 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.4.0'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.4.3'); define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.22'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/events/list.php b/models/front/events/list.php index cdee114..b5503dd 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -192,7 +192,7 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction wp_enqueue_script('event-dashboard-js'); wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css'); - + $this->postAddRecurrences = true; switch ( $action ) { case 'front-page': $events = $this->getModelEventsData($categoryId, $limit); @@ -202,8 +202,10 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction $view = 'agenda.html'; break; case 'event-list': + $this->postAddRecurrences = true; $events = $this->getModelEventsData($categoryId); $view = 'agenda.html'; + $this->postAddRecurrences = false; break; case 'nameSearch': // get list of names based on term diff --git a/views/front/events/agenda.html b/views/front/events/agenda.html index 46ff0ee..594c02b 100644 --- a/views/front/events/agenda.html +++ b/views/front/events/agenda.html @@ -1,4 +1,5 @@
+ test
{include file='front/events/searchForm.html'}
@@ -21,7 +22,8 @@

{$event.name}

-
( Occurring {$event.recurrences.0.from_date.date} - {$event.recurrences.0.to_date.date} +
( Occurring {$event.recurrences.0.from_date.date} - {$event.recurrences.0.to_date.date} + {if $event.recurrences.0.day_of_week.names|@count < 7 && $event.recurrences.0.day_of_week.names|@count > 0 } on -- 2.17.1