templates/facility_dashboard/index.html.twig line 1

Open in your IDE?
  1. {% extends 'front.html.twig' %}
  2. {% block title %}Bed Capacities{% endblock %}
  3. {% block content %}
  4.     <div class="kt-subheader kt-grid__item"></div>
  5.     <div class="kt-container kt-grid__item kt-grid__item--fluid">
  6.         <div class="kt-portlet kt-portlet--mobile">
  7.             <div class="kt-portlet__head kt-portlet__head--lg">
  8.                 <div class="kt-portlet__head-label">
  9.                     <h3 class="kt-portlet__head-title">Bed Capacities</h3>
  10.                 </div>
  11.             </div>
  12.             <div class="kt-portlet__body">
  13.                 {% include 'facility_dashboard/_filter_form.html.twig' %}
  14.                 <table class="table">
  15.                     <thead>
  16.                         <tr>
  17.                             <th class="text-right">Sr. No.</th>
  18.                             <th>District / Corporation</th>
  19.                             <th class="text-right">Hospitals</th>
  20.                             <th class="text-right">As per IPHS</th>
  21.                             <th class="text-right">Available Beds</th>
  22.                             <th class="text-right">Vacant Beds</th>
  23.                             <th class="text-right">Vacant Available %</th>
  24.                             <th class="text-right">Bed Occupancy %</th>
  25.                         </tr>
  26.                     </thead>
  27.                     <tbody>
  28.                         {% for bed in beds %}
  29.                             <tr>
  30.                                 <td class="text-right">{{ loop.index }}</td>
  31.                                 <td>
  32.                                     <a href="{{ path('facilities_district', {'id': bed.district_id }) }}" data-toggle="kt-tooltip" title="View Details">{{ bed.district }}</a>
  33.                                 </td>
  34.                                 <td class="text-right">{{ bed.hospitals }}</td>
  35.                                 <td class="text-right">{{ bed.iphs }}</td>
  36.                                 <td class="text-right">{{ bed.available }}</td>
  37.                                 <td class="text-right">{{ bed.available > 0 ? bed.available - bed.occupied : '0' }}</td>
  38.                                 <td class="text-right">{{ bed.available > 0 ? (((bed.available - bed.occupied) * 100) / bed.available)|number_format(2) : '0' }}</td>
  39.                                 <td class="text-right">{{ bed.available > 0 ? ((bed.occupied * 100) / bed.available)|number_format(2) : '0' }}</td>
  40.                             </tr>
  41.                         {% else %}
  42.                             <tr>
  43.                                 <td colspan="8" class="text-center">No data found.</td>
  44.                             </tr>
  45.                         {% endfor %}
  46.                     </tbody>
  47.                 </table>
  48.             </div>
  49.         </div>
  50.     </div>
  51. {% endblock %}
  52. {% block scripts %}
  53.     {{ parent() }}
  54.     <script>
  55.         $('#type').val('{{ app.request.get('type') }}');
  56.         $('#level').val('{{ app.request.get('level') }}');
  57.         $('#department').val('{{ app.request.get('department_id') }}');
  58.         $('select').selectpicker();
  59.     </script>
  60. {% endblock %}