Skip to content

Commit

Permalink
Merge pull request #1328 from CuBoulder/issue/1304
Browse files Browse the repository at this point in the history
Places first name and last name on the same line to prevent trimming of the space between them
  • Loading branch information
jcsparks authored and web-flow committed Sep 25, 2024
2 parents 25d56c9 + 83716c1 commit 72dd1d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- ### Places first name and last name on the same line to prevent trimming of the space between them
[bug] An issue existed where a space was trimmed between the first name and last name on person pages due to the names being separated by a newline. This update resolves the issue. Resolves CuBoulder/tiamat-theme#1304
---

- ### People List Page: Selecting 'Group by Job Type or Department' with Filters applied to that term, only shows allowed groupings
Previously if you had a People List Page with `Group by` set to Department or Job Type, and had filter on that term, you could possibly see groupings of people for terms not selected in the filter, if the Person pages had multiple terms.

Expand Down
6 changes: 4 additions & 2 deletions templates/content/node--ucb-person.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
] %}

{% set baseurlJSON = url('<front>')|render|trim('/') %}
{% set firstName = content.field_ucb_person_first_name['#items'].0.value|trim %}
{% set lastName = content.field_ucb_person_last_name['#items'].0.value|trim %}

<article{{ attributes.addClass(classes) }} itemscope itemtype="https://schema.org/Person">
<div class="container ucb-person-header">
<h1 class="ucb-person-name">
{{ content.field_ucb_person_first_name }} {{ content.field_ucb_person_last_name }}
<span itemprop="givenName">{{ firstName }}</span>&nbsp;<span itemprop="familyName">{{ lastName }}</span>
</h1>
{{ content.field_ucb_person_pronouns }}
{% if content.field_ucb_person_title.0 or content.field_ucb_person_department.0 %}
Expand Down Expand Up @@ -74,7 +76,7 @@
<div class="ucb-articles-by-person-block">
<person-article-list base-uri="{{ baseurlJSON }}" nodeid="{{ node.id }}">
<div id="ucb-person-article-block-title" style="display:none">
<h2>Articles by {{ content.field_ucb_person_first_name.0 }} {{ content.field_ucb_person_last_name.0 }}</h2>
<h2>Articles by {{ firstName }} {{ lastName }}</h2>
</div>
<div id="ucb-al-loading" style="display:none" class="ucb-list-msg ucb-loading-data">
<i class="fa-solid fa-spinner fa-3x fa-spin-pulse"></i>
Expand Down
6 changes: 0 additions & 6 deletions templates/field/field--field-ucb-person-first-name.html.twig

This file was deleted.

6 changes: 0 additions & 6 deletions templates/field/field--field-ucb-person-last-name.html.twig

This file was deleted.

0 comments on commit 72dd1d0

Please sign in to comment.