Skip to content

Commit

Permalink
Merge pull request #560 from CuBoulder/issue/tiamat-theme/543
Browse files Browse the repository at this point in the history
People List Filter Labels as a Global Setting
  • Loading branch information
jcsparks authored and web-flow committed Nov 30, 2023
2 parents 675de04 + 05add88 commit c094af8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- ### People List Filter Labels as a Global Setting
Changes the People List `Filter 1`, `Filter 2`, and `Filter 3` custom labels to a Global Setting in Site Configuration, rather than being set per-page. These labels will be set under Configuration => Cu Boulder Site Settings => Appearance and Layout.

Resolves #543

Includes:
- `ucb_site_configuarion` => https://github.com/CuBoulder/ucb_site_configuration/pull/35
- `tiamat-theme` => https://github.com/CuBoulder/tiamat-theme/pull/560
- `ucb_custom_entities` =>
---

- ### Breadcrumbs updates
Updates to breadcrumbs to not display breadcrumb div when there are no items in the div

Expand Down
5 changes: 5 additions & 0 deletions config/install/boulder_base.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ ucb_social_share_position: '0'
ucb_breadcrumb_nav: 1
ucb_date_format: '0'
ucb_use_custom_logo: false
ucb_filter_1_label: 'Filter 1'
ucb_filter_2_label: 'Filter 2'
ucb_filter_3_label: 'Filter 3'


11 changes: 8 additions & 3 deletions templates/content/node--ucb-people-list-page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
{% set isFrontPage = 'sr-only' %}
{% endif %}

{# Global Labels for Filters 1-3, set in site config#}
{% set ucb_filter_1_label = drupal_config('boulder_base.settings', 'ucb_filter_1_label') %}
{% set ucb_filter_2_label = drupal_config('boulder_base.settings', 'ucb_filter_2_label') %}
{% set ucb_filter_3_label = drupal_config('boulder_base.settings', 'ucb_filter_3_label') %}

{%
set classes = [
'node',
Expand Down Expand Up @@ -51,19 +56,19 @@
'filter_1': {
'includes': content.field_ucb_people_filter_1|render|striptags|trim|split(' '),
'userAccessible': content.field_ucb_people_filter_1_s|render|striptags|trim == 'On',
'label': content.field_ucb_people_filter_1_label|render|striptags|trim,
'label': ucb_filter_1_label|render|striptags|trim,
'restrict': true
},
'filter_2': {
'includes': content.field_ucb_people_filter_2|render|striptags|trim|split(' '),
'userAccessible': content.field_ucb_people_filter_2_s|render|striptags|trim == 'On',
'label': content.field_ucb_people_filter_2_label|render|striptags|trim,
'label': ucb_filter_2_label|render|striptags|trim,
'restrict': true
},
'filter_3': {
'includes': content.field_ucb_people_filter_3|render|striptags|trim|split(' '),
'userAccessible': content.field_ucb_people_filter_3_s|render|striptags|trim == 'On',
'label': content.field_ucb_people_filter_3_label|render|striptags|trim,
'label': ucb_filter_3_label|render|striptags|trim,
'restrict': true
}
},
Expand Down

0 comments on commit c094af8

Please sign in to comment.