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>&nbsp;&nbsp;&nbsp;&nbsp;<%=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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=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

Version Path
borutus-1.0.0 app/views/borutus/entries/index.html.erb
plutus-0.17 app/views/plutus/entries/index.html.erb
plutus-0.16 app/views/plutus/entries/index.html.erb
plutus-0.15 app/views/plutus/entries/index.html.erb
plutus-0.14 app/views/plutus/entries/index.html.erb
borutus-0.2.4 app/views/borutus/entries/index.html.erb
borutus-0.2.3 app/views/borutus/entries/index.html.erb
borutus-0.2.2 app/views/borutus/entries/index.html.erb
tyche-0.14 app/views/plutus/entries/index.html.erb
credere-0.10.3 app/views/credere/entries/index.html.erb
credere-0.10.2 app/views/credere/entries/index.html.erb
credere-0.10.1 app/views/credere/entries/index.html.erb
borutus-0.2.1 app/views/borutus/entries/index.html.erb
borutus-0.2.0 app/views/borutus/entries/index.html.erb
odania_plutus-0.13 app/views/plutus/entries/index.html.erb
borutus-0.1.0 app/views/borutus/entries/index.html.erb
plutus-0.13 app/views/plutus/entries/index.html.erb