From: Laury GvR Date: Thu, 9 Aug 2018 13:10:51 +0000 (-0400) Subject: Admin contact list table reformatted for small view X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f132e564a9fbddea0b55c85b97f1b7e222120fa8;p=WP-Plugins%2Fglm-member-db-contacts.git Admin contact list table reformatted for small view --- diff --git a/css/admin.css b/css/admin.css index 990ae6b..40a23a6 100644 --- a/css/admin.css +++ b/css/admin.css @@ -454,3 +454,88 @@ display: inline-block; margin: 0; margin-right: 5px; } + +/* +Max width before this PARTICULAR table gets nasty +This query will take effect for any screen smaller than 760px +and also iPads specifically. +*/ +@media +only screen and (max-width: 760px), +(min-device-width: 768px) and (max-device-width: 1024px) { + + /* Force table to not be like tables anymore */ + #wpbody-content #glm-admin-contact-wrapper #searchForm table, + #wpbody-content #glm-admin-contact-wrapper #searchForm thead, + #wpbody-content #glm-admin-contact-wrapper #searchForm tbody, + #wpbody-content #glm-admin-contact-wrapper #searchForm th, + #wpbody-content #glm-admin-contact-wrapper #searchForm td, + #wpbody-content #glm-admin-contact-wrapper #searchForm tr { + display: block; + } + + /* Hide table headers (but not display: none;, for accessibility) */ + #wpbody-content #glm-admin-contact-wrapper #searchForm thead tr { + position: absolute; + top: -9999px; + left: -9999px; + } + + #wpbody-content #glm-admin-contact-wrapper #searchForm tr { border: 1px solid #ccc; } + + #wpbody-content #glm-admin-contact-wrapper #searchForm td { + /* Behave like a "row" */ + border: none; + border-bottom: 1px solid #eee; + position: relative; + padding-left: 25%; + } + + #wpbody-content #glm-admin-contact-wrapper #searchForm td:before { + /* Now like a table header */ + position: absolute; + /* Top/left values mimic padding */ + top: 6px; + left: 6px; + width: 25%; + padding-right: 10px; + white-space: nowrap; + } + /* + Label the data + */ + #wpbody-content #glm-admin-contact-wrapper #searchForm td:nth-of-type(1):before { content: "Name"; } + #wpbody-content #glm-admin-contact-wrapper #searchForm td:nth-of-type(2):before { content: "Active"; } + #wpbody-content #glm-admin-contact-wrapper #searchForm td:nth-of-type(3):before { content: "Primary"; } + #wpbody-content #glm-admin-contact-wrapper #searchForm td:nth-of-type(4):before { content: "Type"; } + #wpbody-content #glm-admin-contact-wrapper #searchForm td:nth-of-type(5):before { content: "Access"; } + #wpbody-content #glm-admin-contact-wrapper #searchForm td:nth-of-type(6):before { content: "User"; } + #wpbody-content #glm-admin-contact-wrapper #searchForm td:nth-of-type(7):before { content: "Entity"; } + + + /* Table styles */ + #wpbody-content #glm-admin-contact-wrapper #searchForm .wp-list-table { + max-width: 100%; + } + #wpbody-content #glm-admin-contact-wrapper #searchForm .wp-list-table tr { + padding: 10px 0; + } + #wpbody-content #glm-admin-contact-wrapper #searchForm .wp-list-table td:before { + top: 1px; + font-weight: bold; + } + #wpbody-content #glm-admin-contact-wrapper #searchForm .striped>tbody>:nth-child(even) { + background-color: #f2ffff; + } + + /* Misc */ + #glm-admin-contact-wrapper .glm-contact-top-buttons { + text-align: center; + } + #glm-admin-contact-wrapper .glm-contact-top-buttons > * { + margin: 10px auto 10px; + float: none; + clear: both; + } +} + diff --git a/views/admin/contacts/edit.html b/views/admin/contacts/edit.html index fd0de8f..4e0fde9 100644 --- a/views/admin/contacts/edit.html +++ b/views/admin/contacts/edit.html @@ -65,53 +65,57 @@ {if apply_filters('glm_members_permit_admin_member_contacts_edit_contact', true)} - {if $option == 'create' || $option == 'edit'} - {if $option == 'create'} -

Add New Contact

- {else} - {if $newEmailError != ''} -

NOTE: Your new E-Mail address was not valid. Please see below.

+
+ {if $option == 'create' || $option == 'edit'} + + {if $option == 'create'} +

Add New Contact

{else} - {if $contactUpdated}

Contact Updated

{/if} - {/if} - {if !$contactEditOwnRecord} - Delete this Contact - {/if} -
-
-

Cancel

-

-
-
-

WARNING:

-

- Clicking the "Delete this Contact" button above will - delete all of the data and images associated with this contact. - -

+ {if $newEmailError != ''} +

NOTE: Your new E-Mail address was not valid. Please see below.

+ {else} + {if $contactUpdated}

Contact Updated

{/if} + {/if} + {if !$contactEditOwnRecord} + Delete this Contact + {/if} +
+
+

Cancel

+

+
+
+

WARNING:

+

+ Clicking the "Delete this Contact" button above will + delete all of the data and images associated with this contact. + +

+

+ Once deleted, this information will no longer be available and cannot be retrieved! +

+

- Once deleted, this information will no longer be available and cannot be retrieved! + This contact may instead be "Archived" rather than deleted using the "Contact Display:" pick-list. When archived, the contact is not displayed on the front-end + of the Web site, any login assoicated with this contact is deactivated, and the contact will not show on contact lists unless "Archived" is selected. + Unlike delete, an archived contact may be changed back to normal use.

-

- This contact may instead be "Archived" rather than deleted using the "Contact Display:" pick-list. When archived, the contact is not displayed on the front-end - of the Web site, any login assoicated with this contact is deactivated, and the contact will not show on contact lists unless "Archived" is selected. - Unlike delete, an archived contact may be changed back to normal use. -

-
- {/if} + {/if} + + {if $fromMemberMenu} + Return to Contact List + {else} + Return to Contact List + {/if} - {if $fromMemberMenu} - Return to Contact List - {else} - Return to Contact List - {/if} +
Expand All
+
Try Orange
+
Try Blue
+
-
Expand All
-
Try Orange
-
Try Blue
{if $fromMemberMenu}
@@ -587,7 +591,7 @@
-

Organization/Company Information

+

Organization / Company Information

@@ -610,7 +614,7 @@ - Organization/Company Name + Organization / Company Name {if $contactInfo.fieldFail.org}

{$contactInfo.fieldFail.org}

{/if} @@ -811,10 +815,10 @@
-
+

Notes

-
+
diff --git a/views/admin/contacts/index.html b/views/admin/contacts/index.html index 589b6a2..35e3eb3 100644 --- a/views/admin/contacts/index.html +++ b/views/admin/contacts/index.html @@ -10,34 +10,38 @@ {include file='admin/contacts/header.html'} {/if} -{if apply_filters('glm_members_permit_admin_member_contacts_add_contact', true)} - {if $fromMemberMenu} - Add New {$terms.term_member_cap} Contact - {else} - Add New {$terms.term_member_cap} Contact - {/if} -
-
- {if !$fromMemberMenu && !$loggedInMember} -
Contact Export/Reports
+
+ {if apply_filters('glm_members_permit_admin_member_contacts_add_contact', true)} + {if $fromMemberMenu} + Add New {$terms.term_member_cap} Contact + {else} + Add New {$terms.term_member_cap} Contact + {/if} +
+
+ {if !$fromMemberMenu && !$loggedInMember} +
Contact Export/Reports
+ {/if} {/if} -{/if} +
-
+
List Filters:      - + Text Search: -
+ {apply_filters('glm-member-db-custom-filter-search', '', 'glm-member-db-contacts' )} +
+

Total found: {$numbContacts}  

@@ -72,7 +76,7 @@ {/if} - +
{$c.active.name}{if $c.primary_contact.value}Yes{/if}{$c.primary_contact.name} {$c.contact_type.name} {$c.access.name} {$c.username}