-body .search-row{
- margin: 0 15px;
- padding: 10px 0;
-}
-.search-container{
- width: 50%;
- margin: 0 auto;
+
+.search-sidebar .search-row{
+ padding: 5px 0;
}
@media (min-width: 640px) and (max-width: 1024px){
width: 100%;
margin: 0 auto;
}
+}
+@media (max-width: 1024px){
+ .search-sidebar-container{
+ clear: both;
+ }
+ .results-container{
+ padding: 0;
+ }
+ .search-sidebar-container{
+ padding: 0;
+ }
+}
+.search-label{
+ font-size: 13px;
+ font-weight: bold;
+}
+.search-sidebar .search-label{
+ font-size: 15px;
+}
+
+.search-sidebar input[type=text]{
+ height: 25px;
+}
+.search-sidebar select{
+ margin: 4px 0 8px 0;
+ height: 25px;
+ padding: 2px;
+}
+.search-container label{
+ float: left;
+ margin-right: 5px;
+}
+.search-container:not(.sidebar-container) .search-label{
+ padding: 0px;
+}
+.search-container:not(.sidebar-container) .search-row{
+ margin: 0 15px;
+ padding: 0px 0;
+}
+.search-container{
+/* width: 50%;*/
+ margin: 0 auto;
+}
+.search-container input, .search-container select{
+ margin: 5px 0;
+}
+.search-container div{
+ margin: 0;
+ padding: 0 10px;
+}
+.options-wrapper{
+ display: none;
}
\ No newline at end of file
--- /dev/null
+$(document).ready(function(){
+ $(".expand-collapse").on("click", function(e){
+ e.preventDefault();
+
+ $('.options-wrapper').slideToggle(500, function () {
+
+ });
+
+ });
+});
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Development
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version 0.1
+ */
+
+/**
+ * This class performs the work for the default action of the "Members" menu
+ * option, which is to display the members dashboard.
+ *
+ */
+class GlmMembersAdmin_management_obitImport
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /**
+ * Constructor
+ *
+ * This contractor 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;
+
+ }
+
+ public function addScheme($url, $scheme = 'http://')
+ {
+ return parse_url($url, PHP_URL_SCHEME) === null ?
+ $scheme . $url : $url;
+ }
+
+ /**
+ * 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)
+ {
+
+
+ $resultMessage = '';
+ $success = false;
+ $haveMembers = false;
+ $import = false;
+ $importNotice = '';
+ $option = '';
+
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] != '') {
+ $option = $_REQUEST['option'];
+ }
+
+ switch($option) {
+ case 'upload_file':
+ // We're given a CSV file.
+ // We need to parse it out. File must have header line.
+ $file_data = $file_headers = $data = $members = array();
+
+ if ( isset( $_FILES ) && isset( $_FILES['file_upload'] ) && ( $fh = fopen( $_FILES['file_upload']['tmp_name'], 'r' ) ) !== false ) {
+ $row = 0;
+ while( ( $data = fgetcsv( $fh, 1000, ',' ) ) !== false ) {
+ if ( $row === 0 ) {
+ // First row grab as headers.
+ $file_headers = $data;
+ } else {
+ // All other rows are data.
+ $file_data[] = array_combine( $file_headers, $data );
+ }
+ $row++;
+ }
+ fclose( $fh );
+ }
+ $resultMessage .= $this->importMemberData( $file_data );
+ //$resultMessage .= '<pre>$file_data: ' . print_r( $file_data, true ) . '</pre>';
+ break;
+
+ case 'importObits':
+ $article_url = "http://obits.charlevoixlibrary.org/articles/";
+
+ if ( isset( $_REQUEST['start'] ) ) {
+ $start = filter_var( $_REQUEST['start'], FILTER_VALIDATE_INT );
+ } else {
+ $start = 0;
+ }
+ global $wpdb;
+ $table = GLM_MEMBERS_OBITS_PLUGIN_DB_PREFIX . 'obits';
+
+ $url = get_site_url() . '/wp-admin/admin.php?page=glm-members-admin-menu-management&glm_action=obitImport&option=importObits';
+ $limit = 400;
+
+ $sql = "SELECT last, first_mid, b_year, b_yr_range,d_year, d_yr_range,spouse_partner, maiden_other,obit_article,article_a, article_b, article_c, father_name,mother_name,misc_info, courier_date FROM chxctyobit LIMIT $limit OFFSET $start";
+ $obits = $wpdb->get_results( $sql, ARRAY_A );
+
+ $count = 0;
+ foreach($obits as $column=>$data){
+ $count++;
+ $insert = array();
+ foreach($data as $key=>$value){
+ if($key === 'last'){
+ $key = 'last_name';
+ }
+ if($key === 'd_yr_range' || $key === 'b_yr_range'){
+ $value = substr($value, 0, 4);
+ }
+ if($key === 'courier_date'){
+ $key = 'newspaper_date';
+ }
+ $insert[$key] = $value;
+ }
+// echo '<pre>', print_r($insert), '</pre>';
+// $wpdb->insert($table, $insert);
+ }
+ echo $count;
+// echo '<pre>', print_r($insert), '</pre>';
+
+ $resultMessage = "<pre>Start: $start</pre>";
+ $start += $limit;
+ $resultMessage .= "<p><a class='next-import-btn' href=\"". $url . "&limit=$limit&start=$start\">Next</a></p>";
+
+ break;
+
+ default:
+ break;
+ }
+
+ $templateData = array(
+ 'success' => $success,
+ 'option' => $option,
+ 'resultMessage' => $resultMessage
+ );
+
+ // Return status, suggested view, and data to controller
+ return array(
+ 'status' => true,
+ 'menuItemRedirect' => false,
+ 'modelRedirect' => false,
+ 'view' => 'admin/management/obitImport.html',
+ 'data' => $templateData
+ );
+
+ }
+}
$view = 'search';
-// $sql_all = "SELECT * FROM $this->table";
+ $sql = "SELECT * FROM $this->table";
// $sql_where = "SELECT * FROM $this->table WHERE ";
$year_ranges = new glmObitSupportFunctions($this->wpdb, $this->config);
$birth_death_range = array('birth' => $year_ranges->getObitYearRange(BIRTH_YEAR_START), 'death' => $year_ranges->getObitYearRange(DEATH_YEAR_START));
- $logic_dropdown = array('Contains','Starts','Equals', 'More than', 'Less than', 'Between', 'Empty');
- $form_data = $_REQUEST;
-
- $form_fields = array(
- $last = filter_var( $_REQUEST['last_name'], FILTER_SANITIZE_STRING),
- $first = filter_var( $_REQUEST['first_mid'], FILTER_SANITIZE_STRING),
- $byear = filter_var( $_REQUEST['b_year'], FILTER_SANITIZE_STRING),
- $byear_range = filter_var( $_REQUEST['b_yr_range'], FILTER_SANITIZE_STRING),
- $dyear = filter_var( $_REQUEST['d_year'], FILTER_SANITIZE_STRING),
- $dyear_range = filter_var( $_REQUEST['d_yr_range'], FILTER_SANITIZE_STRING),
- $maiden = filter_var( $_REQUEST['maiden_other'], FILTER_SANITIZE_STRING),
- $spouse = filter_var( $_REQUEST['spouse_partner'], FILTER_SANITIZE_STRING)
- );
-
-// $last = filter_var( $_REQUEST['last_name'], FILTER_SANITIZE_STRING);
-// $first = filter_var( $_REQUEST['first_mid'], FILTER_SANITIZE_STRING);
-// $byear = filter_var( $_REQUEST['b_year'], FILTER_SANITIZE_STRING);
-// $byear_range = filter_var( $_REQUEST['b_yr_range'], FILTER_SANITIZE_STRING);
-// $dyear = filter_var( $_REQUEST['d_year'], FILTER_SANITIZE_STRING);
-// $dyear_range = filter_var( $_REQUEST['d_yr_range'], FILTER_SANITIZE_STRING);
-// $maiden = filter_var( $_REQUEST['maiden_other'], FILTER_SANITIZE_STRING);
-// $spouse = filter_var( $_REQUEST['spouse_partner'], FILTER_SANITIZE_STRING);
-//
-
- $sql = "SELECT * FROM $this->table WHERE last_name = '$last' OR first_mid = '$first' OR b_year = '$byear' OR b_yr_range = '$byear_range' OR d_year = '$dyear' OR d_yr_range = '$dyear_range' OR maiden_other = '$maiden' OR spouse_partner = '$spouse';";
+ $logic_dropdown = array('Contains' => 'LIKE' ,'Starts With' => 'LIKE%','Equals' => '=', 'More than' => '>', 'Less than' => '<');
+ $form_data = $_REQUEST;
- if( isset( $_REQUEST['any-condition'] ) ){
- $clause = 'OR';
- } else if ( isset( $_REQUEST['all-conditions'] ) ) {
- $clause = 'AND';
+ if( isset( $_REQUEST['conditions'] ) && $_REQUEST['conditions'][0] == 'any'){
+ $clause = ' OR ';
+ } else if ( isset( $_REQUEST['conditions'] ) && $_REQUEST['conditions'][0] == 'all') {
+ $clause = ' AND ';
}
-
-// echo '<pre>', print_r($form_data), '</pre>';
- // no restrictions
- $obits = $this->wpdb->get_results($sql, 'ARRAY_A');
-// echo '<pre>', print_r($obits), '</pre>';
-
-
+
foreach($form_data as $key=>$value){
if (isset($value) && $value !== ''){
- if( $value !== 'Search' && $value !== 'search-results' && $key !== 'conditions'){
- $value = filter_var($value, FILTER_SANITIZE_STRING);
- $queries[$key] = array('field' => $value);
-// echo $value;
-
+ if( $value !== 'Search' && $key !== 'conditions'){
+ if(strpos($key,'-logic') === false && strpos($key,'not-') === false ) {
+ $value = filter_var($value, FILTER_SANITIZE_STRING);
+ $search_fields[$key] = $value;
+ } else {
+ $search_options[$key] = $value;
+ }
}
}
}
-// echo '<pre>', print_r($queries), '</pre>';
- foreach($queries as $key=>$value){
-// print_r($value);
+
+ foreach($search_fields as $field => $f){
+
+ foreach($search_options as $option => $o){
+
+ if( strpos($option, $field) !== false){
+
+ if(strpos($option, 'not') !== false){
+
+ $o = '<>';
+ $search_fields[$field] = $field . " $o " . "'$f'";
+
+ break;
+
+ } else if(strpos($o, '%') !== false){
+ $o = rtrim($o, "%");
+ $search_fields[$field] = $field . " $o " . "'$f%'";
+ } else if($o === 'LIKE') {
+ $search_fields[$field] = $field . " $o " . "'%$f%'";
+ } else {
+ $search_fields[$field] = $field . " $o " . "'$f'";
+ }
+ }
+ }
}
- if( isset($_REQUEST['search-results']) ){
+ $search = implode($clause, $search_fields);
+
+ $sql = "SELECT * FROM $this->table LIMIT 10" .
+ (empty($search) ? "" : " WHERE $search");
+// echo '<pre>', print_r($search_fields), '</pre>';
+ echo $sql;
+
+ $obits = $this->wpdb->get_results($sql, 'ARRAY_A');
+// echo '<pre>', print_r($obits), '</pre>';
+
+ if( isset($_REQUEST['searchButton']) ){
$view = 'searchResults';
}
);
}
-}
\ No newline at end of file
+}
'menu' => 'settings',
'action' => 'newspapers'
),
+ );
+ $addOnTabs = array_merge($addOnTabs, $newTabs);
+ return $addOnTabs;
+ }
+ );
+ }
+ if (apply_filters('glm_members_permit_admin_members_management_tab', true)) {
+
+ add_filter('glm-member-db-add-tab-for-management',
+ function($addOnTabs) {
+ $newTabs = array(
+ array(
+ 'text' => 'Obits Import',
+ 'menu' => 'management',
+ 'action' => 'obitImport'
+ ),
);
$addOnTabs = array_merge($addOnTabs, $newTabs);
return $addOnTabs;
'settings' => array(
'newspapers' => GLM_MEMBERS_OBITS_PLUGIN_SLUG,
),
+ 'management' => array(
+ 'obitImport' => GLM_MEMBERS_OBITS_PLUGIN_SLUG,
+ ),
),
'frontActions' => array(
'obits' => array(
--- /dev/null
+{include file='admin/management/header.html'}
+
+<h2>Obits Importer</h2>
+
+{if $option == ''}
+<form action="{$thisUrl}?page={$thisPage}&glm_action=obitImport&option=upload_file" method="post" enctype="multipart/form-data">
+ <input type="file" name="file_upload">
+ <input type="submit" class="button">
+</form>
+<p><a href="{$thisUrl}?page={$thisPage}&glm_action=obitImport&option=importObits">Import Obits</a></p>
+{/if}
+
+{if $resultMessage}
+ {$resultMessage}
+{/if}
+
+{include file='admin/footer.html'}
+<script>
+jQuery(document).ready(function($){
+ $(window).on('load', function(){
+ var url = window.location.href;
+ if(url.indexOf('start=') > -1){
+ var regex_start = /start=(\d*)/;
+ var start = regex_start.exec(url);
+ start = parseInt(start[1]);
+ }
+
+ function clickNext(){
+ if(start && start < 40000){
+ $('.next-import-btn')[0].click();
+ }
+ }
+ window.onload = clickNext();
+ });
+});
+
+</script>
-<div class="search-container">
- <form action="{$thisUrl}" method="post" enctype="multipart/form-data" name="obits-search" id="obits-search">
- <input type="hidden" value="search-results" name="search-results">
- <input type="radio" name="conditions">All Conditions
- <input type="radio" name="conditions">Any Condition
-
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- Last Name:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-last">Not</label>
- <input type="checkbox" id="not-last" name="not-last">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="lname-logic" id="lname-logic">
- {foreach from=$logic item=i}
- <option value="{$i}">{$i}</option>
- {/foreach}
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <input type="text" name="last_name">
- </div>
- </div>
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- First Name & Middle Initial:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-fname">Not</label>
- <input type="checkbox" id="not-fname" name="not-fname">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="fname-logic" id="fname-logic">
- {foreach from=$logic item=i}
- <option value="{$i}">{$i}</option>
- {/foreach}
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <input type="text" name="first_mid">
- </div>
- </div>
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- Birth Year:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-byear">Not</label>
- <input type="checkbox" id="not-byear" name="not-byear">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="byear-logic" id="byear-logic">
- {foreach from=$logic item=i}
- <option value="{$i}">{$i}</option>
- {/foreach}
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <input type="text" name="b_yr_range">
- </div>
- </div>
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- Birth Year Range:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-brange">Not</label>
- <input type="checkbox" id="not-brange" name="not-brange">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="brange-logic" id="brange-logic">
- <option>Equals</option>
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <select name="birth-range" id="">
- <option value="">Select a date range</option>
- {foreach from=$birth_death_range.birth item=r}
- <option value="{$r.start}">{$r.start} - {$r.end}</option>
- {/foreach}
- </select>
- </div>
- </div>
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- Death Year:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-death">Not</label>
- <input type="checkbox" id="not-death">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="dyear-logic" id="dyear-logic">
- {foreach from=$logic item=i}
- <option value="{$i}">{$i}</option>
- {/foreach}
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <input type="text" name="d_year">
- </div>
- </div>
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- Death Year Range:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-drange">Not</label>
- <input type="checkbox" id="not-drange" name="not-drange">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="drange-logic" id="drange-logic">
- <option value="equals">Equals</option>
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <select name="d_yr_range" id="death-range">
- <option value="">Select a date range</option>
- {foreach from=$birth_death_range.death item=r}
- <option value="{$r.start}">{$r.start} - {$r.end}</option>
- {/foreach}
- </select>
- </div>
- </div>
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- Maiden or Other Name:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-maiden">Not</label>
- <input type="checkbox" id="not-maiden" name="not-maiden">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="maiden-logic" id="maiden-logic">
- {foreach from=$logic item=i}
- <option value="{$i}">{$i}</option>
+<div class="search-container row">
+ <div class="small-12 medium-10 small-centered columns">
+ <form action="{$thisUrl}" method="post" enctype="multipart/form-data" name="obits-search" id="obits-search">
+ <input type="radio" checked value="all" name="conditions[]">All Conditions
+ <input type="radio" value="any" name="conditions[]">Any Condition
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ Last Name:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-last">Not</label>
+ <input type="checkbox" value="not" id="not-last" name="not-last_name">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="last_name-logic" id="last_name-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <input type="text" name="last_name">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ First Name & Middle:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-first_mid">Not</label>
+ <input type="checkbox" value="not" id="not-first_mid" name="not-first_mid">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="first_mid-logic" id="first_mid-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <input type="text" name="first_mid">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ Birth Year:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-b_year">Not</label>
+ <input type="checkbox" value="not" id="not-b_year" name="not-b_year">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="b_year-logic" id="b_year-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <input type="text" name="b_year">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ Birth Year Range:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-b_yr_range">Not</label>
+ <input type="checkbox" value="not" id="not-b_yr_range" name="not-b_yr_range">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="b_yr_range-logic" id="b_yr_range-logic">
+ <option value="=">Equals</option>
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <select name="b_yr_range" id="">
+ <option value="">Select a date range</option>
+ {foreach from=$birth_death_range.birth item=r}
+ <option value="{$r.start}">{$r.start} - {$r.end}</option>
{/foreach}
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <input type="text" name="maiden_other">
- </div>
- </div>
- <div class="row search-row">
- <div class="small-12 medium-3 columns">
- Spouse / Partner Name:
- </div>
- <div class="small-3 large-2 columns">
- <label for="not-spouse">Not</label>
- <input type="checkbox" value="not" id="not-spouse" name="not-spouse">
- </div>
- <div class="small-4 medium-3 large-3 columns">
- <select name="spouse-logic" id="spouse-logic">
- {foreach from=$logic item=i}
- <option value="{$i}">{$i}</option>
+ </select>
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ Death Year:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-death">Not</label>
+ <input type="checkbox" value="not" id="not-death" name="not-d_year">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="d_year-logic" id="d_year-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <input type="text" name="d_year">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ Death Year Range:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-d_yr_range">Not</label>
+ <input type="checkbox" value="not" id="not-d_yr_range" name="not-d_yr_range">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="d_yr_range-logic" id="d_yr_range-logic">
+ <option value="=">Equals</option>
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <select name="d_yr_range" id="d_yr_range-range">
+ <option value="">Select a date range</option>
+ {foreach from=$birth_death_range.death item=r}
+ <option value="{$r.start}">{$r.start} - {$r.end}</option>
{/foreach}
- </select>
- </div>
- <div class="small-12 medium-3 large-4 columns">
- <input type="text" name="spouse_partner">
- </div>
- </div>
- <input id="input" class="search-button" name="searchButton" value="Search" type="submit">
- </form>
+ </select>
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ Maiden or Other Name:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-maiden_other">Not</label>
+ <input type="checkbox" value="not" id="not-maiden" name="not-maiden_other">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="maiden_other-logic" id="maiden_other-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <input type="text" name="maiden_other">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 medium-4 large-3 columns search-label">
+ Spouse / Partner Name:
+ </div>
+ <div class="small-3 medium-2 columns">
+ <label for="not-spouse_partner">Not</label>
+ <input type="checkbox" value="not" value="not" id="not-spouse" name="not-spouse_partner">
+ </div>
+ <div class="small-4 medium-3 large-3 columns">
+ <select name="spouse_partner-logic" id="spouse_partner-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ <div class="small-12 medium-3 large-4 columns">
+ <input type="text" name="spouse_partner">
+ </div>
+ </div>
+
+ <input id="input" class="search-button" name="searchButton" value="Search" type="submit">
+ </form>
+ </div>
</div>
\ No newline at end of file
+<div class="row">
+ <div class="small-12 large-9 columns results-container">
+ <table class="footable">
+ <thead>
+ <tr>
+ <th>Birth Year Range</th>
+ <th>Death Year Range</th>
+ <th>Last Name</th>
+ <th>First Name</th>
+ <th>Birth Year</th>
+ <th>Death Year</th>
+ <th>Spouse</th>
+ <th>Maiden Name</th>
+ </tr>
+ </thead>
+ {foreach from=$obits item=i}
+ <tr>
+ <td>{$i.b_yr_range}</td>
+ <td>{$i.d_yr_range}</td>
+ <td>{$i.last_name}</td>
+ <td>{$i.first_mid}</td>
+ <td>{$i.b_year}</td>
+ <td>{$i.d_year}</td>
+ <td>{$i.spouse_partner}</td>
+ <td>{$i.maiden_other}</td>
+ </tr>
+ {/foreach}
+ </table>
+ </div>
+ <div class="small-12 medium-6 large-3 columns small-centered large-uncentered search-sidebar-container">
+ <div class="search-sidebar">
+<!-- {include file='front/obits/search.html'}-->
+ <div class="search-container sidebar-container row">
+ <div class="small-12 columns">
+ <form action="{$thisUrl}" method="post" enctype="multipart/form-data" name="obits-search" id="obits-search">
+ <input class="sidebar-criteria" type="radio" checked value="all" name="conditions[]">All
+ <input class="sidebar-criteria" type="radio" value="any" name="conditions[]">Any
+ <a href="#" class="expand-collapse"> Expand Options </a>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ Last Name:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-last">Not</label>
+ <input type="checkbox" value="not" id="not-last" name="not-last_name">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="last_name-logic" id="last_name-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <input type="text" name="last_name" placeholder="Last Name">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ First Name & Middle:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-first_mid">Not</label>
+ <input type="checkbox" value="not" id="not-first_mid" name="not-first_mid">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="first_mid-logic" id="first_mid-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <input type="text" name="first_mid" placeholder="First - Middle Name">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ Birth Year:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-b_year">Not</label>
+ <input type="checkbox" value="not" id="not-b_year" name="not-b_year">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="b_year-logic" id="b_year-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <input type="text" name="b_year" placeholder="Year of Birth">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ Birth Year Range:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-b_yr_range">Not</label>
+ <input type="checkbox" value="not" id="not-b_yr_range" name="not-b_yr_range">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="b_yr_range-logic" id="b_yr_range-logic">
+ <option value="=">Equals</option>
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <select name="b_yr_range" id="">
+ <option value="">Select a date range</option>
+ {foreach from=$birth_death_range.birth item=r}
+ <option value="{$r.start}">{$r.start} - {$r.end}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ Death Year:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-death">Not</label>
+ <input type="checkbox" value="not" id="not-death" name="not-d_year">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="d_year-logic" id="d_year-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <input type="text" name="d_year" placeholder="Year of Death">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ Death Year Range:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-d_yr_range">Not</label>
+ <input type="checkbox" value="not" id="not-d_yr_range" name="not-d_yr_range">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="d_yr_range-logic" id="d_yr_range-logic">
+ <option value="=">Equals</option>
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <select name="d_yr_range" id="d_yr_range-range">
+ <option value="">Select a date range</option>
+ {foreach from=$birth_death_range.death item=r}
+ <option value="{$r.start}">{$r.start} - {$r.end}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ Maiden or Other Name:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-maiden_other">Not</label>
+ <input type="checkbox" value="not" id="not-maiden" name="not-maiden_other">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="maiden_other-logic" id="maiden_other-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <input type="text" name="maiden_other" placeholder="Maiden or Other">
+ </div>
+ </div>
+
+
+ <div class="row search-row">
+ <div class="small-12 columns search-label">
+ Spouse / Partner Name:
+ </div>
+ <div class="options-wrapper">
+ <div class="small-3 large-3 columns">
+ <label for="not-spouse_partner">Not</label>
+ <input type="checkbox" value="not" value="not" id="not-spouse" name="not-spouse_partner">
+ </div>
+
+ <div class="small-4 medium-3 large-6 columns">
+ <select name="spouse_partner-logic" id="spouse_partner-logic">
+ {foreach from=$logic key=k item=i}
+ <option value="{$i}">{$k}</option>
+ {/foreach}
+ </select>
+ </div>
+ </div>
+ <div class="small-12 columns">
+ <input type="text" name="spouse_partner" placeholder="Spouse or Partner">
+ </div>
+ </div>
+
+ <input id="input" class="search-button" name="searchButton" value="Search" type="submit">
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file