Skip to content

Commit

Permalink
added twitter bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
ecavazos committed Mar 18, 2012
1 parent 5f92adb commit 8d70cf8
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 20 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
//= require jquery
//= require jquery_ujs
//= require_tree .
//
//= require bootstrap.min
5 changes: 5 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
*
*= require_self
*= require_tree .
*
*= require bootstrap.min
*= require bootstrap-responsive.min
*/

body { padding-top: 60px }
17 changes: 14 additions & 3 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@

%body

- if flash.notice
#notice= flash.notice
.navbar.navbar-fixed-top
.navbar-inner
.container
= link_to 'SuperZombies', root_path, :class => 'brand'

= yield
.container

%section#gridSystem
.page-header
%h1= yield :title

- if flash.notice
#notice= flash.notice

= yield

3 changes: 2 additions & 1 deletion app/views/welcome/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
%h1 Welcome to the Super Zombies website
- content_for :title do
Welcome to the Super Zombies website

39 changes: 23 additions & 16 deletions app/views/zombies/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
= form_for @zombie do |f|
- content_for :title do
Zombie Create

- if @zombie.errors.any?
#errors
- @zombie.errors.full_messages.each do |message|
.error= message
.row
.span12

.row
= f.label :name
= f.text_field :name
= form_for @zombie, :html => { :class => 'form-horizontal' } do |f|

.row
= f.label :gender
= f.text_field :gender
- if @zombie.errors.any?
.alert.alert-error
%ul#errors
- @zombie.errors.full_messages.each do |message|
%li.error= message

.row
= f.label :age
= f.text_field :age
.control-group
= f.label :name, :class => 'control-label'
.controls= f.text_field :name

.row
= f.submit 'Unleash Carnage'
.control-group
= f.label :gender, :class => 'control-label'
.controls= f.text_field :gender

.control-group
= f.label :age, :class => 'control-label'
.controls= f.text_field :age

.form-actions
= f.submit 'Unleash Carnage', :class => 'btn, btn-primary'
3 changes: 3 additions & 0 deletions app/views/zombies/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- content_for :title do
Zombie Details

#details

#name
Expand Down
2 changes: 2 additions & 0 deletions spec/requests/zombies/create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
it 'should allow users to create zombies' do
visit new_zombie_path

find('h1').should have_content('Zombie Create')

Zombie.count.should == 0

within '#new_zombie' do
Expand Down
2 changes: 2 additions & 0 deletions spec/requests/zombies/show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

visit zombie_path(zombie)

find('h1').should have_content('Zombie Details')

within '#details' do
find('#name' ).should have_content('Name: Meehhrrrr')
find('#gender').should have_content('Gender: Female')
Expand Down

0 comments on commit 8d70cf8

Please sign in to comment.