app/views/invoice_bar/receipts/index.html.erb in invoice_bar-0.0.6 vs app/views/invoice_bar/receipts/index.html.erb in invoice_bar-0.0.7
- old
+ new
@@ -1,82 +1,82 @@
<%= content_for :sub_navigation do %>
- <ul class="nav nav-pills" style="float:right;">
- <li class="active">
- <%= link_to t('titles.receipts'), receipts_path %>
- </li>
- <li>
- <%= link_to t('titles.receipt_templates'), receipt_templates_path %>
- </li>
- </ul>
- <div class="btn-group" style="float:left;">
- <a class="btn btn-success" href="<%= new_receipt_path %>">
- <i class="icon-pencil icon-white"></i> <%= t('links.new_receipt') %>
- </a>
- <a class="btn btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
- <ul class="dropdown-menu">
+ <ul class="nav nav-pills" style="float:right;">
+ <li class="active">
+ <%= link_to t('titles.receipts'), receipts_path %>
+ </li>
+ <li>
+ <%= link_to t('titles.receipt_templates'), receipt_templates_path %>
+ </li>
+ </ul>
+ <div class="btn-group" style="float:left;">
+ <a class="btn btn-success" href="<%= new_receipt_path %>">
+ <i class="icon-pencil icon-white"></i> <%= t('links.new_receipt') %>
+ </a>
+ <a class="btn btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
+ <ul class="dropdown-menu">
<li><%= link_to t('links.new_receipt_for_contact'), contacts_path %></li>
- <li><%= link_to t('links.new_receipt_from_template'), receipt_templates_path %></a></li>
- </ul>
- </div>
- <h1>
- <%= t('titles.receipts') %>
- </h1>
+ <li><%= link_to t('links.new_receipt_from_template'), receipt_templates_path %></a></li>
+ </ul>
+ </div>
+ <h1>
+ <%= t('titles.receipts') %>
+ </h1>
<% end %>
<ul class="nav nav-tabs" style="margin-bottom:1px;border:0">
<li<% unless @section %> class="active"<% end %>>
<%= link_to t('navigation.all'), filter_receipts_url(params.merge(page: 1)) %>
</li>
<li<% if @section == :expence %> class="active"<% end %>>
- <%= link_to t('navigation.expence'), expence_receipts_url(params.merge(page: 1)) %>
- </li>
+ <%= link_to t('navigation.expence'), expence_receipts_url(params.merge(page: 1)) %>
+ </li>
<li<% if @section == :income %> class="active"<% end %>>
- <%= link_to t('navigation.income'), income_receipts_url(params.merge(page: 1)) %>
- </li>
+ <%= link_to t('navigation.income'), income_receipts_url(params.merge(page: 1)) %>
+ </li>
</ul>
<%= render partial: 'invoice_bar/forms/filter', params: params %>
<table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
+ <thead>
+ <tr>
<th class="number hidden-phone">
- <%= link_to "# #{t('attributes.receipt.number')}", filter_receipts_url(params.merge(page: 1, sort: 'number')) %>
- </th>
- <th class="contact_name">
- <%= link_to t('attributes.receipt.contact_name'), filter_receipts_url(params.merge(page: 1, sort: 'contact_name')) %>
- </th>
+ <%= link_to "# #{t('attributes.receipt.number')}", filter_receipts_url(params.merge(page: 1, sort: 'number')) %>
+ </th>
+ <th class="contact_name">
+ <%= link_to t('attributes.receipt.contact_name'), filter_receipts_url(params.merge(page: 1, sort: 'contact_name')) %>
+ </th>
<th class="issue_date hidden-phone">
- <%= link_to t('attributes.receipt.issue_date'), filter_receipts_url(params.merge(page: 1, sort: 'issue_date')) %>
- </th>
- <th class="amount">
- <%= link_to t('attributes.receipt.amount'), filter_receipts_url(params.merge(page: 1, sort: 'amount')) %>
- </th>
+ <%= link_to t('attributes.receipt.issue_date'), filter_receipts_url(params.merge(page: 1, sort: 'issue_date')) %>
+ </th>
+ <th class="amount">
+ <%= link_to t('attributes.receipt.amount'), filter_receipts_url(params.merge(page: 1, sort: 'amount')) %>
+ </th>
</tr>
- </thead>
- <tbody>
- <% @receipts.each do |receipt| %>
- <tr>
- <td class="number hidden-phone">
- <span><%= link_to receipt do %><%= receipt.number %><% end %></span>
- </td>
- <td class="contact_name">
- <span><%= receipt.contact_name %></span>
- </td>
- <td class="issue_date hidden-phone">
- <span><%= l(receipt.issue_date) %></span>
- </td>
- <td class="amount">
- <span><%= formatted_amount(receipt.amount, receipt.account.currency_symbol) %></span>
- </td>
- </tr>
- <% end %>
- </tbody>
+ </thead>
+ <tbody>
+ <% @receipts.each do |receipt| %>
+ <tr>
+ <td class="number hidden-phone">
+ <span><%= link_to receipt_path(number: receipt.number) do %><%= receipt.number %><% end %></span>
+ </td>
+ <td class="contact_name">
+ <span><%= receipt.contact_name %></span>
+ </td>
+ <td class="issue_date hidden-phone">
+ <span><%= l(receipt.issue_date) %></span>
+ </td>
+ <td class="amount">
+ <span><%= formatted_amount(receipt.amount, receipt.account.currency_symbol) %></span>
+ </td>
+ </tr>
+ <% end %>
+ </tbody>
</table>
<% if @receipts.size == 0 %>
- <div class="no-data">
- <%= t('invoice_bar.no_data') %>
- </div>
+ <div class="no-data">
+ <%= t('invoice_bar.no_data') %>
+ </div>
<% end %>
-<%= paginate @receipts %>
\ No newline at end of file
+<%= paginate @receipts %>