scsslint, flash styling, new parent start
This commit is contained in:
@ -1,18 +1,10 @@
|
||||
- unless flash.empty?
|
||||
- if flash[:notice].present?
|
||||
.container{'data-id' => 'alertbox', 'data-alert' => 'auto-close'}
|
||||
.row
|
||||
.col-md-6.col-md-offset-3.col-xs-12
|
||||
.alertbox
|
||||
.alertbox.box_blue
|
||||
.box_close{'data-id'=> 'alert-close'}
|
||||
= flash[:notice]
|
||||
.alertbox.box-blue{'data-id' => 'alertbox', 'data-alert' => 'auto_close'}
|
||||
.box-close{'data-id'=> 'alert_close'}
|
||||
= flash[:notice]
|
||||
|
||||
- if flash[:alert].present?
|
||||
.container{'data-id' => 'alertbox'}
|
||||
.row
|
||||
.col-md-6.col-md-offset-3.col-xs-12
|
||||
.alertbox
|
||||
.alertbox.box_red
|
||||
.box_close{'data-id'=> 'alert-close'}
|
||||
%b= flash[:alert]
|
||||
.alertbox.box-red{'data-id' => 'alertbox'}
|
||||
.box-close{'data-id'=> 'alert_close'}
|
||||
%b= flash[:alert]
|
||||
|
@ -8,9 +8,9 @@
|
||||
= csrf_meta_tags
|
||||
= yield :custom_head
|
||||
%body
|
||||
= render partial: 'layouts/alerts'
|
||||
= render partial: 'layouts/navigation'
|
||||
= render partial: 'sub_nav'
|
||||
= render partial: 'layouts/alerts'
|
||||
= yield
|
||||
= render partial: 'layouts/footer'
|
||||
= yield :modals
|
||||
|
@ -1,2 +1,4 @@
|
||||
%ul.sub-nav
|
||||
%li= link_to 'List', list_parents_path
|
||||
%li= link_to 'New', new_parent_path
|
||||
|
||||
|
25
app/views/parents/new.html.haml
Normal file
25
app/views/parents/new.html.haml
Normal file
@ -0,0 +1,25 @@
|
||||
%h2 Add a New Parent
|
||||
|
||||
= form_for :parent do |f|
|
||||
= f.label :first_name
|
||||
= f.text_field :first_name
|
||||
|
||||
= f.label :last_name
|
||||
= f.text_field :last_name
|
||||
|
||||
= f.label :phone
|
||||
= f.phone_field :phone
|
||||
|
||||
= f.label :email
|
||||
= f.email_field :email
|
||||
|
||||
%h3 Children:
|
||||
|
||||
= fields_for :child do |child|
|
||||
= child.label :first_name
|
||||
= child.text_field :first_name
|
||||
|
||||
= child.label :last_name
|
||||
= child.text_field :last_name
|
||||
|
||||
= f.submit
|
2
app/views/parents/show.html.haml
Normal file
2
app/views/parents/show.html.haml
Normal file
@ -0,0 +1,2 @@
|
||||
%h2 Parent
|
||||
= raw(ap @parent)
|
Reference in New Issue
Block a user