Skip to content

Instantly share code, notes, and snippets.

@joshskeen
Created July 8, 2012 19:58
Show Gist options
  • Save joshskeen/3072573 to your computer and use it in GitHub Desktop.
Save joshskeen/3072573 to your computer and use it in GitHub Desktop.
div.row
div.span5
h2 todo list:
-unless @items.empty?
div
table.table-striped.table-condensed.table-bordered width=470
tr
th name
th description
th actions
-for item in @items do
tr class=(item.complete == true ? 'completed' : 'incomplete')
td=item.name
td=item.description
td
=(link_to item.complete == false ? 'complete' : 'reopen', {:action => "complete",:id => item.id, :controller => :items}, :class => "btn")
=(link_to 'delete', item,
:data => {:confirm => "are you sure you want to delete \"#{item.name}\""},
:method => :delete,
:class => "btn")
-else
p
| no todo items found! Add one!!
-unless @errors.nil?
div.label.label-important= @errors
h3 new todo item:
= render partial: 'form'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment