mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 12:14:03 +00:00
Partially fixes #718. Some objects have an foreign_key set on track, difficulty level or room but the referenced object does not exists. This is caused by introducing dependent: nullify after deleting some of the objects. This commit will make the show page more robust, however, we need to fix the corrupt objects in an additional commit.
86 lines
3.1 KiB
Text
86 lines
3.1 KiB
Text
.container
|
|
.row
|
|
.col-md-12.page-header
|
|
%h2
|
|
= @event.title
|
|
- if @event.subtitle
|
|
%br
|
|
%small
|
|
= @event.subtitle
|
|
.btn-group.pull-right
|
|
- if can? :update, @event
|
|
= link_to 'Registrations', registrations_conference_program_proposal_path(@conference.short_title, @event), class: 'btn btn-mini btn-success'
|
|
- if can? :edit, @event
|
|
= link_to "Edit", edit_conference_program_proposal_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary"
|
|
- if can? :schedule, @conference
|
|
= link_to "Schedule", schedule_conference_path(@conference.short_title), :class =>"btn btn-success"
|
|
.row
|
|
.col-md-3
|
|
.speakerinfo
|
|
.col-md-12
|
|
= image_tag @speaker.gravatar_url(:size => 200), :class => "img-responsive img-rounded"
|
|
.col-md-12
|
|
%h3
|
|
by
|
|
= link_to @speaker.name, user_path(@speaker.id)
|
|
= "(#{@speaker.email})"
|
|
- if @speaker.affiliation?
|
|
%br
|
|
%span.muted
|
|
from
|
|
= @speaker.affiliation
|
|
-if @speaker.biography?
|
|
= simple_format(@speaker.biography)
|
|
.col-md-9
|
|
.row
|
|
.col-md-12
|
|
- if @event.commercials.empty?
|
|
%h5.text-warning
|
|
No video of the event yet, sorry!
|
|
- unless @conference.commercials.empty?
|
|
Meanwhile...
|
|
- unless @conference.commercials.empty?
|
|
= render partial: 'shared/media_items', locals: { commercials: @conference.commercials }
|
|
- else
|
|
%p
|
|
= render partial: 'shared/media_items', locals: { commercials: @event.commercials }
|
|
.row
|
|
.col-md-12
|
|
%p
|
|
= simple_format(@event.abstract)
|
|
%dl#proposal-info
|
|
.col-md-12
|
|
%dt Date:
|
|
%dd= @event.start_time.strftime("%Y %B %e %H:%M") if @event.start_time
|
|
.col-md-12
|
|
%dt Duration:
|
|
%dd= show_time(@event.event_type.length)
|
|
.col-md-12
|
|
%dt Room:
|
|
%dd
|
|
- if @event.room
|
|
= @event.room.name
|
|
.col-md-12
|
|
%dt Conference:
|
|
%dd= @event.program.conference.title
|
|
.col-md-12
|
|
%dt Language:
|
|
%dd= @event.language if @event.language
|
|
.col-md-12
|
|
%dt Track:
|
|
%dd
|
|
- if @event.track
|
|
%span.label{:style =>"background-color: #{@event.track.color};"}
|
|
= @event.track.name
|
|
.col-md-12
|
|
%dt Difficulty:
|
|
%dd
|
|
- if @event.difficulty_level
|
|
%span.label{:style =>"background-color: #{@event.difficulty_level.color};"}
|
|
= @event.difficulty_level.title
|
|
|
|
- if @event.require_registration
|
|
.col-md-12
|
|
%dt Requires Registration:
|
|
%dd
|
|
= link_to "Yes (#{registered_text(@event)})", new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-xs btn-danger', disabled: !@event.registration_possible?
|