diff --git a/app/views/registrar/account_activities/index.haml b/app/views/registrar/account_activities/index.haml deleted file mode 100644 index 3cc6b34e4..000000000 --- a/app/views/registrar/account_activities/index.haml +++ /dev/null @@ -1,61 +0,0 @@ -- content_for :actions do - = link_to(t(:back_to_billing), registrar_invoices_path, class: 'btn btn-default') - = link_to(t(:export_csv), url_for(params.merge(format: 'csv')), class: 'btn btn-default') - -= render 'shared/title', name: t(:account_activity) - -.row - .col-md-12 - = search_form_for @q, url: [:registrar, :account_activities], html: { style: 'margin-bottom: 0;' } do |f| - .row - .col-md-6 - .form-group - = f.label t(:activity_type) - = f.select :activity_type_in, AccountActivity.types_for_select, {}, class: 'form-control js-combobox', placeholder: t(:choose), multiple: true - .col-md-6 - .form-group - = f.label t(:description) - = f.search_field :description_cont, class: 'form-control', placeholder: t(:description), autocomplete: 'off' - .row - .col-md-3 - .form-group - = f.label t(:receipt_date_from) - = f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_from) - .col-md-3 - .form-group - = f.label t(:receipt_date_until) - = f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_until) - .col-md-6{style: 'padding-top: 25px;'} - %button.btn.btn-default -   - %span.glyphicon.glyphicon-search -   - = link_to(t('.reset_btn'), registrar_account_activities_path, class: 'btn btn-default') -%hr - -.row - .col-md-12 - .table-responsive - %table.table.table-hover.table-condensed - %thead - %tr - %th{class: 'col-xs-5'} - = sort_link(@q, 'description') - %th{class: 'col-xs-2'} - = sort_link(@q, 'activity_type') - %th{class: 'col-xs-3'} - = sort_link(@q, 'created_at', AccountActivity.human_attribute_name(:created_at)) - %th{class: 'col-xs-2'} - = sort_link(@q, 'sum') - %tbody - - @account_activities.each do |x| - %tr - %td= x.description.present? ? x.description : '-' - %td= x.activity_type ? t(x.activity_type) : '' - %td= l(x.created_at) - - c = x.sum > 0.0 ? 'text-success' : 'text-danger' - - s = x.sum > 0.0 ? "+#{x.sum} #{x.currency}" : "#{x.sum} #{x.currency}" - %td{class: c}= s -.row - .col-md-12 - = paginate @account_activities diff --git a/app/views/registrar/account_activities/index.html.erb b/app/views/registrar/account_activities/index.html.erb new file mode 100644 index 000000000..73e966b51 --- /dev/null +++ b/app/views/registrar/account_activities/index.html.erb @@ -0,0 +1,102 @@ +<% content_for :actions do %> + <%= link_to(t(:back_to_billing), registrar_invoices_path, class: 'btn btn-default') %> + <%= link_to(t(:export_csv), url_for(params.merge(format: 'csv')), class: 'btn btn-default') %> +<% end %> + +<%= render 'shared/title', name: t(:account_activity) %> + +
+
+ <%= search_form_for @q, url: [:registrar, :account_activities], html: { style: 'margin-bottom: 0;' } do |f| %> +
+
+
+ <%= f.label t(:activity_type) %> + <%= f.select :activity_type_in, AccountActivity.types_for_select, {}, class: 'form-control js-combobox', placeholder: t(:choose), multiple: true %> +
+
+
+
+ <%= f.label t(:description) %> + <%= f.search_field :description_cont, class: 'form-control', placeholder: t(:description), autocomplete: 'off' %> +
+
+
+
+
+
+ <%= f.label t(:receipt_date_from) %> + <%= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_from) %> +
+
+
+
+ <%= f.label t(:receipt_date_until) %> + <%= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_until) %> +
+
+
+ + <%= link_to(t('.reset_btn'), registrar_account_activities_path, class: 'btn btn-default') %> +
+
+ <% end %> +
+
+ +
+ +
+
+
+ + + + + + + + + + + <% @account_activities.each do |x| %> + + + + + <% c = x.sum > 0.0 ? 'text-success' : 'text-danger' %> + <% s = x.sum > 0.0 ? "+#{x.sum} #{x.currency}" : "#{x.sum} #{x.currency}" %> + + + <% end %> + +
+ <%= sort_link(@q, 'description') %> + + <%= sort_link(@q, 'activity_type') %> + + <%= sort_link(@q, 'created_at', AccountActivity.human_attribute_name(:created_at)) %> + + <%= sort_link(@q, 'sum') %> +
+ <%= x.description.present? ? x.description : '-' %> + + <%= x.activity_type ? t(x.activity_type) : '' %> + + <%= l(x.created_at) %> + + <%= s %> +
+
+
+
+ +
+
+ <%= paginate @account_activities %> +
+