| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <!-- BEGIN CONTAINER -->
- <div class="page-container">
- <!-- BEGIN CONTENT -->
- <div class="page-content-wrapper">
- <!-- BEGIN CONTENT BODY -->
- <!-- BEGIN PAGE HEAD-->
- <div class="page-head">
- <div class="container-fluid">
- <!-- BEGIN PAGE TITLE -->
- <div class="page-title">
- <h1>Vendedores</h1>
- </div>
- <!-- END PAGE TITLE -->
- </div>
- </div>
- <!-- END PAGE HEAD-->
- <!-- BEGIN PAGE CONTENT BODY -->
- <div class="page-content">
- <div class="container-fluid">
- <!-- BEGIN PAGE BREADCRUMBS -->
- <ul class="page-breadcrumb breadcrumb">
- <%= render_breadcrumbs :tag => :li, :separator => ' <i class="fa fa-circle"></i> ' %>
- </ul>
- <!-- END PAGE BREADCRUMBS -->
- <!-- BEGIN PAGE CONTENT INNER -->
- <div class="page-content-inner">
- <div id="notice">
- <% if success %>
- <div class="alert alert-success">
- <p><%= success %></p>
- </div>
- <% elsif warning %>
- <div class="alert alert-warning">
- <p><%= warning %></p>
- </div>
- <% end %>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="portlet light ">
- <div class="portlet-title">
- <div class="caption">
- <i class="fa fa-list "></i>
- <span class="caption-subject bold uppercase">Lista de vendedores</span>
- </div>
- <div class="actions">
- <% if can? :create, Seller %>
- <%= link_to new_seller_path, remote: true, class: "btn bold green pull-right" do %> Nuevo Vendedor <i class="fa fa-plus"></i> <% end %>
- <% end %>
- </div>
- </div>
- <div class="portlet-body">
- <table class="table table-striped table-bordered table-hover tableadvanced">
- <thead>
- <tr>
- <th>#</th>
- <th>Nombre</th>
- <th>Apellido</th>
- <% if current_user.usertype == "A" || current_user.usertype == "SS" %>
- <th>Punto de venta</th>
- <% end %>
- <th>Status</th>
- <th width="15%">Acciones</th>
- </tr>
- </thead>
- <tbody>
- <% @sellers.each_with_index do |seller, key| %>
- <tr>
- <td><%= key + 1 %></td>
- <td><%= seller.name %></td>
- <td><%= seller.last_name %></td>
- <% if current_user.usertype == "A" || current_user.usertype == "SS" %>
- <td> <%= seller.pointsale.name %> </td>
- <% end %>
- <td>
- <% if seller.status == "inactive" %>
- <i class='fa fa-times fa-2 font-red'></i>
- <% else %>
- <i class='fa fa-check fa-2 font-green'></i>
- <% end %>
- </td>
- <td>
- <% if can? :update, Seller %>
- <%= link_to edit_seller_path(seller), remote: true, class: "btn btn-icon-only btn-primary", title: "Editar vendedor" do %>
- <i class="fa fa-edit"></i>
- <% end %>
- <% if seller.active? %>
- <%= link_to seller_update_status_path(seller), :class=>"btn btn-icon-only default", title: "Desactivar vendedor", data: { confirm: '¿Esta seguro de desactivar el vendedor?', method: 'post' } do %>
- <i class="fa fa-toggle-off"></i>
- <% end %>
- <% elsif seller.inactive? %>
- <%= link_to seller_update_status_path(seller), :class=>"btn btn-icon-only green-jungle", title: "Activar vendedor", data: { confirm: '¿Esta seguro de activar el vendedor?', method: 'post' } do %>
- <i class="fa fa-toggle-on"></i>
- <% end %>
- <% end %>
- <% end %>
- <% if can? :destroy, Seller %>
- <%= link_to seller, method: :delete, :class => "btn btn-icon-only btn-danger", title: "Eliminar vendedor", data: { confirm: '¿Esta seguro de eliminar al vendedor?'} do %>
- <i class="fa fa-trash-o"></i>
- <% end %>
- <% end %>
- </td>
- </tr>
- <% end %>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- END PAGE CONTENT INNER -->
- </div>
- </div>
- <!-- END PAGE CONTENT BODY -->
- <!-- END CONTENT BODY -->
- </div>
- <!-- END CONTENT -->
- </div>
- <!-- END CONTAINER -->
|