Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.6 part 4 - grid view #11

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions acf-block-templates/web-directory/web-directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,23 @@
* Support for the selection of multiple department IDs implemented by a standard ACF multi-select field.
*
* @package Pitchfork_Blocks
*/

Check failure on line 14 in acf-block-templates/web-directory/web-directory.php

View workflow job for this annotation

GitHub Actions / WPCS

There must be exactly one blank line after the file comment


/**
* Get ACF fields and profile data from Search endpoint.
*/
$display = get_field( 'uds_webdir_display' );

Check failure on line 20 in acf-block-templates/web-directory/web-directory.php

View workflow job for this annotation

GitHub Actions / WPCS

Spaces must be used for mid-line alignment; tabs are not allowed
$department_ids = get_field( 'uds_webdir_select_dept' );

Check failure on line 21 in acf-block-templates/web-directory/web-directory.php

View workflow job for this annotation

GitHub Actions / WPCS

Spaces must be used for mid-line alignment; tabs are not allowed
$pagination = get_field( 'uds_webdir_profiles_per_page' );

Check failure on line 22 in acf-block-templates/web-directory/web-directory.php

View workflow job for this annotation

GitHub Actions / WPCS

Spaces must be used for mid-line alignment; tabs are not allowed
$alpha = get_field( 'uds_webdir_include_alpha' );

Check failure on line 23 in acf-block-templates/web-directory/web-directory.php

View workflow job for this annotation

GitHub Actions / WPCS

Spaces must be used for mid-line alignment; tabs are not allowed
$exclude = get_field( 'uds_webdir_filter_exclude' );

Check failure on line 24 in acf-block-templates/web-directory/web-directory.php

View workflow job for this annotation

GitHub Actions / WPCS

Spaces must be used for mid-line alignment; tabs are not allowed
$expertise = get_field( 'uds_webdir_filter_expertise' );

Check failure on line 25 in acf-block-templates/web-directory/web-directory.php

View workflow job for this annotation

GitHub Actions / WPCS

Spaces must be used for mid-line alignment; tabs are not allowed
$employee_type = get_field( 'uds_webdir_filter_employee_type' );
$campus = get_field( 'uds_webdir_filter_campus' );
$showfilter = get_field( 'uds_webdir_filter_display');
$custom_list = get_field( 'uds_webdir_custom_list' );
$grid = get_field( 'uds_webdir_grid' );

$spacing = pitchfork_people_acf_calculate_spacing( $block );

Expand Down Expand Up @@ -98,6 +99,12 @@
$data_attributes[] = 'data-alphaFilter="false"';
}

if ( $grid ) {
$data_attributes[] = 'data-grid="true"';
} else {
$data_attributes[] = 'data-grid="false"';
}

