Almost ready to merge

This commit is contained in:
Godwin
2015-08-18 22:18:29 -07:00
parent 9da5f6a223
commit c3aec0b71e
500 changed files with 38042 additions and 5761 deletions
+26 -35
View File
@@ -1,35 +1,26 @@
%h1 Listing workshops
%table
%tr
%th Title
%th Slug
%th Info
%th Conference
%th Workshop stream
%th Workshop presentation style
%th Min facilitators
%th Location
%th Start time
%th End time
%th
%th
- @workshops.each do |workshop|
%tr
%td= workshop.title
%td= workshop.slug
%td= workshop.info
%td= workshop.conference_id
%td= workshop.workshop_stream_id
%td= workshop.workshop_presentation_style
%td= workshop.min_facilitators
%td= workshop.location_id
%td= workshop.start_time
%td= workshop.end_time
%td= link_to 'Show', conference_workshop_path(@conference, workshop)
%td= link_to 'Edit', edit_conference_workshop_path(@conference, workshop)
%br
= link_to 'New Workshop', new_conference_workshop_path
= render 'conferences/page_header', :page_key => 'Workshops'
%article
= row do
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Workshops'
= columns(medium: 6) do
%p=_'articles.conference_registration.paragraphs.Workshops', :p
= columns(medium: 6) do
%h3=_'articles.conference_registration.headings.Your_Workshops'
%ul.workshop-previews
- @my_workshops.each do |w|
- if w.title
%li
=link_to view_workshop_path(@this_conference.slug, w.id) do
%h4=_!(w.title)
=paragraph _!(w.info)
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: :button
= row do
%ul.workshop-previews
- @workshops.each do |w|
- if w.title
%li
= columns(medium: 6) do
=link_to view_workshop_path(@this_conference.slug, w.id) do
%h4=_!(w.title)
=paragraph _!(w.info)
+44 -5
View File
@@ -1,6 +1,45 @@
- page_style :form
= render 'conferences/page_header', :page_key => (@workshop ? 'Edit_Workshop' : 'Create_Workshop')
%article
= row do
= form_tag save_workshop_path(@this_conference.slug), class: 'composition' do
= (hidden_field_tag :workshop_id, @workshop.id) if @workshop
= columns(medium: 12) do
%p=(_'articles.workshops.paragraphs.info','Please accurately describe your workshop in detail. This will help hosts decide if they wish to add it to the schedule and when it should best be scheduled. Enter normal text but if you want to get fancy you can use <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">Markdown</a>.').html_safe
.text-field.input-field.big
= label_tag :title
= text_field_tag :title, @title, :required => true
.text-area-field.input-field
= label_tag :info
= text_area_tag :info, @info, :required => true
= columns(medium: 6) do
%h3=_'articles.workshops.headings.languages','Workshop Language'
.check-box-field.input-field
- [:en, :es, :fr].each do |language|
= check_box_tag "languages[#{language}]", 1, @languages.include?(language)
= label_tag "languages_#{language}" do
= _"languages.#{language}"
%h3=_'articles.workshops.headings.theme','Theme'
%p=_'articles.workshops.paragraphs.theme', :p
.check-box-field.input-field
- [:race_gender, :mechanics, :funding, :organization, :community, :other].each do |theme|
= radio_button_tag :theme, theme, @theme == theme
= label_tag "theme_#{theme}" do
= _"workshop.options.theme.#{theme}"
= columns(medium: 6) do
%h3=_'articles.workshops.headings.needs','What do you need?'
.check-box-field.input-field
- [:sound, :projector, :tools].each do |need|
= check_box_tag "needs[#{need}]", 1, @needs.include?(need)
= label_tag "needs_#{need}" do
= _"workshop.options.needs.#{need}"
%h3=_'articles.workshops.headings.space','Type of space'
%p=_'articles.workshops.paragraphs.space', :p
.check-box-field.input-field
- [:workshop, :meeting_room, :outdoor_meeting].each do |space|
= radio_button_tag :space, space, @space == space
= label_tag "space_#{space}" do
= _"workshop.options.space.#{space}"
= columns(medium: 12) do
.actions.right
= button_tag :save, :value => :save
= tabs!
.row
= render 'form'
+16 -30
View File
@@ -1,30 +1,16 @@
%p#notice= notice
.row
.columns.medium-12
%h1= @workshop.title
= tabs!
.row
.columns.medium-4
%p
%b Workshop stream:
= @workshop.workshop_stream_id
%p
%b Workshop presentation style:
= @workshop.workshop_presentation_style
%p
%b Min facilitators:
= @workshop.min_facilitators
%p
%b Location:
= @workshop.location_id
%p
%b Start time:
= @workshop.start_time
%p
%b End time:
= @workshop.end_time
.columns.medium-8
=p @workshop, :info
= render 'conferences/page_header', :page_key => 'View_Workshop'
%article
= row do
= columns(medium: 12) do
%h2=_!@workshop.title
=paragraph _!(@workshop.info) || ''
%h3=_'articles.workshops.headings.facilitators'
.facilitators
- @workshop.workshop_facilitators.each do |f|
.facilitator
- u = User.find(f.user_id)
.name=_!(u.firstname || u.username || u.email)
.role=_"roles.workshops.facilitator.#{f.role}"
.actions
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), :class => 'button modify') if @workshop.can_edit?(current_user)
= (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), :class => 'button delete') if @workshop.can_delete?(current_user)