Sha256: f6f657d85bc673660fae53d2ceb34d81368f15fc3947607d8c6b3444574952e4
Contents?: true
Size: 1.72 KB
Versions: 17
Compression:
Stored size: 1.72 KB
Contents
<div class="container"> <center> <h1>Journal</h1> <br> <%= form_tag({:action => 'index'}, {:method => :get, :class => 'form-inline'}) do%> <div class="form-group"> Per page: <%= select_tag :limit, options_for_select([25, 100, 200, 300], selected: params[:limit]), class: 'form-control' %> Order: <%= select_tag :order, options_for_select(['descending', 'ascending'], selected: params[:order]), class: 'form-control' %> </div> <button type="submit" class="btn btn-default">Refresh</button> <% end %> </center> <table class="table table-striped table-hover"> <thead> <tr> <th>Description</th> <th>Debits</th> <th>Credits</th> <th>Date</th> </tr> </thead> <tbody> <% @entries.each do |entry| %> <tr class="<%= cycle("even", "odd") -%>"> <td><%=h entry.description %></td> <td></td> <td></td> <td><%=h entry.created_at %></td> </tr> <% entry.debit_amounts.each do |debit_amount| %> <tr class="<%= cycle("odd", "odd") -%>"> <td> <%=h "#{debit_amount.account.name}" %></td> <td><%=h debit_amount.amount.round(2) %></td> <td></td> <td></td> </tr> <% end %> <% entry.credit_amounts.each do |credit_amount| %> <tr class="<%= cycle("odd", "odd") -%>"> <td> <%=h "#{credit_amount.account.name}" %></td> <td></td> <td><%=h credit_amount.amount.round(2) %></td> <td></td> </tr> <% end %> <tr class="<%= cycle("odd", "odd") -%>"> <td></td> <td></td> <td></td> <td></td> </tr> <% end %> </tbody> </table> <%= paginate @entries %> </div>
Version data entries
17 entries across 17 versions & 5 rubygems