//set dept id to 1466 if no dept id is selected
if ($display === 'people') {
$dept_string = '1466';
Expand Down
56 changes: 41 additions & 15 deletions acf-json/group_645ebe42aaa12.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"choices": {
"N1716573612": " Healthy Urban Environments (N1716573612)",
"N1716573817": " Lightworks (N1716573817)",
"N1738622714": "AI Acceleration (N1738622714)",
"3560": "AIMS Consortium (3560)",
"1388": "AISSS (1388)",
"1599": "AISSS - Poly (1599)",
Expand Down Expand Up @@ -359,6 +360,7 @@
"197667": "Brand Creative (197667)",
"467225": "Brand Strategy and Performance Marketing (467225)",
"95864": "Budget Operations (95864)",
"N1738622344": "Budget and Finance (N1738622344)",
"32399": "Bus & Fin Communications Group (32399)",
"144835": "Business Operations (144835)",
"151617": "Business Support (151617)",
Expand Down Expand Up @@ -495,6 +497,7 @@
"1691": "Communications and Web Services (1691)",
"N1720199692": "Community Education Services (N1720199692)",
"1524": "Community Outreach (1524)",
"N1738623042": "Community Partners (N1738623042)",
"182112": "Complex Adaptive Supply Networks Research Accelerator (182112)",
"1469": "Complex Adaptive Systems Initiative (1469)",
"N1717026911": "Complex Systems Research Group (N1717026911)",
Expand All @@ -505,11 +508,12 @@
"197669": "Copywriting and Video (197669)",
"N1699568351": "Cores Sales & Marketing (N1699568351)",
"338029": "Corporate Engagement & Strategic Partnerships (338029)",
"382740": "Creative & Communication (382740)",
"467231": "Creative Operations (467231)",
"144832": "Creative Strategy and Brand Execution (144832)",
"382740": "Creative and Communication (382740)",
"2204": "Ctr Neural Interface & Design (2204)",
"440431": "Curriculum & Instructional Design (440431)",
"N1738624236": "Cybersecurity (N1738624236)",
"1386": "DARS (1386)",
"473737": "DC ASU Local Site (473737)",
"1532": "DPC Academic Affairs (1532)",
Expand All @@ -536,6 +540,7 @@
"N1720199931": "Data Strategy Tempe (N1720199931)",
"N1720199973": "Data Strategy West (N1720199973)",
"154040": "Data Warehouse (154040)",
"34292": "Data and Analytics (34292)",
"154037": "Data and Business Intel (154037)",
"2134": "Database & Production Supt (2134)",
"1526": "Dean of Students Tempe (1526)",
Expand All @@ -561,6 +566,7 @@
"1569": "Development, Mobility, & Smart Cities (1569)",
"342242": "Digital Brand Creative (342242)",
"1808": "Digital Document Services (1808)",
"N1738623821": "Digital Infrastructure (N1738623821)",
"320968": "Digital Preservation (320968)",
"2161": "Digital Transformation (2161)",
"3534": "Dining (3534)",
Expand All @@ -569,9 +575,6 @@
"194240": "Division Teacher Prep\/Poly (194240)",
"194241": "Division Teacher Prep\/Tempe (194241)",
"194242": "Division Teacher Prep\/West (194242)",
"193308": "Division of Educational Leadership & Innovation Ply (193308)",
"194234": "Division of Educational Leadership & Innovation Tmp (194234)",
"194235": "Division of Educational Leadership & Innovation Wst (194235)",
"N1663800981": "Dreamscape Learn (N1663800981)",
"361955": "E-Learning and Instruction (361955)",
"1435": "EHS (1435)",
Expand Down Expand Up @@ -631,6 +634,7 @@
"396706": "Emeritus College Council (396706)",
"396707": "Emeritus College Leadership (396707)",
"1688": "Engagement and Learning Services (1688)",
"2133": "Engineering (2133)",
"1637": "Engineering Communications (1637)",
"N1709593381": "Engineering Education Systems and Design, The Polytechnic School (N1709593381)",
"1640": "Engineering Technical Services (1640)",
Expand All @@ -645,7 +649,6 @@
"473740": "Enterprise Planning (473740)",
"1802": "Enterprise Risk and Resilience (1802)",
"1359": "Enterprise Technology (1359)",
"2133": "Enterprise Technology - Engineering Core (2133)",
"N1700671721": "Entrepreneurship + Innovation Venture Mentors (N1700671721)",
"557685": "Entrepreneurship Catalysts (557685)",
"558215": "Environmental Biotechnology Administration (558215)",
Expand All @@ -665,6 +668,8 @@
"373848": "Executive Administration (373848)",
"440428": "Executive Education & Professional Education (440428)",
"N1706894792": "Executive Education, Corporate Partnerships and Lifelong Learning (N1706894792)",
"N1738622577": "Executive Enablement (N1738622577)",
"N1738623907": "Experience Center (N1738623907)",
"1736": "Eyring Materials Center (1736)",
"334959": "Eyring Materials Center (334959)",
"1607": "FA Scholarship Services Dwtn (1607)",
Expand Down Expand Up @@ -915,12 +920,6 @@
"1771": "Lincoln Center Applied Ethics (1771)",
"2393": "Lodestar Center for Philanthropy & Nonprofit Innovation (2393)",
"1753": "MCMSC (1753)",
"192466": "MLF Teachers College (192466)",
"192484": "MLF Teachers College T (192484)",
"192486": "MLF Teachers College W (192486)",
"N1720201065": "MLFTC Development Tempe (N1720201065)",
"N1720202233": "MLFTC Development West (N1720202233)",
"192497": "MLFTC Division of Educational Leadership & Innovation (192497)",
"2259": "MTBI (2259)",
"1803": "Mail Services (1803)",
"N1661807962": "Makerspace (N1661807962)",
Expand All @@ -929,6 +928,7 @@
"N1720200875": "Marketing Tempe (N1720200875)",
"N1720200901": "Marketing West (N1720200901)",
"1696": "Marketing and Communications (1696)",
"192466": "Mary Lou Fulton College for Teaching and Learning Innovation (192466)",
"1718": "Master of Real Estate Development (1718)",
"448589": "Materials of the Universe Center (448589)",
"2242": "Mathematics (2242)",
Expand Down Expand Up @@ -956,6 +956,7 @@
"1527": "Multicultural Student Services (1527)",
"334957": "NanoFabrication Core (334957)",
"1776": "Naval Science (1776)",
"N1730849444": "NetZ-CMI (N1730849444)",
"2135": "Network Communications (2135)",
"557397": "Neurodegenerative Disease Administration (557397)",
"N1663004217": "Neurodegenerative Disease Associate Faculty (N1663004217)",
Expand All @@ -974,7 +975,7 @@
"N1709918704": "New College – Strategic Communications (N1709918704)",
"N1709918760": "New College – Undergraduate Services (N1709918760)",
"1520": "New Student Programs (1520)",
"382742": "Next Lab (382742)",
"382742": "Next Labs (382742)",
"2123": "Nina Mason Pulliam Scholars (2123)",
"1819": "OHR Total Rewards (1819)",
"199467": "ORSPA Award Management (199467)",
Expand Down Expand Up @@ -1012,7 +1013,6 @@
"237815": "Open Stacks (237815)",
"1566": "Operating & Digital Transformation (1566)",
"154022": "Operations (154022)",
"1565": "Operations (1565)",
"337599": "Operations Project Management (337599)",
"467226": "Operations and Execution (467226)",
"1777": "Origins (1777)",
Expand All @@ -1030,6 +1030,7 @@
"558213": "Pathfinder Faculty (558213)",
"558212": "Pathfinder Researchers (558212)",
"1797": "Payables & Reimbursements (1797)",
"1565": "People Operations (1565)",
"557906": "Personalized Diagnostics Administration (557906)",
"N1663263155": "Personalized Diagnostics Associate Faculty (N1663263155)",
"557962": "Personalized Diagnostics Faculty (557962)",
Expand All @@ -1041,6 +1042,7 @@
"1431": "Police Department (1431)",
"154036": "Policy and Communications (154036)",
"444133": "Policy and governance (444133)",
"N1738624018": "Portfolio Management and Execution (N1738624018)",
"422225": "Preparedness & Security Initiatives (422225)",
"1767": "Prgm Soc Dynamics & Complexity (1767)",
"N1720204713": "Principled Innovation (N1720204713)",
Expand Down Expand Up @@ -1195,6 +1197,7 @@
"N1659649552": "School of Manufacturing Systems and Networks (N1659649552)",
"96259": "School of Mathematical and Natural Sciences (96259)",
"2243": "School of Mathematical and Statistical Sciences (2243)",
"N1730313775": "School of Medicine and Advanced Medical Engineering (N1730313775)",
"1734": "School of Molecular Sciences (1734)",
"392823": "School of Music, Dance and Theatre (392823)",
"N1662572787": "School of Ocean Futures (N1662572787)",
Expand Down Expand Up @@ -1253,6 +1256,7 @@
"317651": "Student Support Resources (317651)",
"159369": "Success by Design (UC) (159369)",
"1809": "Sun Card Office (1809)",
"N1738622493": "Sun Corridor Network (N1738622493)",
"1352": "Sun Devil Athletics (1352)",
"2036": "Sun Devil Fitness Tempe (2036)",
"1811": "Surplus Property (1811)",
Expand All @@ -1279,6 +1283,7 @@
"352994": "TW Lewis Center for Personal Development (352994)",
"N1676397455": "Team (N1676397455)",
"1684": "Technology Services (1684)",
"N1738623746": "Technology Shared Services (N1738623746)",
"1710": "Technology Strategy and Operations (1710)",
"1492": "Technology Support (1492)",
"35494": "Technology, Entrepreneurship and Management, The Polytechnic School (35494)",
Expand All @@ -1297,6 +1302,7 @@
"473738": "Title IX (473738)",
"3518": "Transfer Systems Develop (3518)",
"444100": "Transportation Research (444100)",
"N1738622825": "Trust, Trusted Learner Network and Pocket (N1738622825)",
"1798": "UBS Applications & Planning (1798)",
"159727": "UC - Office of the Dean (159727)",
"215841": "UC Leadership (215841)",
Expand All @@ -1313,7 +1319,6 @@
"1604": "Univ Registrar Services Dwtn (1604)",
"1603": "Univ Registrar Services Poly (1603)",
"1602": "Univ Registrar Services West (1602)",
"34292": "University Analytics and Data Services (34292)",
"237818": "University Archives (237818)",
"3593": "University Audit & Advisory Services (3593)",
"1427": "University Business Services (1427)",
Expand Down Expand Up @@ -1395,6 +1400,27 @@
"ui_off_text": "Remove",
"ui": 1
},
{
"key": "field_67a4ece5e711d",
"label": "Front end initial display",
"name": "uds_webdir_grid",
"aria-label": "",
"type": "true_false",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"message": "",
"default_value": 0,
"allow_in_bindings": 0,
"ui_on_text": "Grid view",
"ui_off_text": "List view",
"ui": 1
},
{
"key": "field_66676e5392b06",
"label": "Excluded profiles",
Expand Down Expand Up @@ -3621,5 +3647,5 @@
"active": true,
"description": "Contains UI elements for basic web directory configuration.",
"show_in_rest": 0,
"modified": 1729618974
"modified": 1738864831
}
2 changes: 1 addition & 1 deletion dist/js/app-webdir-init.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '558deec0b630f413ad97');
<?php return array('dependencies' => array(), 'version' => 'e92d07336a491cd3266a');
4 changes: 3 additions & 1 deletion dist/js/app-webdir-init.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/scripts/app-webdir-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ window.addEventListener("DOMContentLoaded", event => {
const employeeType = webDirTarget.dataset.employeetype;
const campus = webDirTarget.dataset.campus;
const ids = webDirTarget.dataset.ids;
const grid = webDirTarget.dataset.grid;

const display = {
defaultSort: "last_name",
doNotDisplayProfiles: exclude,
profilesPerPage: pagination,
usePager: "1",
grid: grid
};
const filters = {
employee: employeeType,
Expand Down
Loading