Merge pull request #562 from differentreality/highlights_cfp

add highlights and fix cfp in splashpage
This commit is contained in:
Stella Rouzi 2015-01-22 20:40:24 +02:00
commit 6076e29733
26 changed files with 206 additions and 67 deletions

View file

@ -7,7 +7,6 @@
= semantic_form_for(@call_for_paper, :url => admin_conference_call_for_paper_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.input :include_cfp_in_splash, label: "Show Call for Papers on the splash page"
= f.input :schedule_public, label: "Show Schedule on the home and splash page"
= f.input :schedule_changes, label: "Allow submitters to change their event after it is scheduled"
= f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals."

View file

@ -29,13 +29,6 @@
Tracks:
%dd
= tracks(@conference)
%dt
Public
%dd#cfp_in_splash
- if @call_for_paper.include_cfp_in_splash
True
- else
False
%dt
Public Schedule
%dd#schedule_public

View file

@ -22,7 +22,7 @@
= event_type.length
Minutes
%td
= "#{event_type.minimum_abstract_length}:#{event_type.maximum_abstract_length}"
= "#{event_type.minimum_abstract_length} - #{event_type.maximum_abstract_length}"
Words
%td
%span.label{style: "background-color: #{event_type.color};"}

View file

@ -23,8 +23,21 @@
<b class="caret"></b>
%ul.dropdown-menu
- @event_types.each do |type|
%li= link_to type.title, admin_conference_event_path(@conference.short_title, @event, :event_type_id => type.id) ,
:method => :put, :event_type_id => type.id
%li= link_to type.title,
admin_conference_event_path(@conference.short_title,
@event,
event: { event_type_id: type.id }),
method: :patch
%tr
%td
%b Highlight
%td
= check_box_tag @conference.short_title, @event.id, @event.is_highlight, class: 'switch-checkbox',
data: { size: "small",
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
%tr
%td
%b State
@ -48,8 +61,11 @@
<b class="caret"></b>
%ul.dropdown-menu
- @tracks.each do |track|
%li= link_to track.name, admin_conference_event_path(@conference.short_title, @event, :track_id => track.id) ,
:method => :put, :track_id => track.id
%li= link_to track.name,
admin_conference_event_path(@conference.short_title,
@event,
event: { track_id: track.id }),
method: :patch
%tr
%td
%b Difficulty
@ -63,8 +79,10 @@
<b class="caret"></b>
%ul.dropdown-menu
- @difficulty_levels.each do |difficulty|
%li= link_to difficulty.title, admin_conference_event_path(@conference.short_title, @event, :difficulty_level_id => difficulty.id) ,
:method => :put, :difficulty_level_id => difficulty.id
%li= link_to difficulty.title, admin_conference_event_path(@conference.short_title,
@event,
event: { difficulty_level_id: difficulty.id }),
method: :patch
- if !@event.room.nil?
%tr
%td

View file

@ -22,6 +22,8 @@
%b Submitter
%th
%b Speaker
%th
%b Highlight
%th
%b Type
%th
@ -70,6 +72,13 @@
= link_to speaker.name, admin_user_path(speaker)
- else
Unknown speaker
%td{'data-order' => "#{event.is_highlight}"}
= check_box_tag @conference.short_title, event.id, event.is_highlight, class: 'switch-checkbox',
data: { size: "small",
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
%td
.btn-group
%button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"}
@ -80,8 +89,11 @@
%span.caret
%ul.dropdown-menu
- @event_types.each do |type|
%li= link_to type.title, admin_conference_event_path(@conference.short_title, event, :event_type_id => type.id) ,
:method => :put, :event_type_id => type.id
%li= link_to type.title,
admin_conference_event_path(@conference.short_title,
event,
event: { event_type_id: type.id }),
method: :patch
%td
.btn-group
%button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"}
@ -92,10 +104,27 @@
%span.caret
%ul.dropdown-menu
- @tracks.each do |track|
%li= link_to track.name, admin_conference_event_path(@conference.short_title, event, :track_id => track.id) ,
:method => :put, :track_id => track.id
%li= link_to track.name,
admin_conference_event_path(@conference.short_title,
event,
event: { track_id: track.id }),
method: :patch
%td
= event.difficulty_level.title if event.difficulty_level
.btn-group
%button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"}
- if event.difficulty_level.nil?
Difficulty
- else
= event.difficulty_level.title
%span.caret
%ul.dropdown-menu
- @difficulty_levels.each do |difficulty_level|
%li= link_to difficulty_level.title,
admin_conference_event_path(@conference.short_title,
event,
event: { difficulty_level_id: difficulty_level.id }),
method: :patch
%td
- if event.state == "withdrawn"
Withdrawn

View file

@ -8,6 +8,7 @@
= f.inputs name: 'Components' do
= f.input :include_tracks, label: 'Display tracks on the splashpage?'
= f.input :include_program, label: 'Display program on the splashpage?'
= f.input :include_cfp, label: 'Display call for papers information on splashpage, while cfp is open?'
= f.input :include_venue, label: 'Display venue on the splashpage?'
= f.input :include_registrations, label: 'Display the registration period on the splashpage?'
= f.input :include_tickets, label: 'Display tickets on the splashpage?'

View file

@ -3,7 +3,7 @@
.page-header
%h1 Splashpage
%p.text-muted
Build a
Build a
= link_to "splash page", conference_path(@conference.short_title)
with all the information for your conference
- if @splashpage
@ -45,6 +45,13 @@
Yes
- else
No
%dt
Include CFP:
%dd
- if @splashpage.include_cfp
Yes
- else
No
%dt
Include Social Media:
%dd

View file

@ -24,9 +24,22 @@
= link_to(schedule_conference_path(@conference.short_title), class: 'btn btn-default btn-lg') do
Full Schedule
- #FIXME: Display keynotes https://github.com/openSUSE/osem/issues/544
- #FIXME: Display schedule highlights https://github.com/openSUSE/osem/issues/545
%h3.text-center
Don't miss out!
%br
- if @conference.events.highlights.any?
.row
.col-md-12
- @conference.events.highlights.each_slice(2) do |slice|
.row.row-centered
- slice.each do |event|
.col-md-6.col-centered.col-top.highlights
%p.text-center
%b= event.title
%h5.text-center
= simple_format truncate(event.abstract, length: 500, separator: ' ')
= link_to "Read More", conference_proposal_path(@conference.short_title, event)
= content_for :splash_nav do
%li

View file

@ -33,7 +33,7 @@
%section#program
= render 'program'
- if @conference.cfp_open? and @conference.call_for_paper.include_cfp_in_splash?
- if @conference.cfp_open? and @conference.splashpage.include_cfp
%section#callforpapers
= render 'call_for_paper'
@ -53,7 +53,7 @@
%section#sponsors
= render 'sponsors'
- if @conference.splashpage.include_social_media and @conference.contact.has_social_media?
- if @conference.contact.has_social_media? and @conference.splashpage.include_social_media
%section#social-media
= render 'social_media'

View file

@ -7,6 +7,7 @@
%meta{:content => "", :name => "author"}
= stylesheet_link_tag "application", :media => "all"
= javascript_include_tag "application"
= csrf_meta_tags
:javascript
window.liveSettings = {

View file

@ -11,13 +11,18 @@
%section#details
- if can? :update, @event or can? :create, @event
= f.input :event_type_id, as: :select,
collection: @conference.event_types.map {|x| ["#{x.title} - #{show_time(x.length)}", x.id,
data: { min_words: x.minimum_abstract_length, max_words: x.maximum_abstract_length }]},
collection: @conference.event_types.map {|type| ["#{type.title} - #{show_time(type.length)}", type.id,
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length }]},
include_blank: false, label: 'Session Type'
- else
Event type: #{@event.event_type.title}
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
= f.label :is_highlight
%br
%br
= f.check_box :is_highlight, class: 'switch-checkbox', data: { size: "small" }
%br
= f.input :difficulty_level, :as => :select, :collection => @conference.difficulty_levels, :include_blank => "(Please select)" if @conference.difficulty_levels.any?
= f.input :require_registration
= f.input :abstract, :input_html => {:rows => 5, :class => "span11"},