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

{% block title %}Tour Claim List - {{ parent() }}{% 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>Tour Claim</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">Tour Claim 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 %}  

                        {% for message in app.flashes('warning') %}                   
                            <div class="alert alert-danger 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('tour_claim_new') }}">
                                    <span><i class="fa fa-plus"> New Tour Claim </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\\LeaveApplicationController::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>Submition Date</th>
                                                    <th>Starting Date</th>
                                                    <th>Ending Date</th>
                                                    <th>Tour Details</th>                                                  
                                                    <th><i class="fa fa-cogs" aria-hidden="true"></i> Actions</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                {% set pageUrl = app.request.requesturi|split('/') %}
                                                  {% set pageNo = pageUrl|last %} 

                                                  {% if pageNo matches '/^\\d+$/' %}
                                                    {% set counter = (pageNo-1) * 15 %}
                                                  {% else %}
                                                    {% set counter = 0 %}
                                                  {% endif %}

                                                  {% for tour_claim in tour_claims %}
                                                    {% set counter = counter + 1 %}
                                                    <tr>
                                                      <td>{{ counter }}</td>  
                                                      <td>{{ tour_claim.submitionDate ? tour_claim.submitionDate|date('d-m-Y') : '' }}</td>
                                                      <td>{{ tour_claim.startingDate ? tour_claim.startingDate|date('d-m-Y H:i:s') : '' }}</td>
                                                      <td>{{ tour_claim.endingDate ? tour_claim.endingDate|date('d-m-Y H:i:s') : '' }}</td>
                                                      <td>{{ tour_claim.tourDetails }}</td>           
                                                      <td>
                                                       <a href="{{ path('tour_claim_show', {'id': tour_claim.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('tour_claim_edit', {'id': tour_claim.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 tour_claims.haveToPaginate %}
                                                <div class="pagination justify-content-center">
                                                {{ pagerfanta(tour_claims, 'twitter_bootstrap4', {routeName: 'tour_claim_index',
                                                        routeParams: app.request.query.all	}) }}
                                                </div>
                                            {% endif %}
                                         							
                                    </div>
                                </div>
								
                              
                            </div> <!-- Table Tab End  --> 
														
                        </div> <!-- Tab End  --> 


{% endblock %}



{# {% extends 'base.html.twig' %}

{% block title %}TourClaim index{% endblock %}

{% block body %}
    <h1>TourClaim index</h1>

    <table class="table">
        <thead>
            <tr>
                <th>Id</th>
                <th>SubmitionDate</th>
                <th>StartingDate</th>
                <th>EndingDate</th>
                <th>TourDetails</th>
                <th>actions</th>
            </tr>
        </thead>
        <tbody>
        {% for tour_claim in tour_claims %}
            <tr>
                <td>{{ tour_claim.id }}</td>
                <td>{{ tour_claim.submitionDate ? tour_claim.submitionDate|date('Y-m-d') : '' }}</td>
                <td>{{ tour_claim.startingDate ? tour_claim.startingDate|date('Y-m-d H:i:s') : '' }}</td>
                <td>{{ tour_claim.endingDate ? tour_claim.endingDate|date('Y-m-d H:i:s') : '' }}</td>
                <td>{{ tour_claim.tourDetails }}</td>
                <td>
                    <a href="{{ path('tour_claim_show', {'id': tour_claim.id}) }}">show</a>
                    <a href="{{ path('tour_claim_edit', {'id': tour_claim.id}) }}">edit</a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="6">no records found</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <a href="{{ path('tour_claim_new') }}">Create new</a>
{% endblock %} #}
