--- /dev/null
+<?php
+
+/**
+ * Gaslight Media Members Database
+ * Admin Members Dashboard
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version 0.1
+ */
+
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php';
+
+/**
+ * Dashboard Class Model
+ *
+ * Each Add-On can have one or more dashboards.
+ */
+
+class GlmMembersAdmin_dashboard_events extends GlmDataEvents
+{
+ /**
+ * Word Press Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /**
+ * Constructor
+ *
+ * This contructor sets up this model. At this time that only includes
+ * storing away the WordPress data object.
+ *
+ * @return object Class object
+ *
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ // Run constructor for members data class
+ parent::__construct(false, false);
+
+ }
+
+ /**
+ * Perform Model Action
+ *
+ * This method does the work for this model and returns any resulting data
+ *
+ * @return array Status and data array
+ *
+ * 'status'
+ *
+ * True if successful and false if there was a fatal failure.
+ *
+ * 'menuItemRedirect'
+ *
+ * If not false, provides a menu item the controller should
+ * execute after this one. Normally if this is used, there would also be a
+ * modelRedirect value supplied as well.
+ *
+ * 'modelRedirect'
+ *
+ * If not false, provides an action the controller should execute after
+ * this one.
+ *
+ * 'view'
+ *
+ * A suggested view name that the controller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ */
+ public function modelAction ($actionData = false)
+ {
+
+ $success = true;
+
+ // Compile template data
+ $templateData = array(
+ 'sampletext' => 'This is a sample text.'
+ );
+
+ // Return status, suggested view, and data to controller
+ return array(
+ 'status' => $success,
+ 'menuItemRedirect' => false,
+ 'modelRedirect' => false,
+ 'view' => 'admin/dashboard/events.html',
+ 'data' => $templateData
+ );
+
+ }
+
+}
'eventsCalMonthAJAX' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
'icalFeedImport' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
+ 'dashboard' => array(
+ 'events' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ ),
'member' => array(
'events' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
'settings' => array(
- 'eventCategories' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
+ 'eventCategories' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
'management' => array(
- 'events' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
+ 'events' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
'cron' => array(
- 'icalFeed' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
- )
+ 'icalFeed' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ ),
),
'frontActions' => array(
'events' => array(
'detail' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
'frontAdd' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
'pdf' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
- )
+ ),
)
);
--- /dev/null
+<div id="dashboard-widgets-wrap">
+ <div id="dashboard-widgets" class="metabox-holder">
+ <div id="glm-members-dashboard-widget" class="postbox-container">
+ <div class="meta-box-sortables ui-sortable">
+ <div class="postbox">
+ <button class="handlediv button-link" type="button" aria-expanded="true">
+ <span class="screen-reader-text">Toggle panel: Events</span>
+ <span class="toggle-indicator" aria-hidden="true"></span>
+ </button>
+ <h2 class="hndle ui-sortable-handle">
+ <span>Events</span>
+ </h2>
+ <p>{$sampletext}</p>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>