Browse Source

Merge branch 'development'

development
Godwin 7 years ago
parent
commit
bdb99b28d9
  1. 1
      app/assets/stylesheets/_admin.scss
  2. 6
      app/assets/stylesheets/_application.scss
  3. 8
      app/controllers/application_controller.rb
  4. 4
      app/views/conference_administration/_schedule.html.haml
  5. 2
      app/views/conference_administration/_workshop_times.html.haml

1
app/assets/stylesheets/_admin.scss

@ -1393,6 +1393,7 @@ nav.sub-menu {
position: absolute;
top: 0;
right: 0.25em;
z-index: 2;
ul {
width: 15em;

6
app/assets/stylesheets/_application.scss

@ -2060,6 +2060,12 @@ table.schedule {
white-space: nowrap;
text-align: right;
}
.row-type-nil {
th {
color: $almost-light-gray;
}
}
}
&.locations-1 td.workshop.filled {

8
app/controllers/application_controller.rb

@ -472,15 +472,15 @@ class ApplicationController < BaseController
@schedule.deep_dup.each do |day, data|
data[:times].each do |time, time_data|
if time_data[:next_event].present? || time_data[:length] > 0.5
span = 0.5
if time_data[:next_event].present? || time_data[:length] > @this_conference.schedule_interval
span = @this_conference.schedule_interval
length = time_data[:next_event].present? ? time_data[:next_event] - time : time_data[:length]
while span < length
@schedule[day][:times][time + span] ||= {
type: (span >= time_data[:length] ? :empty : :nil),
length: 0.5
length: @this_conference.schedule_interval
}
span += 0.5
span += @this_conference.schedule_interval
end
end
end

4
app/views/conference_administration/_schedule.html.haml

@ -17,8 +17,8 @@
%th=location.is_a?(Symbol) ? '' : _!(location.title)
%tbody
- data[:times].each do |time, time_data|
%tr
- rowspan = (time_data[:length] * 2).to_i
%tr{class: "row-type-#{time_data[:type] || 'nil'}"}
- rowspan = (time_data[:length] * (1 / @this_conference.schedule_interval)).to_i
%th=time(time).html_safe
- if time_data[:type] == :workshop
- data[:locations].each do |id, location|

2
app/views/conference_administration/_workshop_times.html.haml

@ -11,7 +11,7 @@
= form_tag administration_update_path(@this_conference.slug, @admin_step), class: ['table-tr', is_new ? 'new' : 'saved'] do
.table-th.center.big= is_new ? '' : (block + 1)
.table-td=hour_select info['time'], small: true, label: false
.table-td=length_select info['length'], {small: true, label: false}, 0.5, 2
.table-td=length_select info['length'], {small: true, label: false}, 0.5, 2, @this_conference.schedule_interval
.table-td=checkboxes :days, @block_days, info['days'].map(&:to_i), 'date.day_names', vertical: true, small: true
.table-td.form
= hidden_field_tag :workshop_block, block

Loading…
Cancel
Save