Merge master tidy routes
This commit is contained in:
commit
de8b06c4b3
120 changed files with 1321 additions and 1293 deletions
|
|
@ -1,13 +1,14 @@
|
|||
.list-group
|
||||
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)}" }
|
||||
%ul.list-group
|
||||
.list-group-item
|
||||
%h4
|
||||
Conference progress
|
||||
.progress
|
||||
.progress-bar{ 'role' => 'progressbar', 'aria-valuenow' => "#{conference_progress['process']}", 'aria-valuemin' => '0',
|
||||
'aria-valuemax' => '100', 'style' => "width: #{conference_progress['process']}%;" }
|
||||
.progress-bar{ role: 'progressbar', 'aria-valuenow': conference_progress['process'],
|
||||
'aria-valuemin': 0, 'aria-valuemax': 100,
|
||||
style: "width: #{conference_progress['process']}%;" }
|
||||
= conference_progress['process'] + '%'
|
||||
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['registration'])}" }
|
||||
%span{ 'class' => icon_for_todo(conference_progress['registration']) }
|
||||
%li.list-group-item{ class: class_for_todo(conference_progress['registration']) }
|
||||
%span{ class: icon_for_todo(conference_progress['registration']) }
|
||||
- if can? :update, @conference
|
||||
- if conference.registration_period
|
||||
= link_to 'Set up registration period', edit_admin_conference_registration_period_path(conference_progress['short_title'])
|
||||
|
|
@ -15,14 +16,14 @@
|
|||
= link_to 'Set up registration period', new_admin_conference_registration_period_path(conference_progress['short_title'])
|
||||
- else
|
||||
Set up registration period
|
||||
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['cfp'])}" }
|
||||
%span{ 'class' => icon_for_todo(conference_progress['cfp']) }
|
||||
%li.list-group-item{ class: class_for_todo(conference_progress['cfp']) }
|
||||
%span{ class: icon_for_todo(conference_progress['cfp']) }
|
||||
- if can? :update, Cfp.new(program_id: @program.id)
|
||||
= link_to 'Set up call for papers', admin_conference_program_cfps_path(conference_progress['short_title'])
|
||||
- else
|
||||
Set up call for papers
|
||||
%li{'class'=>"list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['venue'])}"}
|
||||
%span{'class'=>icon_for_todo(conference_progress['venue'])}
|
||||
%li.list-group-item{ class: class_for_todo(conference_progress['venue']) }
|
||||
%span{ class: icon_for_todo(conference_progress['venue'])}
|
||||
- if can? :update, Venue.new(conference: @conference)
|
||||
- @conference.reload
|
||||
- if conference.venue
|
||||
|
|
@ -32,32 +33,32 @@
|
|||
- else
|
||||
- @conference.reload
|
||||
Add venue
|
||||
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['rooms'])}" }
|
||||
%span{ 'class' => icon_for_todo(conference_progress['rooms']) }
|
||||
%li.list-group-item{ class: class_for_todo(conference_progress['rooms']) }
|
||||
%span{ class: icon_for_todo(conference_progress['rooms']) }
|
||||
- if @conference.venue && (can? :update, @conference.venue.rooms.build)
|
||||
= link_to 'Add rooms', admin_conference_venue_rooms_path(conference_progress['short_title'])
|
||||
- else
|
||||
Add rooms
|
||||
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['tracks'])}" }
|
||||
%span{ 'class' => icon_for_todo(conference_progress['tracks']) }
|
||||
%li.list-group-item{ class: class_for_todo(conference_progress['tracks']) }
|
||||
%span{ class: icon_for_todo(conference_progress['tracks']) }
|
||||
- if can? :update, @conference.program.tracks.build
|
||||
= link_to 'Add tracks', admin_conference_program_tracks_path(conference_progress['short_title'])
|
||||
- else
|
||||
Add tracks
|
||||
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['event_types'])}" }
|
||||
%span{ 'class' => icon_for_todo(conference_progress['event_types']) }
|
||||
%li{ class: "list-group-item #{class_for_todo(conference_progress['event_types'])}" }
|
||||
%span{ class: icon_for_todo(conference_progress['event_types']) }
|
||||
- if can? :update, @conference.program.event_types.build
|
||||
= link_to 'Add event types', admin_conference_program_event_types_path(conference_progress['short_title'])
|
||||
- else
|
||||
Add event types
|
||||
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['difficulty_levels'])}" }
|
||||
%span{ 'class' => icon_for_todo(conference_progress['difficulty_levels']) }
|
||||
%li{ class: "list-group-item #{class_for_todo(conference_progress['difficulty_levels'])}" }
|
||||
%span{ class: icon_for_todo(conference_progress['difficulty_levels']) }
|
||||
- if can? :update, @conference.program.difficulty_levels.build
|
||||
= link_to 'Add difficulty levels', admin_conference_program_difficulty_levels_path(conference_progress['short_title'])
|
||||
- else
|
||||
Add difficulty levels
|
||||
%li{ class: "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['splashpage'])}" }
|
||||
%span{ 'class' => icon_for_todo(conference_progress['splashpage']) }
|
||||
%li.list-group-item{ class: "#{class_for_todo(conference_progress['splashpage'])}" }
|
||||
%span{ class: icon_for_todo(conference_progress['splashpage']) }
|
||||
- if can? :update, @conference
|
||||
= link_to 'Set up a Splashpage', admin_conference_splashpage_path(conference_progress['short_title'])
|
||||
- else
|
||||
|
|
|
|||
|
|
@ -9,24 +9,27 @@
|
|||
= semantic_form_for(@conference, url: admin_conference_path(@conference.short_title), html: {multipart: true}) do |f|
|
||||
= f.input :title, hint: "The full title of the conference, e.g. 'openSUSE Conference 2014'"
|
||||
= f.input :short_title, hint: "A short title, e.g. 'oSC14', to be used in URLs"
|
||||
= f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown' } }
|
||||
= f.input :color, hint: 'The color will be used eg for the dashboard.', input_html: {size: 6, type: 'color'}
|
||||
= f.label 'Conference Logo'
|
||||
= f.input :description,
|
||||
hint: markdown_hint('A description of the conference. (Supports unsafe HTML.)'),
|
||||
input_html: { rows: 5, data: { provide: 'markdown' } }
|
||||
= f.input :color, hint: 'The will be used in emails.',
|
||||
input_html: {size: 6, type: 'color'}
|
||||
= f.label 'Conference Logo', for: 'conference_picture'
|
||||
%br
|
||||
- if @conference.picture?
|
||||
= image_tag @conference.picture.thumb.url
|
||||
= f.input :picture, label: false, hint: 'This will be displayed on the front page.'
|
||||
= f.input :picture, label: false, hint: 'This will be shown in the navigation bar and emails.'
|
||||
= f.hidden_field :picture_cache
|
||||
|
||||
= f.input :custom_css,
|
||||
hint: "Add Custon CSS to the main page. You might find the class '.conference-#{@conference.short_title}' useful.",
|
||||
input_html: { rows: 5 }
|
||||
hint: "Add custon CSS to all pages within the conference. The class <code>.conference-#{@conference.short_title}</code> is included on the body element.".html_safe,
|
||||
input_html: { rows: 10, style: 'font-family: monospace' }
|
||||
|
||||
= f.input :ticket_layout, as: :select, collection: Conference.ticket_layouts.keys, hint: "Layout type for tickets of the conference."
|
||||
= f.inputs name: 'Scheduling' do
|
||||
= f.input :timezone, as: :time_zone, hint: 'The conference time zone'
|
||||
= 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 :start_date, as: :string, input_html: { id: 'conference-start-datepicker' }
|
||||
= f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker' }
|
||||
= f.input :start_hour, input_html: {size: 2, type: 'number', min: 0, max: 23}, hint: rescheduling_hint(@affected_event_count)
|
||||
= f.input :end_hour, input_html: {size: 2, type: 'number', min: 1, max: 24}, hint: rescheduling_hint(@affected_event_count)
|
||||
= f.inputs name: 'Registrations' do
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
Dashboard for #{@conference.title}
|
||||
%hr
|
||||
.row
|
||||
.col-sm-3.col-xs-3
|
||||
.col-sm-3.col-xs-6
|
||||
= render "big_statistic",
|
||||
icon: "user", subtitle: "Registration", value: @total_reg, delta: @new_reg
|
||||
.col-sm-3.col-xs-3
|
||||
.col-sm-3.col-xs-6
|
||||
= render "big_statistic",
|
||||
icon: "check-square", subtitle: "Submission", value: @total_submissions, delta: @new_submissions
|
||||
.col-sm-3.col-xs-3
|
||||
.col-sm-3.col-xs-6
|
||||
= render "big_statistic",
|
||||
icon: "file-text", subtitle: "Hour", value: @program_length, delta: @new_program_length
|
||||
.col-sm-3.col-xs-3
|
||||
.col-sm-3.col-xs-6
|
||||
= render "big_statistic",
|
||||
icon: "archive", subtitle: "Withdrawn", value: @total_withdrawn, delta: @new_withdrawn
|
||||
|
||||
|
|
@ -29,8 +29,20 @@
|
|||
= render 'line_chart',
|
||||
title: 'Submissions per week', data: @submissions
|
||||
.col-md-4
|
||||
-# = render 'todo_list',
|
||||
-# conference_progress: @conference_progress, conference: @conference
|
||||
- unless @conference.ended?
|
||||
= render 'todo_list',
|
||||
conference_progress: @conference_todo_list, conference: @conference
|
||||
- else
|
||||
.list-group
|
||||
.list-group-item
|
||||
%h4
|
||||
Conference Progress
|
||||
.progress
|
||||
.progress-bar{ role: 'progressbar', 'aria-valuenow': 100,
|
||||
'aria-valuemin': 0, 'aria-valuemax': 100,
|
||||
style: 'width: 100%;' }
|
||||
Conference Complete!
|
||||
|
||||
.row#tickets
|
||||
.col-md-8
|
||||
= render 'line_chart',
|
||||
|
|
@ -43,14 +55,15 @@
|
|||
%a{ href: '#distribution_all', 'data-toggle' => 'tab' }
|
||||
%span.fa.fa-star
|
||||
All
|
||||
%li
|
||||
%a{ href: '#distribution_confirmed', 'data-toggle' => 'tab' }
|
||||
%span.fa.fa-comment
|
||||
Confirmed
|
||||
%li
|
||||
%a{ href: '#distribution_withdrawn', 'data-toggle' => 'tab' }
|
||||
%span.fa.fa-archive
|
||||
Withdrawn
|
||||
-# TODO-SNAP: Disabled for Snap!Con
|
||||
%li
|
||||
%a{ href: '#distribution_confirmed', 'data-toggle' => 'tab' }
|
||||
%span.fa.fa-comment
|
||||
Confirmed
|
||||
%li
|
||||
%a{ href: '#distribution_withdrawn', 'data-toggle' => 'tab' }
|
||||
%span.fa.fa-archive
|
||||
Withdrawn
|
||||
.tab-content
|
||||
.tab-pane.active#distribution_all
|
||||
.row
|
||||
|
|
@ -58,33 +71,33 @@
|
|||
= render 'donut_chart', title: 'Event types',
|
||||
combined_data: @event_type_distribution
|
||||
.col-md-4
|
||||
-# = render 'donut_chart', title: 'Difficulty levels',
|
||||
-# combined_data: @difficulty_levels_distribution
|
||||
= render 'donut_chart', title: 'Difficulty levels',
|
||||
combined_data: @difficulty_levels_distribution
|
||||
.col-md-4
|
||||
-# = render 'donut_chart', title: 'Tracks',
|
||||
-# combined_data: @tracks_distribution
|
||||
.tab-pane#distribution_confirmed
|
||||
.row
|
||||
.col-md-4
|
||||
-# = render 'donut_chart', title: 'Event types',
|
||||
-# combined_data: @event_type_distribution_confirmed
|
||||
.col-md-4
|
||||
-# = render 'donut_chart', title: 'Difficulty levels',
|
||||
-# combined_data: @difficulty_levels_distribution_confirmed
|
||||
.col-md-4
|
||||
-# = render 'donut_chart', title: 'Tracks',
|
||||
-# combined_data: @tracks_distribution_confirmed
|
||||
.tab-pane#distribution_withdrawn
|
||||
= render 'donut_chart', title: 'Tracks',
|
||||
combined_data: @tracks_distribution
|
||||
-# .tab-pane#distribution_withdrawn
|
||||
.row
|
||||
.col-md-4
|
||||
= render 'donut_chart', title: 'Event types',
|
||||
combined_data: @event_type_distribution_withdrawn
|
||||
.col-md-4
|
||||
= render 'donut_chart', title: 'Difficulty levels',
|
||||
combined_data: @difficulty_levels_distribution_withdrawn
|
||||
combined_data: @difficulty_levels_distribution
|
||||
.col-md-4
|
||||
= render 'donut_chart', title: 'Tracks',
|
||||
combined_data: @tracks_distribution_withdrawn
|
||||
combined_data: @tracks_distribution
|
||||
-# .tab-pane#distribution_confirmed
|
||||
.row
|
||||
.col-md-4
|
||||
= render 'donut_chart', title: 'Event types',
|
||||
combined_data: @event_type_distribution_confirmed
|
||||
.col-md-4
|
||||
= render 'donut_chart', title: 'Difficulty levels',
|
||||
combined_data: @difficulty_levels_distribution_confirmed
|
||||
.col-md-4
|
||||
= render 'donut_chart', title: 'Tracks',
|
||||
combined_data: @tracks_distribution_confirmed
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
= f.input :description, as: :text, hint: markdown_hint, input_html: { rows: 5, data: { provide: 'markdown-editable' } }
|
||||
= f.input :minimum_abstract_length, input_html: {size: 3}
|
||||
= f.input :maximum_abstract_length, input_html: {size: 3}
|
||||
= f.input :submission_instructions, as: :text, hint: markdown_hint, input_html: { rows: 5, data: { provide: 'markdown-editable' } }
|
||||
= f.input :color, input_html: { size: 6, type: 'color' }
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
%thead
|
||||
%th Title
|
||||
%th Description
|
||||
%th Instructions
|
||||
%th Length
|
||||
%th Abstract Length
|
||||
%th Color
|
||||
|
|
@ -21,6 +22,8 @@
|
|||
= event_type.title
|
||||
%td
|
||||
= markdown(event_type.description)
|
||||
%td
|
||||
= markdown(event_type.submission_instructions)
|
||||
%td
|
||||
= event_type.length
|
||||
Minutes
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
.row
|
||||
.col-md-12
|
||||
= f.input :title
|
||||
= f.input :title, input_html: { autofocus: true }
|
||||
= f.input :mandatory
|
||||
.survey-possible-answers{ class: @survey_question.choice? ? '' : 'hidden' }
|
||||
= f.input :possible_answers, hint: 'Comma separated', input_html: { rows: 3 }
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
.panel-body
|
||||
- question_replies = survey_question.survey_replies
|
||||
- if question_replies.any?
|
||||
= pie_chart question_replies.group(:text).count, library: { legend: 'bottom', plotOptions: { pie: { dataLabels: { enabled: false }, showInLegend: true } } }
|
||||
= pie_chart question_replies.group(:text).count, library: { legend: { position: 'bottom' }, plotOptions: { pie: { dataLabels: { enabled: false }, showInLegend: true } } }
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
%th{ width: '0' } Conferences Attended
|
||||
%th{ width: '50%' } Roles
|
||||
%th{ width: '0' } Actions
|
||||
%th{ style: 'display: none' } Confirmed?
|
||||
%tbody
|
||||
|
||||
:javascript
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
{
|
||||
"data": "confirmed_at",
|
||||
"render": function (data, type, row, meta) {
|
||||
console.log(meta)
|
||||
return '<input type="checkbox" class="switch-checkbox" '+
|
||||
'id="user_'+row.id+'_confirmed" '+
|
||||
'name="user_'+row.id+'_confirmed" '+
|
||||
|
|
@ -73,6 +75,11 @@
|
|||
'<a class="btn-primary" href="'+data.edit_url+'">Edit</a>'+
|
||||
'</div>';
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "confirmed",
|
||||
"className": 'hidden',
|
||||
"render": false
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@
|
|||
.tab-content
|
||||
#user-info-content.tab-pane{class: "#{'active' unless params[:tab] == 'submissions-content'}"}
|
||||
- if can? :edit, @user
|
||||
.pull-right
|
||||
.pull-right.btn-group
|
||||
= link_to 'Edit', edit_admin_user_path(@user), class: 'btn btn-primary'
|
||||
= link_to 'Delete', admin_user_path(@user),method: :delete, class: 'btn btn-danger',
|
||||
data: {confirm: "Are you sure?"}
|
||||
%table.table
|
||||
- @show_attributes.each do |attr|
|
||||
%tr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue