{% extends 'admin.html.twig' %}

{% block title %}Asset Name List - Cross World Group{% endblock %}

{% block body %}
<!-- Title Start  -->
                        <div class="app-page-title">
                            <div class="page-title-wrapper">

                                <div class="page-title-heading">
                                    <div class="page-title-icon">
                                        <i class="metismenu-icon pe-7s-diamond text-success">
                                        </i>
                                    </div>
                                    <div><h3>Asset Name</h3>
                                       
                                    </div>
                                </div>
								
                                <div class="page-title-actions">
                                   <div class="d-inline-block dropdown">
                                       <nav class="" aria-label="breadcrumb">
                                                    <ol class="breadcrumb">
                                                        <li class="breadcrumb-item"><a href="#">Home</a></li>
                                                        <li class="active breadcrumb-item" aria-current="page">Asset Name List</li>
                                                        
                                                    </ol>
                                                </nav>
                                    </div>
                                </div> 
								
							</div>
                        </div>    
                        {% for message in app.flashes('notice') %}
                            
                        <div class="alert alert-info alert-dismissible">
                            <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                            <strong>{{ message }}</strong> 
                        </div>
                        {% endfor %}  					
						<ul class="body-tabs body-tabs-layout tabs-animated body-tabs-animated nav">
                            
                            <li class="nav-item">
                                <a role="tab" class="nav-link active"  href="{{ path('assetname_new') }}">
                                    <span><i class="fa fa-plus"> Add Asset Name</i></span>
                                </a>
                            </li>
                        </ul> <!-- Title End  --> 
						
						<!-- Tab Start  --> 
                        <div class="tab-content">
						
						    <!-- Table Tab Start  --> 
                            <div class="tab-pane tabs-animation fade show active" id="tab-content-0" role="tabpanel">
                                <div class="main-card mb-3 card">
                                    <div class="card-body">
									
                                        <div class="search-wrapper pull-right">
                                            <div class="input-holder">
                                                   {{ render(controller(
                                                        'App\\Controller\\AssetnameController::searchBar'
                                                            )) }}
                                                   <button class="search-icon" data-toggle="tooltip" data-placement="top" title="Search by any fields"><span></span></button>
                                            </div>
                                            <button class="close"></button>
											
                                        </div>
					
                                   
                                        <div class="table table-bordered table-responsive table-striped table-hover" style="margin-top: 51px;">
										
                                            <table class="mb-0 table">
                                                <thead>
                                                <tr>
                                                    <th>#</th>
                                                    <th>Asset Name</th>
                                                    <th>Group Name</th>   
                                                    <th>Subgroup Name</th> 
                                                    <th>Unit</th>                                                                                                                             
                                                    <th><i class="fa fa-cogs" aria-hidden="true"></i> Actions</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                  {% for assetname in assetnames %}
                                                    {% set counter = ( counter | default(0) ) + 1 %}
                                                    <tr>
                                                      <td>{{ counter }}</td>
                                                      <td>{{ assetname.name }}</td>
                                                      <td>{{ assetname.groups.name }}</td>
                                                      <td>{{ assetname.subgroup.name }}</td>
                                                      <td>{{ assetname.unit.name }}</td>
                                                      <td>
                                                       <a href="{{ path('assetname_show', {'id': assetname.id}) }}" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Details"><i class="fa fa-eye"></i></a>
                                                       <a href="{{ path('assetname_edit', {'id': assetname.id}) }}" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Edit"><i class="fa fa-edit"></i></a>
                                                      </td>
                                                    </tr>
                                                  {% else %}
                                                  <tr>
                                                    <td colspan="9">No records found</td>
                                                  </tr>
                                                 {% endfor %}
                                                </tbody>
                                            </table>

                                     

                                        </div>


                                            {% if assetnames.haveToPaginate %}
                                            <div class="pagination justify-content-center">
                                            {{ pagerfanta(assetnames, 'twitter_bootstrap4', {routeName: 'assetname_index',
                                                    routeParams: app.request.query.all	}) }}
                                            </div>
                                        {% endif %}
							
                                    </div>
                                </div>
								
                              
                            </div> <!-- Table Tab End  --> 
														
                        </div> <!-- Tab End  --> 


{% endblock %}
