--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Job Postings
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+// Load Contacts data abstract
+require_once GLM_MEMBERS_STAFF_PLUGIN_CLASS_PATH.'/data/dataStaff.php';
+
+class GlmMembersFront_staff_list extends GlmDatastaff
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Contact Info
+ *
+ * @var $contactInfo
+ * @access public
+ */
+ public $contactInfo = false;
+ /**
+ * Member ID
+ *
+ * @var $memberID
+ * @access public
+ */
+ public $memberID = false;
+ /**
+ * Contact ID
+ *
+ * @var $contactID
+ * @access public
+ */
+ public $contactID = false;
+
+
+ /*
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller 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.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $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'.
+ */
+ parent::__construct(false, false, true);
+
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+ $success_load = false;
+ $success_message = "";
+ $option = false;
+ $view_file = 'list';
+
+ if (isset($_REQUEST['option']) && trim($_REQUEST['option']) != '') {
+ $option = $_REQUEST['option'];
+ }
+
+ $staff_data = $this->getList();
+
+ switch ($option) {
+
+ case "list":
+ $view_file = 'list';
+
+ break;
+
+ default:
+
+ break;
+ }
+ $success_load = "Yes";
+
+
+
+ // Compile template data
+ $templateData = array(
+ 'staffData' => $staff_data,
+ 'successLoad' => $success_load
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'front/staff/'.$view_file.'.html',
+ 'data' => $templateData
+ );
+
+ }
+
+}
--- /dev/null
+<div class="glm-staff-container">
+ {if $staffData}
+
+ {foreach $staffData as $staffKey => $staffVal}
+ <div class="glm-staff-block-wrapper">
+ <div class="glm-staff-block">
+ <div class="glm-staff-name">
+ <span class="glm-staff-fname">
+ {$staffVal.fname}
+ </span>
+ <span class="glm-staff-lname">
+ {$staffVal.lname}
+ </span>
+ </div>
+
+ <div class="glm-staff-location">
+ <span class="glm-staff-extension">
+ {$staffVal.extension}
+ </span>
+ <span class="glm-staff-building">
+ {$staffVal.building}
+ </span>
+ <span class="glm-staff-department">
+ {$staffVal.department}
+ </span>
+ </div>
+
+ <span class="glm-staff-email">
+ <a href="mailto:{$staffVal.email}">{$staffVal.email}</a>
+ </span>
+
+ </div>
+ </div>
+ {/foreach}
+ </div>
+ {else}
+ Sorry, no staff members found.
+ {/if}
+
+</div>
\ No newline at end of file