Created
June 1, 2012 19:41
-
-
Save dpaola2/2854701 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<table class="table table-striped"> | |
<thead> | |
<th width="80px;">Action</th> | |
<th>Task Details</th> | |
<th>Due</th> | |
<th>Status</th> | |
<th>Assignee</th> | |
</thead> | |
<% @tasks.each do |task| %> | |
<tr> | |
<td> | |
<% unless task.status == false %> | |
<%= link_to raw("<i class='icon-check'></i>"), completed_task_path(task), :method => :put, confirm: "Mark Task Complete?", class: "btn btn-success" %> <%= link_to raw("<i class='ico\ | |
n-edit'></i>"), edit_task_path(task), class: "btn" %> | |
<% else %> | |
<center><%= link_to raw("<i class='icon-trash'></i>"), task, method: :delete, confirm: "You super sure?", class: "btn btn-danger" %></center> | |
<% end %> | |
</td> | |
<td> | |
<strong><%= task.title %></strong><br /> | |
<%= task.description %> | |
</td> | |
<td><%= task.datetime.strftime("%b %d, %Y") %></td> | |
<td> | |
<%= if task.datetime < Date.today && task.status == true | |
raw("<span style='color:red;'>Overdue!</span>") | |
elsif task.status == true | |
"Active" | |
elsif task.status == false | |
raw("<span style='color:green'>Completed</span>") | |
end %> | |
</td> | |
<td> | |
<%= form_for(task) do |f| %> | |
<%= f.select :user_id, @users.map { |user| [user.email, user.id]}, class: "row4" %> | |
<% end %> | |
</td> | |
</tr> | |
<% end %> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment