templates/dashboard/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Dashboard
  3. {% endblock %}
  4. {% block breadcrumb %}
  5.     <li class="breadcrumb-item active">{% trans %}
  6.         Dashboard
  7.         {% endtrans %}</li>
  8. {% endblock %}
  9. {% block pagetitle %}
  10.     {% trans %}
  11.     Dashboard{% endtrans %}
  12. {% endblock %}
  13. {% block body %}
  14.     <div class="row">
  15.         <div class="col-12 col-sm-6 col-md-3">
  16.             <div class="info-box">
  17.                 <span class="info-box-icon bg-info elevation-1">
  18.                     <i class="fas fa-project-diagram"></i>
  19.                 </span>
  20.                 <div class="info-box-content">
  21.                     <span class="info-box-text">Completed Projects</span>
  22.                     <span class="info-box-number"> {{ closed_project|length }}
  23.                     </span>
  24.                 </div>
  25.             </div>
  26.         </div>
  27.         <div class="col-12 col-sm-6 col-md-3">
  28.             <div class="info-box mb-3">
  29.                 <span class="info-box-icon bg-danger elevation-1">
  30.                     <i class="fas fa-project-diagram"></i>
  31.                 </span>
  32.                 <div class="info-box-content">
  33.                     <span class="info-box-text">Ongoing Projects</span>
  34.                     <span class="info-box-number"> {{ active_project|length }}
  35.                     </span>
  36.                 </div>
  37.             </div>
  38.         </div>
  39.         <div class="clearfix hidden-md-up"></div>
  40.         <div class="col-12 col-sm-6 col-md-3">
  41.             <div class="info-box mb-3">
  42.                 <span class="info-box-icon bg-success elevation-1">
  43.                     <i class="fas fa-tasks"></i>
  44.                 </span>
  45.                 <div class="info-box-content">
  46.                     <span class="info-box-text">Completed Tasks</span>
  47.                     <span class="info-box-number">20</span>
  48.                 </div>
  49.             </div>
  50.         </div>
  51.         <div class="col-12 col-sm-6 col-md-3">
  52.             <div class="info-box mb-3">
  53.                 <span class="info-box-icon bg-warning elevation-1">
  54.                     <i class="fas fa-tasks"></i>
  55.                 </span>
  56.                 <div class="info-box-content">
  57.                     <span class="info-box-text">Pending Tasks</span>
  58.                     <span class="info-box-number">7</span>
  59.                 </div>
  60.             </div>
  61.         </div>
  62.     </div><br>
  63.     <div class="row">
  64.         <div class="col-md-8">
  65.             <div class="card">
  66.                 <div class="card-header border-0">
  67.                     <h3 class="card-title">My Projects</h3>
  68.                     <div class="card-tools">
  69.                         <a href="#" class="btn btn-tool btn-sm">
  70.                             <i class="fas fa-bars"></i>
  71.                         </a>
  72.                     </div>
  73.                 </div>
  74.                 <div class="card-body table-responsive p-0">
  75.                     <table class="table table-striped table-valign-middle">
  76.                         <thead>
  77.                             <tr>
  78.                                 <th>Name</th>
  79.                                 <th>Amount</th>
  80.                                 <th>Start Date</th>
  81.                                 <th>End Date</th>
  82.                                 <th class="text-center">Actions</th>
  83.                             </tr>
  84.                         </thead>
  85.                         <tbody>
  86.                             {% for project in projects %}
  87.                                 <tr>
  88.                                     <td>
  89.                                         <a href="{{ path('project_dashboard', {'id': project.id })}}">{{ project.name }}</a>
  90.                                     </td>
  91.                                     <td>{{ project.currency.abbreviation }} {{ project.amount }}</td>
  92.                                     <td>{{ project.startDate ? project.startDate|date('Y-m-d') : '' }}</td>
  93.                                     <td>{{ project.endDate ? project.endDate|date('Y-m-d') : '' }}</td>
  94.                                     <td class="text-center">
  95.                                         <a href="{{path('project_activity_index', {'project': project.id})}}" class="btn btn-sm btn-primary mr-2">{% trans %}Activity{% endtrans %}</a>
  96.                                         <a href="{{ path('project_milestone_index', {'project': project.id })}}" class="btn btn-sm btn-success mr-2">{% trans %}Milestone{% endtrans %}</a>
  97.                                         <a href="{{ path('project_members_index', {'project': project.id })}}" class="btn btn-sm btn-warning text-white">{% trans %}Members{% endtrans %}</a>
  98.                                     </td>
  99.                                 </tr>
  100.                             {% endfor %}
  101.                         </tbody>
  102.                     </table>
  103.                 </div>
  104.             </div>
  105.         </div>
  106.         <div class="col-md-4">
  107.             <div class="card bg-gradient-success">
  108.                 <div class="card-header border-0">
  109.                     <h3 class="card-title">
  110.                         <i class="far fa-calendar-alt"></i>
  111.                         Calendar
  112.                     </h3>
  113.                     <div class="card-tools">
  114.                         <button type="button" class="btn btn-success btn-sm" data-card-widget="collapse">
  115.                             <i class="fas fa-minus"></i>
  116.                         </button>
  117.                     </div>
  118.                 </div>
  119.                 <div class="card-body pt-0 text-center">
  120.                     <div id="calendar" style="width: 100%"></div>
  121.                 </div>
  122.             </div>
  123.         </div>
  124.     </div><br>
  125.     <div class="row">
  126.         <div class="col-md-6">
  127.             <div class="card">
  128.                 <div class="card-header border-0">
  129.                     <h3 class="card-title">Overdue Tasks</h3>
  130.                     <div class="card-tools">
  131.                         <a href="#" class="btn btn-tool btn-sm">
  132.                             <i class="fas fa-bars"></i>
  133.                         </a>
  134.                     </div>
  135.                 </div>
  136.                 <div class="card-body table-responsive p-0">
  137.                     <table class="table table-striped table-valign-middle">
  138.                         <thead>
  139.                             <tr>
  140.                                 <th>Project</th>
  141.                                 <th>Task</th>
  142.                                 <th class="text-center">Overdue Days</th>
  143.                             </tr>
  144.                         </thead>
  145.                         <tbody>
  146.                             <tr>
  147.                                 <td>
  148.                                     City Portal
  149.                                 </td>
  150.                                 <td>UI/UX Implementation</td>
  151.                                 <td class="text-center">
  152.                                     <span class="text-danger">
  153.                                         12
  154.                                     </span>
  155.                                 </td>
  156.                             </tr>
  157.                         </tbody>
  158.                     </table>
  159.                 </div>
  160.             </div>
  161.         </div>
  162.         <div class="col-md-6">
  163.             <div class="card">
  164.                 <div class="card-header border-0">
  165.                     <h3 class="card-title">Upcoming Tasks</h3>
  166.                     <div class="card-tools">
  167.                         <a href="#" class="btn btn-tool btn-sm">
  168.                             <i class="fas fa-bars"></i>
  169.                         </a>
  170.                     </div>
  171.                 </div>
  172.                 <div class="card-body table-responsive p-0">
  173.                     <table class="table table-striped table-valign-middle">
  174.                         <thead>
  175.                             <tr>
  176.                                 <th>Project</th>
  177.                                 <th>Task</th>
  178.                                 <th class="text-center">Due Date</th>
  179.                             </tr>
  180.                         </thead>
  181.                         <tbody>
  182.                             <tr>
  183.                                 <td>
  184.                                     Demo
  185.                                 </td>
  186.                                 <td>Task Name</td>
  187.                                 <td class="text-center">
  188.                                     <span class="bg-warning p-2">
  189.                                         August 18, 2021
  190.                                     </span>
  191.                                 </td>
  192.                             </tr>
  193.                         </tbody>
  194.                     </table>
  195.                 </div>
  196.             </div>
  197.         </div>
  198.     </div>
  199. {% endblock %}
  200. {% block javascripts %}
  201.     <script src="{{ asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js')}}"></script>
  202.     <script>
  203.       $('#calendar').datetimepicker({
  204.     format: 'L',
  205.     inline: true
  206.   })
  207.   </script>
  208. {% endblock %}