Filtering by confirmation status
This commit is contained in:
parent
e8a575bd50
commit
0324382024
|
@ -6,6 +6,8 @@ class EventSearch
|
||||||
option(:track_id) { |scope, value| scope.where track_id: value }
|
option(:track_id) { |scope, value| scope.where track_id: value }
|
||||||
option(:event_type_id) { |scope, value| scope.where event_type_id: value }
|
option(:event_type_id) { |scope, value| scope.where event_type_id: value }
|
||||||
option(:status) { |scope, value| scope.joins(:proposition).where(propositions: {status: value}) }
|
option(:status) { |scope, value| scope.joins(:proposition).where(propositions: {status: value}) }
|
||||||
|
option(:confirmed) { |scope, value| scope.joins(:proposition).where(status: :approved).where.not(confirmed_at: nil) }
|
||||||
|
option(:not_confirmed) { |scope, value| scope.joins(:proposition).where(status: :approved, confirmed_at: nil) }
|
||||||
|
|
||||||
sort_by 'title'
|
sort_by 'title'
|
||||||
config[:defaults]['sort'] = "#{config[:sort_attributes].first} asc"
|
config[:defaults]['sort'] = "#{config[:sort_attributes].first} asc"
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
= @conference.events.joins(:proposition).approved.confirmed.count
|
= @conference.events.joins(:proposition).approved.confirmed.count
|
||||||
div
|
div
|
||||||
= t 'event_states.confirmed', count: @conference.events.joins(:proposition).approved.confirmed.count
|
= t 'event_states.confirmed', count: @conference.events.joins(:proposition).approved.confirmed.count
|
||||||
= link_to '#'
|
= link_to management_conference_events_path(@conference, filters: {confirmed: true})
|
||||||
.panel-footer.text-success
|
.panel-footer.text-success
|
||||||
span.pull-left = t 'views.conference.see_details'
|
span.pull-left = t 'views.conference.see_details'
|
||||||
span.pull-right = icon 'arrow-circle-right'
|
span.pull-right = icon 'arrow-circle-right'
|
||||||
|
|
Loading…
Reference in New Issue