talbe layout

This commit is contained in:
Tyler Renelle 2012-02-01 11:04:52 -05:00
parent 12e9a05334
commit f8b48aa757
2 changed files with 26 additions and 23 deletions

View file

@ -6,4 +6,4 @@
.iffy { background-color:rgb(246, 178, 107); }
.ok { background-color:rgb(255, 217, 102); }
.good { background-color:rgb(147, 196, 125); }
.done { background-color:rgb(201, 218, 248); }
.done { background-color:rgb(201, 218, 248); }

View file

@ -1,24 +1,27 @@
<!-- <%= javascript_tag do %>
$("#habits").bind("ajax:complete", function(et, e){
$("#products-list").html(e.responseText); // insert content
});
<% end %> -->
<h2>Habits</h2>
<ul id="habits">
<% @habits.each do |habit| %>
<li><%= render :partial => "habit", :locals => { :habit => habit } %></li>
<% end %>
</ul>
<h2>ToDos</h2>
<ul id="todos">
<% @todos.each do |habit| %>
<li><%= render :partial => "habit", :locals => { :habit => habit } %></li>
<% end %>
</ul>
<br />
<%= link_to 'New Habit', new_habit_path %>
<table>
<tr><td>
<div id="habits">
<h2>Habits</h2>
<ul>
<% @habits.each do |habit| %>
<li><%= render :partial => "habit", :locals => { :habit => habit } %></li>
<% end %>
</ul>
</div>
</td>
<td>
<div id="daily">
<h2>Daily</h2>
<ul>
<% @todos.each do |habit| %>
<li><%= render :partial => "habit", :locals => { :habit => habit } %></li>
<% end %>
</ul>
</div>
</td></tr>
</table>