Skip to content

Commit

Permalink
add custom title and description for athlete profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
vol1ura committed Dec 22, 2023
1 parent d72ab1c commit 6605a9b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/views/activities/_result.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<td>
<% if result.athlete_id %>
<div>
<%= link_to result.athlete.name.presence || t('athletes.show.nobody'), result.athlete, class: 'athlete-link' %>
<%= link_to result.athlete.name.presence || t('common.nobody'), result.athlete, class: 'athlete-link' %>
</div>
<div class="athlete-details fw-lighter">
<%= t '.total_runs_html', count: @results_count[result.athlete_id] %>
Expand All @@ -13,7 +13,7 @@
<% end %>
</div>
<% else %>
<%= t 'athletes.show.nobody' %>
<%= t 'common.nobody' %>
<% end %>
</td>
<td class="align-middle text-end">
Expand Down
6 changes: 5 additions & 1 deletion app/views/athletes/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<% athlete_name = @athlete.name || t('common.nobody') %>
<% head_info :title, athlete_name %>
<% head_info :description, t('.description', athlete_name:) %>

<h1>
<%= @athlete.name || t('.nobody') %>
<%= athlete_name %>
<button type="button" class="btn btn-outline-primary btn-light float-end float-md-none ms-md-3 mb-2" data-bs-toggle="modal" data-bs-target="#barcodeModal">
<i class="bi bi-upc-scan"></i>
</button>
Expand Down
3 changes: 2 additions & 1 deletion config/locales/rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ rs:
common:
without_token: WITHOUT TOKEN (create)
without_name: WITHOUT NAME
nobody: UNKNOWN
open_link: open
gender: Pol
man: Čovek
Expand Down Expand Up @@ -559,7 +560,7 @@ rs:
women: Žene
athletes:
show:
nobody: UNKNOWN
description: 'Athlete profile %{athlete_name}: results, statistics and volunteering'
activities:
index:
description: Recent run results on S95 events
Expand Down
3 changes: 2 additions & 1 deletion config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ ru:
common:
without_token: БЕЗ ТОКЕНА (создать)
without_name: БЕЗ ИМЕНИ
nobody: НЕИЗВЕСТНЫЙ
open_link: открыть
gender: Пол
man: Мужчина
Expand Down Expand Up @@ -560,7 +561,7 @@ ru:
women: Женщины
athletes:
show:
nobody: НЕИЗВЕСТНЫЙ
description: 'Профиль участника %{athlete_name}: результаты, статистика и волонтёрства'
activities:
index:
description: Недавние результаты забегов S95
Expand Down

0 comments on commit 6605a9b

Please # to comment.