osem-fcy/app/views/proposal/show.html.haml
Ana feb002de1a Text color of event types and difficulty levels
Changing the text color of event types and difficulty levels taking the background color into account. Similar to what it is done with tracks. See issue https://github.com/openSUSE/osem/issues/1033

Closes https://github.com/openSUSE/osem/issues/1078
2016-07-11 15:32:02 +02:00

86 lines
3.3 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}; color: #{ contrast_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}; color: #{ contrast_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_registration_path(@conference.short_title), class: 'btn btn-xs btn-danger', disabled: !@event.registration_possible?