diff --git a/app/views/admin/university/alumni/show.html.erb b/app/views/admin/university/alumni/show.html.erb index 83ad9faef63fa4ca4ecaa31c4a347c5b2d9fc846..1fc61fa85d1d269b6483be35b905b351707c69e5 100644 --- a/app/views/admin/university/alumni/show.html.erb +++ b/app/views/admin/university/alumni/show.html.erb @@ -17,6 +17,25 @@ </div> <% end %> +<% if @alumnus.experiences.any? %> + <div class="card flex-fill w-100"> + <div class="card-header"> + <h2 class="card-title mb-0 h5"><%= University::Person::Experience.model_name.human(count: @alumnus.experiences.count) %></h2> + </div> + <div class="card-body"> + <ul class="list-unstyled"> + <% @alumnus.experiences.ordered.each do |experience| %> + <% organization = experience.organization %> + <li> + <%= link_to_if can?('read', organization), organization, [:admin, organization] %> + <%= "(#{experience.from_year} - #{experience.to_year.present? ? experience.to_year : t('today')})" %> + </li> + <% end %> + </ul> + </div> + </div> +<% end %> + <% content_for :action_bar_right do %> <%= edit_link @alumnus %> diff --git a/app/views/extranet/organizations/show.html.erb b/app/views/extranet/organizations/show.html.erb index c1a410e2185f5f6f1bdaa326da6d41d8ae635501..67d044f7d9422422cebad5a343c9b20bf882274f 100644 --- a/app/views/extranet/organizations/show.html.erb +++ b/app/views/extranet/organizations/show.html.erb @@ -42,7 +42,7 @@ <%= experience.description %><br> <% end %> <%= "#{experience.from_year} —" if experience.from_year %> - <%= experience.to_year || University::Person::Experience.human_attribute_name(:today) %> + <%= experience.to_year || t('today') %> </p> </div> </li> diff --git a/app/views/extranet/persons/show.html.erb b/app/views/extranet/persons/show.html.erb index d40ac0236c9b3f98038febdd721815879bc79e18..a6901c29439dc1f2593ff8018c86e9629a202f3c 100644 --- a/app/views/extranet/persons/show.html.erb +++ b/app/views/extranet/persons/show.html.erb @@ -30,7 +30,7 @@ <p><b><%= experience.description %></b></p> <p class="mb-0"> <%= "#{experience.from_year} —" if experience.from_year %> - <%= experience.to_year || University::Person::Experience.human_attribute_name(:today) %> + <%= experience.to_year || t('today') %> </p> </div> <div> diff --git a/config/locales/en.yml b/config/locales/en.yml index a24c9010c881d4bdcd5c1476bc2f74656eb97a9a..f4364a70e0b28ffa7e4f297d8f4aa1c39160d998 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -184,6 +184,7 @@ en: date_only: "%m/%d/%Y" date_with_explicit_month: "%B %d, %Y" date_with_hour: "%B %d, %Y %H:%M" + today: Today true: Yes unsplash: next: Next image diff --git a/config/locales/fr.yml b/config/locales/fr.yml index a03167dfd59c21ff640a304066d7365cbdd87960..623e0d9cd06b5b5cdb49ed1bfd9e474c21f5e9b3 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -184,6 +184,7 @@ fr: date_only: "%d/%m/%Y" date_with_explicit_month: "%d %B %Y" date_with_hour: "%d %B %Y %H:%M" + today: Aujourd'hui true: Oui unsplash: next: Images suivantes diff --git a/config/locales/university/en.yml b/config/locales/university/en.yml index 7b1e4780fa4a510fbf5aa7778def32c9b5da57e3..b61aa453c9e3265ba90a310f4ba17b7125b7dc55 100644 --- a/config/locales/university/en.yml +++ b/config/locales/university/en.yml @@ -57,7 +57,6 @@ en: university/person/experience: from_year: Start year to_year: End year - today: Today university/person/involvement: description: Mission (in this context) person: Person diff --git a/config/locales/university/fr.yml b/config/locales/university/fr.yml index 502fa6a9249c2a8dd51f035671546d2884d381fe..c04e730f0fe1c2ed05085cd17c760f998923ce03 100644 --- a/config/locales/university/fr.yml +++ b/config/locales/university/fr.yml @@ -57,7 +57,6 @@ fr: university/person/experience: from_year: Année de début to_year: Année de fin - today: Aujourd'hui university/person/involvement: description: Mission (dans ce contexte) person: Personne