From 011b4d576af2791b95db5f9230c8c92fcc90804d Mon Sep 17 00:00:00 2001 From: selini Date: Tue, 21 Mar 2017 21:08:53 +0200 Subject: [PATCH] Create links for speakers in admin/reports#index --- app/views/admin/reports/_all_events.html.haml | 8 +++++++- .../admin/reports/_events_with_requirements.html.haml | 6 +++++- .../admin/reports/_events_without_commercials.html.haml | 6 +++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/views/admin/reports/_all_events.html.haml b/app/views/admin/reports/_all_events.html.haml index 6aef4178..7a5f5380 100644 --- a/app/views/admin/reports/_all_events.html.haml +++ b/app/views/admin/reports/_all_events.html.haml @@ -27,7 +27,13 @@ %td = link_to event.title, edit_admin_conference_program_event_path(@conference.short_title, event) %br - .small (Presented by #{event.speaker_names}) + .small + (Presented by + - speakers = event.speakers.uniq + - speakers.each.with_index(1) do |speaker,index| + = link_to speaker.name, admin_user_path(speaker) + = ',' unless index == speakers.length + ) - %w(registered biography commercials subtitle difficulty_level).each do |info| %td{'data-order' => "#{progress_status[info]}"} diff --git a/app/views/admin/reports/_events_with_requirements.html.haml b/app/views/admin/reports/_events_with_requirements.html.haml index b0759af8..7bebe2b2 100644 --- a/app/views/admin/reports/_events_with_requirements.html.haml +++ b/app/views/admin/reports/_events_with_requirements.html.haml @@ -21,7 +21,11 @@ %tr %td= event.id %td= link_to event.title, edit_admin_conference_program_event_path(@conference.short_title, event) - %td #{event.speaker_names} + %td + - speakers = event.speakers.uniq + - speakers.each.with_index(1) do |speaker,index| + = link_to speaker.name, admin_user_path(speaker) + = ',' unless index == speakers.length %td= event.description %td= event.room.name if event.room %td= event.time.to_date if event.time diff --git a/app/views/admin/reports/_events_without_commercials.html.haml b/app/views/admin/reports/_events_without_commercials.html.haml index 1aaff358..798f3d4a 100644 --- a/app/views/admin/reports/_events_without_commercials.html.haml +++ b/app/views/admin/reports/_events_without_commercials.html.haml @@ -17,4 +17,8 @@ %tr %td= event.id %td= link_to event.title, edit_admin_conference_program_event_path(@conference.short_title, event) - %td #{event.speaker_names} + %td + - speakers = event.speakers.uniq + - speakers.each.with_index(1) do |speaker,index| + = link_to speaker.name, admin_user_path(speaker) + = ',' unless index == speakers.length