Skip to content

Commit

Permalink
DWPF-1076 Preferred names in type ahead search (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
CamLamb authored Dec 4, 2023
1 parent 3793da8 commit 0b55bef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/core/templates/includes/profile_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
{% if peoplefinder_profile.photo %}
<img src="{{ peoplefinder_profile.photo_small.url }}"
alt="Profile image of {{ peoplefinder_profile.get_full_name }}"
alt="Profile image of {{ peoplefinder_profile.full_name }}"
class="profile-image">
{% else %}
<img src="{% webpack_static 'no-photo.png' %}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@

{% if people %}
<div class="govuk-heading-s autocomplete-title">
<a class="govuk-divnk"
<a class="govuk-link"
href="{% url 'search:category' 'people' %}?query={{ search_query }}"
onclick="dataLayer.push({ 'event': 'autocomplete-result-heading', 'autocomplete-result_selected_url': '{% url 'search:category' 'people' %}?query={{ search_query }}', 'autocomplete_result_selected_type': 'person'})">
People results</a>
</div>
{% endif %}
{% for person in people %}
<div class= "autocomplete-choice">
<a class="govuk-divnk"
<a class="govuk-link"
href="{% url 'profile-view' person.slug %}"
onclick="dataLayer.push({ 'event': 'autocomplete-result', 'autocomplete-result_selected_url': '{% url 'profile-view' person.slug %}', 'autocomplete_result_selected_type': 'person'})">
<div class="people">
{% if person.photo %}
<img src="{{ person.photo_small.url }}"
alt="Profile image of {{ person.get_full_name }}"
alt="Profile image of {{ person.full_name }}"
class="profile-image">
{% else %}
<img src="{% webpack_static 'no-photo.png' %}"
alt="No photo"
class="profile-image">
{% endif %}
<p class="govuk-body autocomplete-text">{{ person.first_name }} {{ person.last_name }}</p>
<p class="govuk-body autocomplete-text">{{ person.full_name }}</p>
</div>
</a>
</div>
{% endfor %}
{% if pages %}
<div class="govuk-heading-s autocomplete-title">
<a class="govuk-divnk"
<a class="govuk-link"
href="{% url 'search:category' 'all' %}?query={{ search_query }}"
onclick="dataLayer.push({ 'event': 'autocomplete-result-heading', 'autocomplete-result_selected_url': '{% url 'search:category' 'all' %}?query={{ search_query }}', 'autocomplete_result_selected_type': 'page'})">Content results</a>
</div>
{% endif %}
{% for page in pages %}
<div class="autocomplete-choice">
<a class="govuk-divnk"
<a class="govuk-link"
href="{% pageurl page %}"
onclick="dataLayer.push({ 'event': 'autocomplete-result', 'autocomplete-result_selected_url': '{% pageurl page %}', 'autocomplete_result_selected_type': 'all'})">
<div>
Expand All @@ -55,14 +55,14 @@
{% endfor %}
{% if teams %}
<div class="govuk-heading-s autocomplete-title">
<a class="govuk-divnk"
<a class="govuk-link"
href="{% url 'search:category' 'teams' %}?query={{ search_query }}"
onclick="dataLayer.push({ 'event': 'autocomplete-result-heading', 'autocomplete-result_selected_url': '{% url 'search:category' 'teams' %}?query={{ search_query }}', 'autocomplete_result_selected_type': 'teams'})">Teams results</a>
</div>
{% endif %}
{% for team in teams %}
<div class="autocomplete-choice">
<a class="govuk-divnk"
<a class="govuk-link"
href="{% url 'team-view' team.slug %}"
onclick="dataLayer.push({ 'event': 'autocomplete-result', 'autocomplete-result_selected_url': '{% url 'team-view' team.slug %}', 'autocomplete_result_selected_type': 'teams'})">
<div>
Expand Down

0 comments on commit 0b55bef

Please sign in to comment.