forked from snap-cloud/snapcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.haml
94 lines (89 loc) · 3.08 KB
/
index.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.row
.col-md-12
.page-header
%h1
Events
= "(#{@events.length})" if @events.any?
.btn-group.pull-right
%button.btn.btn-primary{ title: 'Mass import of materials for events',
data: { toggle: 'modal', target: '#mass-commercials-modal' } }
Add Materials
- if can? :create, Event
= link_to 'Add Event',
new_admin_conference_program_event_path(@conference.short_title),
class: 'button btn btn-default btn-info'
- if can? :read, Event
- @export_formats.each do |export_format|
= render 'export_menu',
export_format: export_format,
conference_id: @conference.short_title
%p.text-muted
All the submissions of your speakers
.modal#mass-commercials-modal
.modal-dialog
.modal-content
.modal-header
%h1
Add materials to events
.modal-body
= form_for('', url: mass_upload_commercials_admin_conference_program_path(@conference.short_title), method: :post) do |f|
.form-group
= f.file_field 'file', as: :file
%span.help-block
Upload your file.csv with data in the following format:
%b Event_ID,Title,URL
for instance:
%pre
Event_ID,Title,URL
1,Session Recording,https://youtube.com/myvideo
2,Demo Video,https://vimeo.com/myvideo
.modal-footer
= f.submit nil, class: 'btn btn-primary'
.row
.col-md-4
= render 'donut_chart', title: 'Events state',
data: @event_distribution, colors: @event_distribution_colors
.col-md-4
= render 'donut_chart', title: 'Confirmed events scheduled',
combined_data: @scheduled_event_distribution
.col-md-4
= render 'donut_chart', title: 'Tracks of confirmed events',
combined_data: @tracks_distribution_confirmed
.row
.col-md-12
.margin-event-table
%table.datatable
%thead
%tr
%th ID
%th Title
- if @program.rating_enabled?
%th Rating
%th Submitter
%th Speakers
- if @program.languages.present?
%th Language
%th Requires Registration
%th Highlight
%th Type
- if @program.tracks.any?
%th Track
- if @program.difficulty_levels.any?
%th Difficulty
%th State
%th
.fa-solid.fa-comment
%th Add Survey
%tbody
- @events.each do |event|
= render 'datatable_row',
event: event,
conference_id: @conference.short_title,
program: @program,
rating_enabled: @program.rating_enabled?,
show_votes: @program.show_voting?,
max_rating: @program.rating,
event_types: @event_types,
tracks: @tracks,
difficulty_levels: @difficulty_levels,
email_settings: @conference.email_settings