styling it up

This commit is contained in:
2015-10-04 20:27:03 -05:00
parent 1e3917ada0
commit 63d4063392
18 changed files with 125 additions and 38 deletions

View File

@ -1,5 +1,6 @@
%h2 Edit #{@child.name}
%p= link_to 'back', child_path(@child)
%ul.sub-nav
%li= link_to 'back', :back
= render partial: 'form'

View File

@ -1,12 +1,15 @@
%h1 Children
- @children.each do |child|
%ul
%ul.index
%li
= link_to child.name, child_path(child)
= link_to 'edit', edit_child_path(child)
%ul
- child.parents.each do |parent|
%li
= link_to parent.name, parent_path(parent)
= page_link(parent)
= edit_btn(edit_child_path(child))
- unless child.parents.empty?
%li Parents:
%ul
- child.parents.each do |parent|
%li
= link_to parent.name, parent_path(parent)
= page_link(parent)

View File

@ -1,3 +1,6 @@
%h2 Add a New Child
%ul.sub-nav
%li= link_to 'back', :back
= render partial: 'form'

View File

@ -1,5 +1,8 @@
%h2= @child.name
%p= link_to 'edit', edit_child_path(@child)
%ul.sub-nav
%li= link_to 'back', :back
%li= link_to 'edit', edit_child_path(@child)
- unless @child.parents.empty?
%p Parents:

View File

@ -2,6 +2,6 @@
%li{ class: active_controller('docs') }= link_to 'Home', root_path
%li{ class: active_controller('parents') }= link_to 'Parents', list_parents_path
%li{ class: active_controller('children') }= link_to 'Children', list_children_path
%li{ class: active_controller('pages') }= link_to 'Pages', list_pages_path
%li{ class: active_controller('staff') }= link_to 'Staff', list_staff_path
%li{ class: active_controller('users') }= link_to 'Users', list_users_path
%li{ class: active_controller('pages') }= link_to 'Pages', list_pages_path

View File

@ -1,6 +1,7 @@
%h2 Edit #{@parent.name}
%p= link_to 'back', parent_path(@parent)
%ul.sub-nav
%li= link_to 'back', :back
- if @parent.errors.full_messages.any?
.errors

View File

@ -1,13 +1,19 @@
%h1 Parents
- @parents.each do |parent|
%ul
%li= link_to parent.name, parent_path(parent)
%ul.index
%li.name
= link_to parent.name, parent_path(parent)
= edit_btn(edit_parent_path(parent))
%li
= number_to_phone parent.phone
= page_link(parent)
%li= mail_to parent.email, nil, encode: 'hex'
%li Children:
%ul
- parent.children.each do |child|
%li= link_to child.name, child_path(child)
- if parent.email.present?
%li= mail_to parent.email, nil, encode: 'hex'
- unless parent.children.empty?
%li Children:
%ul
- parent.children.each do |child|
%li= link_to child.name, child_path(child)

View File

@ -1,5 +1,8 @@
%h2 Add a New Parent
%ul.sub-nav
%li= link_to 'back', :back
- if @parent.errors.full_messages.any?
.errors
%h1 Uh oh!

View File

@ -1,5 +1,9 @@
%h2= @parent.name
%p= link_to 'edit', edit_parent_path(@parent)
%ul.sub-nav
%li= link_to 'back', :back
%li= link_to 'edit', edit_parent_path(@parent)
%p Email: #{mail_to(@parent.email, nil, encode: 'hex')}
%p Phone: #{number_to_phone @parent.phone} #{page_link(@parent)}