Merge pull request #1319 from JewelSam/master
#1220 adding the cell size attribute to the database
This commit is contained in:
commit
f3e712a1bc
19 changed files with 104 additions and 35 deletions
|
|
@ -10,7 +10,7 @@
|
|||
.col-md-12
|
||||
= semantic_form_for(@event_type, url: (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))) do |f|
|
||||
= f.input :title
|
||||
= f.input :length, input_html: {size: 3, type: 'number', step: EventType::LENGTH_STEP, min: EventType::LENGTH_STEP}
|
||||
= f.input :length, input_html: {size: 3, type: 'number', step: @event_type.program.schedule_interval, min: @event_type.program.schedule_interval}
|
||||
= f.input :description
|
||||
= f.input :minimum_abstract_length, input_html: {size: 3}
|
||||
= f.input :maximum_abstract_length, input_html: {size: 3}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
= f.input :schedule_fluid, 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.'
|
||||
= f.input :languages, hint: "Enter the languages allowed for events as values of #{link_to('ISO 639-1', 'http://www.loc.gov/standards/iso639-2/php/code_list.php', target: "_blank")} language codes separated with commas. The first language would be the default language. Leave it blank if you do not want to specify languages.".html_safe
|
||||
= f.input :schedule_interval, hint: "It is the minimal time interval of your schedule. The value should be 5, 6, 10, 12, 15, 20, 30 or 60. Warning! Some events could be unscheduled when changing this value."
|
||||
= f.input :blind_voting, hint: 'Enable this feature if you do not want to show voting results and voters prior to user submitting a vote. For the feature to work you need to set the voting dates below as well'
|
||||
= f.input :voting_start_date, as: :string, input_html: { id: 'datetimepicker-voting_start_date', readonly: true, value: (f.object.voting_start_date.to_formatted_s(:db_without_seconds) unless f.object.voting_start_date.nil?) }
|
||||
= f.input :voting_end_date, as: :string, input_html: { id: 'datetimepicker-voting_start_date', readonly: true, value: (f.object.voting_end_date.to_formatted_s(:db_without_seconds) unless f.object.voting_end_date.nil?) }
|
||||
|
|
|
|||
|
|
@ -49,6 +49,11 @@
|
|||
Yes
|
||||
- else
|
||||
No
|
||||
%dt
|
||||
Schedule interval
|
||||
%dd
|
||||
= @program.schedule_interval
|
||||
minutes
|
||||
|
||||
%h3 Voting Options
|
||||
%hr
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- compact_grid = EventType::LENGTH_STEP < 15
|
||||
- cells_per_hour = 60 / EventType::LENGTH_STEP
|
||||
- compact_grid = @program.schedule_interval < 15
|
||||
- cells_per_hour = 60 / @program.schedule_interval
|
||||
/ use smaller cell heights for more compact grids
|
||||
- cell_height = compact_grid ? 32 : 58
|
||||
- date_event_schedules = @event_schedules.select{ |e| e.start_time.to_date.eql? date }
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
= room.name
|
||||
- (@conference.start_hour * cells_per_hour..@conference.end_hour * cells_per_hour).each do |slot|
|
||||
- hour = slot / cells_per_hour
|
||||
- minutes = (EventType::LENGTH_STEP * (slot % cells_per_hour)).to_s.rjust(2, '0')
|
||||
- minutes = (@program.schedule_interval * (slot % cells_per_hour)).to_s.rjust(2, '0')
|
||||
- time = "#{hour}:#{minutes}"
|
||||
.schedule-room-slot{ id: "schedule-room-#{room.guid}-#{hour}-#{minutes}", |
|
||||
room_id: room.id, |
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
- cells_length = event.event_type.length / EventType::LENGTH_STEP
|
||||
- cells_length = event.event_type.length / @program.schedule_interval
|
||||
/ this height fits the room cells
|
||||
- compact_grid = EventType::LENGTH_STEP < 15
|
||||
- compact_grid = @program.schedule_interval < 15
|
||||
- single_cell_height = compact_grid ? 32 : 58
|
||||
- height = (cells_length * single_cell_height)
|
||||
- height -= 23 unless compact_grid
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- intervals = hrs_per_slide * 60 / EventType::LENGTH_STEP + 1
|
||||
- intervals = hrs_per_slide * 60 / @conference.program.schedule_interval + 1
|
||||
- width = 85 / intervals
|
||||
- carousel_number = (@conf_period / hrs_per_slide.to_f).ceil
|
||||
.carousel.slide{ id: "carousel-#{ date }-#{ hrs_per_slide }", |
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
- if event_schedule
|
||||
/ There is an event, calculate the span and show it
|
||||
- event_span = (event_schedule.end_time.to_i - start_room_time.to_i) / 60 / EventType::LENGTH_STEP
|
||||
- event_span = (event_schedule.end_time.to_i - start_room_time.to_i) / 60 / @conference.program.schedule_interval
|
||||
- span = ((event_span + i - 1 ) > intervals ? intervals + 1 - i : event_span)
|
||||
= render partial: 'schedule_item', locals: {event: event_schedule.event, event_schedule: event_schedule, span: span, width: width}
|
||||
- else
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
%start= @conference.start_date
|
||||
%end= @conference.end_date
|
||||
%days= (@conference.end_date - @conference.start_date).to_i + 1
|
||||
%timeslot_duration= length_timestamp(EventType::LENGTH_STEP)
|
||||
%timeslot_duration= length_timestamp(@conference.program.schedule_interval)
|
||||
|
||||
- if @events_xml.any?
|
||||
- @events_xml.keys.each.with_index(1) do |day, index|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue