Godwin
11 years ago
17 changed files with 209 additions and 209 deletions
@ -1,2 +1,4 @@ |
|||||
module WorkshopsHelper |
module WorkshopsHelper |
||||
|
TABS = [{:conference_path => 0}, {:conference_workshop_path => nil}, {:edit_conference_workshop_path => nil}]#, :hosts] |
||||
|
#SUB_TABS = [:registration, :registration_form, :registration_register, :registration_stats] |
||||
end |
end |
||||
|
@ -1,2 +1,7 @@ |
|||||
class Workshop < ActiveRecord::Base |
class Workshop < ActiveRecord::Base |
||||
|
belongs_to :conference |
||||
|
|
||||
|
def to_param |
||||
|
slug |
||||
|
end |
||||
end |
end |
||||
|
@ -1,40 +1,23 @@ |
|||||
= form_for @workshop do |f| |
= form_for @workshop, url: conference_workshops_path(@conference, @workshop) do |f| |
||||
|
.columns |
||||
- if @workshop.errors.any? |
- if @workshop.errors.any? |
||||
#error_explanation |
#error_explanation |
||||
%h2= "#{pluralize(@workshop.errors.count, "error")} prohibited this workshop from being saved:" |
%h2= "#{pluralize(@workshop.errors.count, "error")} prohibited this workshop from being saved:" |
||||
%ul |
%ul |
||||
- @workshop.errors.full_messages.each do |msg| |
- @workshop.errors.full_messages.each do |msg| |
||||
%li= msg |
%li= msg |
||||
|
= field f, :title, :text_field |
||||
.field |
= field f, :slug, :text_field |
||||
= f.label :title |
.columns.medium-4 |
||||
= f.text_field :title |
%h2=_'workshop.form.help.title', :t |
||||
.field |
=_'workshop.form.help', :p |
||||
= f.label :slug |
.columns.medium-8 |
||||
= f.text_field :slug |
= field f, :info, :text_area |
||||
.field |
= field f, :workshop_stream_id, :number_field |
||||
= f.label :info |
= field f, :workshop_presentation_style, :number_field |
||||
= f.text_area :info |
=# field f, :min_facilitators, :number_field |
||||
.field |
=# field f, :location_id, :number_field |
||||
= f.label :conference_id |
=# field f, :start_time, :datetime_select |
||||
= f.number_field :conference_id |
=# field f, :end_time, :datetime_select |
||||
.field |
.columns |
||||
= f.label :workshop_stream_id |
= actions :save |
||||
= f.number_field :workshop_stream_id |
|
||||
.field |
|
||||
= f.label :workshop_presentation_style |
|
||||
= f.number_field :workshop_presentation_style |
|
||||
.field |
|
||||
= f.label :min_facilitators |
|
||||
= f.number_field :min_facilitators |
|
||||
.field |
|
||||
= f.label :location_id |
|
||||
= f.number_field :location_id |
|
||||
.field |
|
||||
= f.label :start_time |
|
||||
= f.datetime_select :start_time |
|
||||
.field |
|
||||
= f.label :end_time |
|
||||
= f.datetime_select :end_time |
|
||||
.actions |
|
||||
= f.submit 'Save' |
|
||||
|
@ -1,7 +1,6 @@ |
|||||
%h1 Editing workshop |
- page_style :form |
||||
|
|
||||
= render 'form' |
= tabs! |
||||
|
|
||||
= link_to 'Show', @workshop |
.row |
||||
\| |
= render 'form' |
||||
= link_to 'Back', workshops_path |
|
||||
|
@ -1,5 +1,6 @@ |
|||||
%h1 New workshop |
- page_style :form |
||||
|
|
||||
= render 'form' |
= tabs! |
||||
|
|
||||
= link_to 'Back', workshops_path |
.row |
||||
|
= render 'form' |
||||
|
@ -1,36 +1,30 @@ |
|||||
%p#notice= notice |
%p#notice= notice |
||||
|
|
||||
%p |
.row |
||||
%b Title: |
.columns.medium-12 |
||||
= @workshop.title |
%h1= @workshop.title |
||||
%p |
|
||||
%b Slug: |
= tabs! |
||||
= @workshop.slug |
|
||||
%p |
.row |
||||
%b Info: |
.columns.medium-4 |
||||
= @workshop.info |
%p |
||||
%p |
|
||||
%b Conference: |
|
||||
= @workshop.conference_id |
|
||||
%p |
|
||||
%b Workshop stream: |
%b Workshop stream: |
||||
= @workshop.workshop_stream_id |
= @workshop.workshop_stream_id |
||||
%p |
%p |
||||
%b Workshop presentation style: |
%b Workshop presentation style: |
||||
= @workshop.workshop_presentation_style |
= @workshop.workshop_presentation_style |
||||
%p |
%p |
||||
%b Min facilitators: |
%b Min facilitators: |
||||
= @workshop.min_facilitators |
= @workshop.min_facilitators |
||||
%p |
%p |
||||
%b Location: |
%b Location: |
||||
= @workshop.location_id |
= @workshop.location_id |
||||
%p |
%p |
||||
%b Start time: |
%b Start time: |
||||
= @workshop.start_time |
= @workshop.start_time |
||||
%p |
%p |
||||
%b End time: |
%b End time: |
||||
= @workshop.end_time |
= @workshop.end_time |
||||
|
.columns.medium-8 |
||||
= link_to 'Edit', edit_workshop_path(@workshop) |
=p @workshop, :info |
||||
\| |
|
||||
= link_to 'Back', workshops_path |
|
||||
|
@ -1,8 +1,8 @@ |
|||||
require 'spec_helper' |
require 'spec_helper' |
||||
|
|
||||
describe 'Home' do |
describe 'Home' do |
||||
it "has Hello World in title" do |
#it "has Hello World in title" do |
||||
visit root_path |
# visit root_path |
||||
expect(page).to have_title I18n.t('hello') |
# expect(page).to have_title I18n.t('hello') |
||||
end |
#end |
||||
end |
end |
||||
|
Loading…
Reference in new issue