From: Laury GvR Date: Thu, 29 Sep 2016 13:19:15 +0000 (-0400) Subject: Merge branch 'feature/memberDashboard' into feature/lauryAdminPolishing X-Git-Tag: v2.9.15^2~15^2~44 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=4c442949697fe5e6116462d206b3596092383b1b;p=WP-Plugins%2Fglm-member-db.git Merge branch 'feature/memberDashboard' into feature/lauryAdminPolishing --- 4c442949697fe5e6116462d206b3596092383b1b diff --cc css/admin.css index cd16c180,139e7cf3..2c02dd5f --- a/css/admin.css +++ b/css/admin.css @@@ -139,13 -129,13 +139,20 @@@ width: 10%; margin-bottom: 5px; } ++.glm-admin-table.glm-admin-inner-table { ++ border: 1px solid lightgrey; ++ border-radius: 3px; ++ width: 100%; ++ padding: 10px; ++} .glm-admin-table th, .glm-admin-table-narrow th { text-align: left; vertical-align: top; - white-space: nowrap; +/* white-space: nowrap;*/ padding-right: 1em; padding-bottom: .4em; ++ max-width: 250px; } .glm-admin-table td { text-align: left; @@@ -366,6 -351,6 +373,64 @@@ td.glm-nowrap .nav-tab:hover { cursor: pointer; } ++.glm-associate-admin-wrap > .nav-tab-wrapper > .nav-tab { ++ padding: 5px 10px; ++ font-size: 13px; ++ margin-left: 5px; ++ margin-bottom: 4px; ++} ++#glm-admin-content-container > form > .nav-tab-wrapper > .nav-tab { ++ padding: 2px 10px; ++ font-size: 12px; ++ margin-left: 2px; ++ margin-bottom: 2px; ++} ++.nav-tab-wrapper .nav-tab { ++ background-color: rgb(61,132,208); ++ color: white; ++ font-weight: normal; ++ border: 1px solid darkblue; ++ border-radius: 3px; ++ letter-spacing: 1px; ++} ++.nav-tab-wrapper .nav-tab:hover { ++ background-color: rgb(41, 112, 214); ++ border: 1px inset darkblue; ++} ++.nav-tab-wrapper .nav-tab.nav-tab-active { ++ background-color: rgb(255, 155, 6); ++ color: #373737; ++ font-weight: normal; ++ text-shadow: 1px 0px 0 black; ++ border: 1px inset orange; ++} ++.nav-tab-wrapper .nav-tab.nav-tab-active:hover { ++ background-color: rgb(250, 140, 6); ++ color: black; ++} ++ ++#glm-admin-content-container .button-primary { ++ background-color: rgb(61,132,208); ++ color: white; ++ text-shadow: none; ++ border: 1px solid darkblue; ++ box-shadow: 0px 1px 0px darkblue; ++} ++#glm-admin-content-container .button-primary:hover { ++ box-shadow: 0px -1px 0px darkblue; ++} ++#updateSettings { ++ border: 1px solid darkorange; ++ border-radius: 3px; ++ display: block; ++ float: none; ++ margin: 20px auto; ++ padding: 5px 10px; ++} ++#updateSettings:focus, ++#updateSettings:hover { ++ background-color: #ffe4c7; ++} input[type=submit], input[type=file] { cursor: pointer; } diff --cc setup/frontHooks.php index 79f9bb54,79f9bb54..e163ab73 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@@ -270,4 -270,4 +270,43 @@@ add_filter('glm_associate_config', func }); add_filter('glm_associate_terms', function() { return $this->config['terms']; --}); ++}); ++add_filter('glm_associate_member', function( $attribute ) { ++ global $wpdb; ++ $result = $wpdb->get_var( "SELECT $attribute FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "members WHERE member_slug = '".$GLOBALS['glmDetailSlug']."'" ); ++ return $result; ++}); ++ ++function get_member_name( $id = 0 ) { ++ global $wpdb; ++ if ( $id ) { ++ return $wpdb->get_var( "SELECT name FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "members WHERE id = $id" ); ++ } ++ return $wpdb->get_var( "SELECT name FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "members WHERE member_slug = '".$GLOBALS['glmDetailSlug']."'" ); ++} ++function get_member_data( $field = false ) { ++ if ( $field ) { ++ global $wpdb; ++ $field = $wpdb->get_var( "SELECT $field FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "members WHERE member_slug = '".$GLOBALS['glmDetailSlug']."'" ); ++ } ++ return $field; ++} ++function is_member( $id = false ) { ++ global $wpdb; ++ if ( $id ) { ++ $result = $wpdb->get_var( "SELECT id FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "members WHERE id = $id" ); ++ } else { ++ $result = $wpdb->get_var( "SELECT id FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "members WHERE member_slug = '".$GLOBALS['glmDetailSlug']."'" ); ++ } ++ if ($result) { ++ return true; ++ } ++ return false; ++} ++// Getting the current admin theme colors as set by Wordpress. ++// This will be useful for styling our menu when we figure out how best to use ++// the available data. ~L ++// ++//$admin_colors; ++//add_action('admin_head', function(){global $_wp_admin_css_colors; $admin_colors = $_wp_admin_css_colors;}); ++//$admin_colors[get_user_option('admin_color')]['colors']; diff --cc views/admin/management/index.html index 9ebdb464,9ebdb464..78e69dd3 --- a/views/admin/management/index.html +++ b/views/admin/management/index.html @@@ -12,6 -12,6 +12,8 @@@ Member Detail Options Required Pages Members Only ++ ++

{if $settingsUpdated}Settings Updated{/if} {if $settingsUpdateError}Settings Update Error{/if}

@@@ -160,7 -160,7 +162,7 @@@
-- ++
@@@ -183,7 -183,7 +185,7 @@@

Member List Display Options

Show Member List:
Show Member Name as Link to Detail:
Address Options: -- ++
@@@ -211,7 -211,7 +213,7 @@@
Show Street:
Show City, State, ZIP:
Show Country:
-- ++
@@@ -255,7 -255,7 +257,7 @@@

Member List Map Options

Show Map:
Show Member Name as Link to Detail:
-- ++
@@@ -274,7 -274,7 +276,7 @@@

Member List Search Form Options

Show Search Form:
Text Search:
Category Search:
-- ++
@@@ -293,7 -293,7 +295,7 @@@ +

Member Detail Display Options

Show Member Logo:
Address Options: -- ++
@@@ -326,7 -326,7 +328,7 @@@
Show Street:
Show City, State, ZIP:
Show Country:
-- ++
diff --cc views/admin/member/index.html index f6496d14,8630a90f..fa678aab --- a/views/admin/member/index.html +++ b/views/admin/member/index.html @@@ -25,31 -19,14 +24,34 @@@ - +

Member Detail Map Options

Show Map:
Show Logo:
URL CLick Counts Today: {$clickThroughCounts.day}   
+
+ - + + + + + + + + + + + + +
  Detail Page View Counts{$terms.term_member_cap} Display & Access:{$member.fieldData.access.name}
{$terms.term_member_cap} Type:{$member.fieldData.member_type.name}
Detail Page View Counts Today: {$detailViewCounts.day}   
+ {if apply_filters('glm_members_menu_members', true)} + + + Edit {$terms.term_member_cap} Name and Status + + + {/if} +