Initial work on propositions, filter events correctly
This commit is contained in:
parent
c6750d3a1a
commit
1bec127503
5
TODO
5
TODO
|
@ -7,12 +7,13 @@
|
|||
- # Create a conference, halls, tracks
|
||||
- # Starting a CFP
|
||||
- # conferences#show -> admin dashboard
|
||||
- proposals#index -> grouped by user
|
||||
- volunteers#index -> approved volunteers
|
||||
- # events#index -> approved events
|
||||
- sponsorships#index -> generate token, links to send around
|
||||
- scheduling -> calendar with events
|
||||
|
||||
- proposals#index -> undecided events, grouped by user
|
||||
- events#index -> approved events
|
||||
|
||||
- users:
|
||||
- # edit profile: image upload and stuff
|
||||
- # show profile
|
||||
|
|
|
@ -3,7 +3,7 @@ module Management
|
|||
def index
|
||||
@conference = find_conference
|
||||
# TODO (2015-07-14) Scoped by conference? Why no conference_id
|
||||
@events = Event.all
|
||||
@events = Event.approved
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
module Management
|
||||
# TODO (2015-07-19) Group by user
|
||||
class PropositionsController < ManagementController
|
||||
def index
|
||||
@conference = find_conference
|
||||
@proposed_events = Event.undecided
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_conference
|
||||
Conference.find(params[:conference_id])
|
||||
end
|
||||
end
|
||||
end
|
|
@ -26,6 +26,9 @@ nav.navbar.navbar-static-top.navbar-inverse role="navigation"
|
|||
li class="#{'active' if controller_name == 'volunteerships'}"
|
||||
= link_to '#' do
|
||||
=> icon 'hand-o-up', t('activerecord.models.volunteership', count: 2).mb_chars.capitalize, class: 'fa-fw'
|
||||
li class="#{'active' if controller_name == 'propositions'}"
|
||||
= link_to [:management, current_conference, :propositions] do
|
||||
=> icon 'question', Proposition.model_name.human(count: 2).mb_chars.capitalize, class: 'fa-fw'
|
||||
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
li.dropdown
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
.row
|
||||
.col-lg-12
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
h2.panel-title= Event.model_name.human(count: 2).mb_chars.capitalize
|
||||
|
||||
.panel-body
|
||||
table.table.table-striped.table-hover.record-table
|
||||
thead
|
||||
tr
|
||||
th = Event.human_attribute_name :title
|
||||
th = Event.human_attribute_name :subtitle
|
||||
th = Event.human_attribute_name :length
|
||||
th = Event.human_attribute_name :language
|
||||
th.actions
|
||||
tbody
|
||||
- @proposed_events.each do |event|
|
||||
tr
|
||||
td= event.title
|
||||
td= event.subtitle
|
||||
td #{event.length} minutes
|
||||
td= event.language
|
||||
|
||||
td.actions
|
||||
div.btn-group.btn-group-sm
|
||||
= action_buttons(@conference, event, [:show, :edit, :destroy])
|
|
@ -76,6 +76,9 @@ bg:
|
|||
one: Уъркшоп
|
||||
other: Уъркшопи
|
||||
event:
|
||||
one: Събитие
|
||||
other: Събития
|
||||
proposition:
|
||||
one: Предложение
|
||||
other: Предложения
|
||||
track:
|
||||
|
|
|
@ -7,6 +7,7 @@ Rails.application.routes.draw do
|
|||
resources :conferences do
|
||||
resources :events
|
||||
resources :volunteers
|
||||
resources :propositions
|
||||
resources :sponsorship_offers
|
||||
resource :call_for_participation, only: [:create, :destroy]
|
||||
|
||||
|
|
Loading…
Reference in New Issue