From: Anthony Talarico Date: Mon, 10 Apr 2017 15:10:45 +0000 (-0400) Subject: changing the view layout for grid X-Git-Tag: v1.0.0^2~46 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=51c3fd062fe7ffdc8d658156ec8e56b850e56156;p=WP-Plugins%2Fglm-member-db-fields.git changing the view layout for grid --- diff --git a/models/front/fields/list.php b/models/front/fields/list.php index 8e3f872..db4310d 100644 --- a/models/front/fields/list.php +++ b/models/front/fields/list.php @@ -90,11 +90,19 @@ class GlmMembersFront_fields_list extends GlmDataFieldsCustomFields } } } + /* + * Check for which view file to use, else default to list + */ + $view = "list"; + if (isset($actionData['request']['view']) && $actionData['request']['view'] != "" ) { + $view = strtolower($actionData['request']['view']); + } // Compile template data $templateData = array( 'field_values' => $fields, - 'assets_dir' => $assets_dir + 'assets_dir' => $assets_dir, + 'view' => $view ); error_reporting(E_ALL ^ E_NOTICE); return array( diff --git a/views/front/fields/list.html b/views/front/fields/list.html index b35284c..00d7fd1 100644 --- a/views/front/fields/list.html +++ b/views/front/fields/list.html @@ -1,28 +1,30 @@ - {foreach $field_values as $key=>$value} {if $value.slash === true} -
+ +
{else} -
+
{/if} {if $value.type !== 'RV'} -
{$value.nice}
-
{$value.data}
+
{$value.nice}
+
{$value.data}
{else} -
{$value.nice}
-
{$value.data}
+
{$value.nice}
+
{$value.data}
{/if} - {if $key === 'red-hot-deal' && $value.data === 'Yes'} -
+ + +
{/foreach}