Created
July 8, 2012 19:58
-
-
Save joshskeen/3072573 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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