Fixes to conference creation process
This commit is contained in:
parent
4ffbe5e68f
commit
ea981aa0c9
|
@ -11,9 +11,13 @@ module Management
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@conference = Conference.new conference_params
|
@conference = Conference.new conference_params
|
||||||
@conference.save
|
|
||||||
|
if @conference.save
|
||||||
|
redirect_to [:management, @conference]
|
||||||
|
else
|
||||||
render :new
|
render :new
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@conference.update conference_params
|
@conference.update conference_params
|
||||||
|
|
|
@ -22,7 +22,9 @@ nav.navbar.navbar-static-top.navbar-inverse role="navigation"
|
||||||
li class="#{'active' if controller_name == 'sessions'}"
|
li class="#{'active' if controller_name == 'sessions'}"
|
||||||
= link_to management_users_path do
|
= link_to management_users_path do
|
||||||
=> icon 'user', User.model_name.human(count: 2).mb_chars.capitalize, class: 'fa-fw'
|
=> icon 'user', User.model_name.human(count: 2).mb_chars.capitalize, class: 'fa-fw'
|
||||||
- if @conference.present?
|
|
||||||
|
-# TODO Instead of this, provide a generic `yield :navigation`?
|
||||||
|
- if @conference.present? and @conference.persisted?
|
||||||
li class="#{'active' if controller_name == 'events'}"
|
li class="#{'active' if controller_name == 'events'}"
|
||||||
= link_to management_conference_events_path(@conference) do
|
= link_to management_conference_events_path(@conference) do
|
||||||
=> icon 'file-text', Event.model_name.human(count: 2).mb_chars.capitalize, class: 'fa-fw'
|
=> icon 'file-text', Event.model_name.human(count: 2).mb_chars.capitalize, class: 'fa-fw'
|
||||||
|
@ -32,6 +34,7 @@ nav.navbar.navbar-static-top.navbar-inverse role="navigation"
|
||||||
li class="#{'active' if controller_name == 'volunteerships'}"
|
li class="#{'active' if controller_name == 'volunteerships'}"
|
||||||
= link_to '#' do
|
= link_to '#' do
|
||||||
=> icon 'hand-o-up', t('activerecord.models.volunteership', count: 2).mb_chars.capitalize, class: 'fa-fw'
|
=> icon 'hand-o-up', t('activerecord.models.volunteership', count: 2).mb_chars.capitalize, class: 'fa-fw'
|
||||||
|
|
||||||
ul.nav.navbar-nav.navbar-right
|
ul.nav.navbar-nav.navbar-right
|
||||||
li.dropdown
|
li.dropdown
|
||||||
= link_to '#', class: 'dropdown-toggle', data: {toggle: 'dropdown'} do
|
= link_to '#', class: 'dropdown-toggle', data: {toggle: 'dropdown'} do
|
||||||
|
|
Loading…
Reference in New Issue