The working basics

This commit is contained in:
Godwin
2014-03-09 14:43:33 -06:00
parent b490a97852
commit db60933506
628 changed files with 81918 additions and 1060 deletions
@@ -0,0 +1,19 @@
= form_for @workshop_resource do |f|
- if @workshop_resource.errors.any?
#error_explanation
%h2= "#{pluralize(@workshop_resource.errors.count, "error")} prohibited this workshop_resource from being saved:"
%ul
- @workshop_resource.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :name
= f.text_field :name
.field
= f.label :slug
= f.text_field :slug
.field
= f.label :info
= f.text_field :info
.actions
= f.submit 'Save'
@@ -0,0 +1,7 @@
%h1 Editing workshop_resource
= render 'form'
= link_to 'Show', @workshop_resource
\|
= link_to 'Back', workshop_resources_path
@@ -0,0 +1,23 @@
%h1 Listing workshop_resources
%table
%tr
%th Name
%th Slug
%th Info
%th
%th
%th
- @workshop_resources.each do |workshop_resource|
%tr
%td= workshop_resource.name
%td= workshop_resource.slug
%td= workshop_resource.info
%td= link_to 'Show', workshop_resource
%td= link_to 'Edit', edit_workshop_resource_path(workshop_resource)
%td= link_to 'Destroy', workshop_resource, :method => :delete, :data => { :confirm => 'Are you sure?' }
%br
= link_to 'New Workshop resource', new_workshop_resource_path
@@ -0,0 +1,5 @@
%h1 New workshop_resource
= render 'form'
= link_to 'Back', workshop_resources_path
@@ -0,0 +1,15 @@
%p#notice= notice
%p
%b Name:
= @workshop_resource.name
%p
%b Slug:
= @workshop_resource.slug
%p
%b Info:
= @workshop_resource.info
= link_to 'Edit', edit_workshop_resource_path(@workshop_resource)
\|
= link_to 'Back', workshop_resources_path