Sha256: b1bc68a8daf70399e9d79ee61e54cfeda811a7b5e59f4fe54d5f579a1ffc749a

Contents?: true

Size: 1.65 KB

Versions: 4

Compression:

Stored size: 1.65 KB

Contents

<% table_rows.each_with_index do |(day, i, btn, row), k| %>
  <%# for each row %>
  <% tr_class = (k%2 == 0) ? "even" : "odd" %>
  <tr title="<%=h day.strftime('%Y-%m-%d') %>_<%=h i %>" class="<%=h tr_class %>">

    <%# first cell %>
    <% if @mode == :edit %>
    <td>
      <% if btn %>
        <span class="pushable">▽</span>
      <% end %>
    </td>
    <% end %>

    <% row.each do |item| %>
      <%# for each cell %>

      <% case item
         when Date %>
        <td>
          <%=h format_date(item) %>
        </td>

      <% when :no_date %>
        <td></td>

      <% when Expense, Income %>
        <td class="title" title="<%=h item.id %>">
          <%= cell(item.title) %>
        </td>
        <td class="amount" title="<%=h item.id %>">
          <%= cell(item.amount) %>
        </td>

      <% when Move %>
        <td class="title" title="<%=h item.id %>">
          <%= cell(item.title) %>
        </td>
        <td class="account_id_from" title="<%=h item.id %>">
          <%= select_cell(item.account_from) %>
        </td>
        <td class="account_id_to" title="<%=h item.id %>">
          <%= select_cell(item.account_to) %>
        </td>
        <td class="amount" title="<%=h item.id %>">
          <%= cell(item.amount) %>
        </td>

      <% when :no_move %>
        <td class="title"><%= cell("") %></td>
        <td class="account_id_from"><%= select_cell() %></td>
        <td class="account_id_to"><%= select_cell() %></td>
        <td class="amount"><%= cell("") %></td>

      <% else %>
        <td class="title"><%= cell("") %></td>
        <td class="amount"><%= cell("") %></td>

      <% end %>
    <% end %>
  </tr>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
moneyrail-0.1.6 app/views/logs/_table_rows.html.erb
moneyrail-0.1.5 app/views/logs/_table_rows.html.erb
moneyrail-0.1.4 app/views/logs/_table_rows.html.erb
moneyrail-0.1.2 app/views/logs/_table_rows.html.erb