-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track request acceptance and activation #1597
Changes from all commits
06ecc87
5774d09
76908ff
7566b9c
4d6ec29
a1182dd
c2fa843
cdd7f61
3756eed
4a29252
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
$(function () { | ||
$(document).ready(function() { | ||
$('.datatable').DataTable({ | ||
// ajax: ..., | ||
stateSave: true, | ||
autoWidth: false, | ||
pagingType: 'full_numbers', | ||
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]] | ||
}); | ||
$('.datatable').DataTable({ | ||
// ajax: ..., | ||
stateSave: true, | ||
autoWidth: false, | ||
pagingType: 'full_numbers', | ||
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]], | ||
}); | ||
|
||
$('#versionstable').DataTable({ | ||
pagingType: 'full_numbers', | ||
order: [[ 0, 'desc' ]] | ||
}); | ||
$('#versionstable').DataTable({ | ||
pagingType: 'full_numbers', | ||
order: [[ 0, 'desc' ]] | ||
}); | ||
}); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,12 @@ def canceled_replacement_event_label(event, event_schedule, *label_classes) | |
content_tag :span, 'REPLACEMENT', class: (['label', 'label-info'] + label_classes) | ||
end | ||
end | ||
|
||
def track_selector_input(form) | ||
if @program.tracks.any? | ||
form.input :track_id, as: :select, | ||
collection: @program.tracks.where(state: 'confirmed', cfp_active: true).pluck(:name, :id), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why aren't you using the scopes here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't have the scopes when I initially wrote that code, and then I forgot about it |
||
include_blank: true | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,16 @@ def signed_in(user) | |
can :manage, Commercial, commercialable_type: 'Event', commercialable_id: user.events.pluck(:id) | ||
|
||
can [:destroy], Openid | ||
|
||
can [:new, :create], Track do |track| | ||
track.new_record? && track.program.cfps.for_tracks.try(:open?) | ||
end | ||
|
||
can [:index, :show, :restart, :confirm, :withdraw], Track, submitter_id: user.id | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should be able to access show action of confirmed tracks, to get their details. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can find the details of the track in admin/Tracks#show There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The users can see the name and description of every confirmed track included in the cfp in the conference's splashpage There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also show them then the room and the dates of the track, when available. |
||
|
||
can [:edit, :update], Track do |track| | ||
user == track.submitter && !(track.accepted? || track.confirmed?) | ||
end | ||
end | ||
|
||
# Abilities for users with roles wandering around in non-admin views. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure we need the tracks to have cfp_active, so that we are able to move events from one track to another during evaluation period.
Let's look into that later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #1631