Created
July 9, 2012 17:45
-
-
Save joshskeen/3077841 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{:style => "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! | |
-unless @errors.nil? | |
%div.label.label-important=@errors | |
%h3 new todo item: | |
= render :partial => 'items/haml/form' | |
%div.span7 | |
%h4 index.haml | |
%h4 form.haml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment