templates/Event/event.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}
  3.     OceanExpert - A Directory of Marine and Freshwater Professionals
  4. {% endblock %}
  5. {% block stylesheets %}
  6.     <link
  7.             rel="stylesheet"
  8.             type="text/css"
  9.             href="{{ asset('css/font-awesome.min.css') }}"
  10.             xmlns="http://www.w3.org/1999/html" />
  11.     <link rel="stylesheet" type="text/css" href="{{ asset('css/ionicons.min.css') }}" />
  12.     <link rel="stylesheet" type="text/css" href="{{ asset('css/square/blue.css') }}" />
  13.     <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap.min.css') }}" />
  14.     <link rel="stylesheet" type="text/css" href="{{ asset('css/select2.min.css') }}" />
  15.     <link rel="stylesheet" type="text/css" href="{{ asset('css/select2-bootstrap.css') }}" />
  16.     <link rel="stylesheet" type="text/css" href="{{ asset('css/AdminLTE.min.css') }}" />
  17.     <link rel="stylesheet" type="text/css" href="{{ asset('css/tipped.css') }}" />
  18.     <link rel="stylesheet" type="text/css" href="{{ asset('css/navbar-login.css') }}" />
  19.     <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap3-wysihtml5.min.css') }}" />
  20.     <link rel="stylesheet" type="text/css" href="{{ asset('css/jquery-ui.min.css') }}" />
  21.     <link rel="stylesheet" type="text/css" href="{{ asset('css/checkbox.css') }}" />
  22.     <link rel="stylesheet" type="text/css" href="{{ asset('css/profile.css') }}" />
  23.     <link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}" />
  24.     <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap-datepicker.min.css') }}" />
  25.     <link rel="stylesheet" type="text/css" href="{{ asset('css/nestable.modified.css') }}" />
  26.     <link rel="stylesheet" type="text/css" href="{{ asset('css/select.dataTables.min.css') }}" />
  27.     <link rel="stylesheet" type="text/css" href="{{ asset('css/dataTables.bootstrap.min.css') }}" />
  28.     <link rel="stylesheet" type="text/css" href="{{ asset('css/events.css') }}" />
  29.     <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap-dialog.min.css') }}"/>
  30.     <link rel="stylesheet" type="text/css" href="{{ asset('css/dropzone.css') }}" />
  31.     <link rel="stylesheet" type="text/css" href="{{ asset('css/tipped.css') }}" />
  32.     <style media="screen"> </style>
  33. {% endblock %}
  34. {% block body %}
  35.     {% include 'navbarlogin.html.twig' %}
  36.     <!-- JSON-LD will be used for SEO and OIH -->
  37.     <script type="application/ld+json">
  38.         {{ data.OIHData | raw }}
  39.     </script>
  40.     <div class="container-fluid">
  41.         <section class="content">
  42.             <div class="row">
  43.                 <div class="col-md-3">
  44.                     <!-- Profile Image -->
  45.                     <div class="box box-primary">
  46.                         <div class="box-body box-profile">
  47.                             <div class="text-center">
  48.                                 <i class="fa fa-calendar fa-4x" aria-hidden="true"></i>
  49.                                 <h2 class="event-title">
  50.                                     {% if data.event.details.title is defined %}
  51.                                         {{ data.event.details.title }}
  52.                                     {% endif %}
  53.                                     {% if data.event.details.shorttitle is defined %}
  54.                                         <br />
  55.                                         <small>{{ data.event.details.shorttitle }}</small>
  56.                                     {% endif %}
  57.                                 </h2>
  58.                                 {% if data.event.type.eventtypeName is defined  %}
  59.                                     <h4><span class="label label-primary">{{ data.event.type.eventtypeName }}</span></h4>
  60.                                 {% endif %}
  61.                                 {% if data.event.details.startOn is defined and data.event.details.endOn is defined %}
  62.                                     <h3 class="profile-username">
  63.                                         {% if data.event.details.startOn|date("m") != data.event.details.endOn|date("m") %}
  64.                                             {% if data.event.details.startOn|date("Y") != data.event.details.endOn|date("Y")  %}
  65.                                                 {{ data.event.details.startOn|date("d F Y") ~ ' - ' ~ data.event.details.endOn|date("d F Y") }}
  66.                                             {% else %}
  67.                                                 {{ data.event.details.startOn|date("d F") ~ ' - ' ~ data.event.details.endOn|date("d F Y") }}
  68.                                             {% endif %}
  69.                                         {% elseif data.event.details.startOn == data.event.details.endOn %}
  70.                                             {{ data.event.details.startOn | date("d F Y") }}
  71.                                         {% else %}
  72.                                             {{ data.event.details.startOn | date("d") ~ ' - ' ~ data.event.details.endOn | date("d F Y") }}
  73.                                         {% endif %}
  74.                                     </h3>
  75.                                 {% endif %}
  76.                                 {% if data.user is defined and data.user.canEditEvent == 1 %}
  77.                                     <p class="lead text-center print">
  78.                                         {% if app.user is defined and is_granted('ROLE_GLOBAL_EDITOR') %}
  79.                                             {% if data.event.details.status == 0 %}
  80.                                                 <button
  81.                                                         class="btn btn-success eventAction"
  82.                                                         data-status="1">
  83.                                                     <i class="fa fa-check fa-fw" aria-hidden="true"></i>
  84.                                                     Activate
  85.                                                 </button>
  86.                                             {% elseif data.event.details.status == 1 %}
  87.                                                 <button
  88.                                                         class="btn btn-danger eventAction"
  89.                                                         data-status="0">
  90.                                                     <i class="fa fa-ban fa-fw" aria-hidden="true"></i>
  91.                                                     Deactivate
  92.                                                 </button>
  93.                                             {% elseif data.event.details.status == 2 %}
  94.                                                 <button
  95.                                                         class="btn btn-warning eventAction"
  96.                                                         data-status="2">
  97.                                                     <i class="fa fa-times fa-fw" aria-hidden="true"></i>
  98.                                                     Delete
  99.                                                 </button>
  100.                                             {% elseif data.event.details.status == 3 %}
  101.                                                 <button
  102.                                                         class="btn btn-success eventAction"
  103.                                                         data-status="0">
  104.                                                     <i class="fa fa-check fa-fw" aria-hidden="true"></i>
  105.                                                     Undelete
  106.                                                 </button>
  107.                                             {% endif %}
  108.                                         {% endif %}
  109.                                         <a
  110.                                                 href="{{ path('edit_event',{'idEvent': data.event.details.idEvent}) }}"
  111.                                                 class="btn btn-primary">
  112.                                             <i class="fa fa-pencil fa-fw" aria-hidden="true"></i>
  113.                                             Edit Event
  114.                                         </a>
  115.                                     </p>
  116.                                 {% endif %}
  117.                                 {% if data.error is defined and data.error|length > 0 %}
  118.                                 <p class="btn-danger text-center ">
  119.                                     <i class="fa fa-warning" aria-hidden="true"></i> {{ data.error }}
  120.                                 </p>
  121.                                 {% endif %}
  122.                             </div>
  123.                         </div>
  124.                         <!-- /.box-body -->
  125.                     </div>
  126.                     <!-- /.box -->
  127.                     <!-- About Me Box -->
  128.                     <div class="box box-primary">
  129.                         <div class="box-body">
  130.                             <strong><i class="fa fa-map-marker fa-fw"></i> Location</strong>
  131.                             <p class="text-muted">
  132.                                 <address>
  133.                                 {% if data.event.details.idCountry == "0"  and data.event.details.useInstAddr == "0" %}
  134.                                     no location/online event
  135.                                 {% elseif data.event.details.address is defined and data.event.details.address | trim | length > 0  %}
  136.                                     {{ data.event.details.address | raw }}<br />
  137.                                 {% endif %}
  138.                                 </address>
  139.                             <hr />
  140.                             <strong>
  141.                                 <i class="fa fa-users fa-fw"></i>
  142.                                 Organiser(s) & Staff
  143.                             </strong>
  144.                             <div class="left-text">
  145.                                 {% if data.event.people.organisers is defined and data.event.people.organisers | length > 0  %}
  146.                                     <div class="staff-type">Organiser</div>
  147.                                     <ul class="staff-list">
  148.                                         {% for organiser in data.event.people.organisers %}
  149.                                             <li>
  150.                                                 <a
  151.                                                         href="{{ path('view_profile', {'user': organiser.id}) }}">
  152.                                                     {{ organiser.title ~ ' ' ~ organiser.fname ~ ' ' ~ organiser.sname | upper }}
  153.                                                 </a>
  154.                                             </li>
  155.                                         {% endfor %}
  156.                                     </ul>
  157.                                 {% endif %}
  158.                                 {% if data.event.people.staff is defined and data.event.people.staff | length > 0  %}
  159.                                     <div class="staff-type">Staff</div>
  160.                                     <ul class="staff-list">
  161.                                         {% for staff in data.event.people.staff %}
  162.                                             <li><a href="{{ path('view_profile', {'user': staff.id}) }}">{{ staff.title ~ ' ' ~ staff.fname ~ ' ' ~ staff.sname | upper }}</a></li>
  163.                                         {% endfor %}
  164.                                     </ul>
  165.                                 {% endif %}
  166.                             </div>
  167.                             <hr>
  168.                             <strong><i class="fa fa-hand-o-up fa-fw" aria-hidden="true"></i> Participation</strong>
  169.                             {% if data.event.details.isOpen == 0 %}
  170.                             {% elseif data.event.details.isOpen == 1 %}
  171.                                 <p class="left-text">Open attendance.</p>
  172.                             {% elseif data.event.details.isOpen == 2 %}
  173.                                 <p class="left-text">By invitation only.</p>
  174.                             {% elseif data.event.details.isOpen == 3 %}
  175.                                 <p class="left-text">Attendance by application.</p>
  176.                             {% endif %}
  177.                         </div>
  178.                         <!-- /.box-body -->
  179.                     </div>
  180.                     <!-- /.box -->
  181.                 </div>
  182.                 <!-- /.col -->
  183.                 <div class="col-md-9">
  184.                     <div class="nav-tabs-custom">
  185.                         <ul class="nav nav-tabs">
  186.                             <li
  187.                                     class="active">
  188.                                 <a
  189.                                         href="#overview"
  190.                                         data-toggle="tab"
  191.                                         aria-expanded="false">
  192.                                     Overview
  193.                                 </a>
  194.                             </li>
  195.                             {% if data.event.agenda is defined and data.event.agenda is not null %}
  196.                                 <li class="">
  197.                                     <a
  198.                                             href="#agenda"
  199.                                             data-toggle="tab"
  200.                                             aria-expanded="true">
  201.                                         Agenda
  202.                                     </a>
  203.                                 </li>
  204.                             {% endif %}
  205.                             {% if data.event.report | length + data.event.eventPresentations | length + data.event.agendaDocuments | length + data.event.backgroundDocs | length + data.event.otherDocs | length >0  %}
  206.                                 <li class="">
  207.                                     <a
  208.                                             href="#documents"
  209.                                             data-toggle="tab"
  210.                                             aria-expanded="false">
  211.                                         Documents
  212.                                     </a>
  213.                                 </li>
  214.                             {% endif %}
  215.                             {% if data.event.people.participants | length > 0 %}
  216.                                 <li class="">
  217.                                     <a
  218.                                             href="#participants"
  219.                                             data-toggle="tab"
  220.                                             aria-expanded="false">
  221.                                         Participants
  222.                                     </a>
  223.                                 </li>
  224.                             {% endif %}
  225.                         </ul>
  226.                         <div class="tab-content">
  227.                             <div class="tab-pane active" id="overview">
  228.                                 <div class="box-header with-border">
  229.                                     <span class="event-heading">
  230.                                         {% if data.event.details.title is defined %}
  231.                                             {{ data.event.details.title }}
  232.                                         {% endif %}
  233.                                     </span>
  234.                                     {% if data.event.details.regOnline == 1 %}
  235.                                         {#
  236.                                             see : #561
  237.                                             % if "now"|date('Y-m-d') < data.event.details.startOn|date('Y-m-d') %
  238.                                         #}
  239.                                         {% if "now"|date('Y-m-d') < data.event.details.endOn|date('Y-m-d') %}
  240.                                             <div class="register-event">
  241.                                                 <a
  242.                                                         href="{{ path('register_event',{idEvent:data.event.details.idEvent }) }}" >
  243.                                                     Register to participate in this event
  244.                                                 </a>
  245.                                                 {% if not is_granted('ROLE_USER') %}
  246.                                                     (you must <a
  247.                                                             href="/login">
  248.                                                         log in
  249.                                                     </a>, with an activated account, first!)
  250.                                                 {% endif %}
  251.                                             </div>
  252.                                         {% endif %}
  253.                                     {% endif %}
  254.                                 </div>
  255.                                 {% if data.event.eventImage != null %}
  256.                                     <div class="box-header with-border">
  257.                                         <img src="{{ asset(data.event.eventImage.path ~ data.event.eventImage.filename) }}" class="img-responsive" alt="Image">
  258.                                     </div>
  259.                                 {% endif %}
  260.                                 {% if data.event.details.summary is defined and data.event.details.summary != "" %}
  261.                                     <div class="box-header with-border">
  262.                                         <strong>Summary</strong>
  263.                                         <p class="justify">
  264.                                             {{ data.event.details.summary | raw}}
  265.                                         </p>
  266.                                     </div>
  267.                                 {% endif %}
  268.                                 {% if data.event.details.notes is defined and data.event.details.notes|trim  != "" %}
  269.                                     <div class="box-header with-border">
  270.                                         <strong>Notes</strong>
  271.                                         <p class="justify">
  272.                                             {{ data.event.details.notes| raw }}
  273.                                         </p>
  274.                                     </div>
  275.                                 {% endif %}
  276.                                 {% if data.event.details.website is defined and data.event.details.website != "" %}
  277.                                     <div class="box-header with-border">
  278.                                         <strong>Website: </strong><span class="event-website">
  279.                                         {% if data.event.details.website starts with 'http'  %}
  280.                                             <a
  281.                                                     href="{{ data.event.details.website }}"
  282.                                                     target="_blank">
  283.                                                 {{ data.event.details.website }}
  284.                                             </a>
  285.                                         {% else %}
  286.                                             <a
  287.                                                     href="http://{{ data.event.details.website }}"
  288.                                                     target="_blank">
  289.                                                 http://{{ data.event.details.website }}
  290.                                             </a>
  291.                                         {% endif %}
  292.                                         </span>
  293.                                     </div>
  294.                                 {% endif %}
  295.                                 {% if data.event.people.participants
  296.                                     | length > 0 or data.event.report
  297.                                     | length + data.event.eventPresentations
  298.                                     | length + data.event.agendaDocuments
  299.                                     | length + data.event.backgroundDocs
  300.                                     | length + data.event.otherDocs
  301.                                     | length >0 %}
  302.                                     <div class="box-header with-border">
  303.                                         <div class="row">
  304.                                             {% if data.event.people.participants | length > 0 %}
  305.                                                 <div class="col-sm-4 col-xs-12">
  306.                                                     <div class="media">
  307.                                                         <div class="media-left">
  308.                                                             <img alt="user icon" src="{{ asset('assets/uploads/user.png') }}" class="icons">
  309.                                                         </div>
  310.                                                         <div class="media-body">
  311.                                                             {% if data.event.people.numberOfParticipants > 0  %}
  312.                                                                 <div class="participants"><a href="javascript:void(0)" data-id="participants" class="navigate">{{ data.event.people.numberOfParticipants }} Participants</a></div>
  313.                                                             {% endif %}
  314.                                                             {% if (data.event.people.numberOfProvisional + data.event.people.numberOfUnapproved) > 0  %}
  315.                                                                 <div class="participants"><a href="javascript:void(0)" data-id="participants" class="navigate">{{ data.event.people.numberOfProvisional + data.event.people.numberOfUnapproved }} Provisional</a></div>
  316.                                                             {% endif %}
  317.                                                             <div class="pull-right"><a href="javascript:void(0)" data-id="participants" class="navigate">More...</a></div>
  318.                                                         </div>
  319.                                                     </div>
  320.                                                 </div>
  321.                                             {% endif %}
  322.                                             {% if data.event.people.participants | length > 0 %}
  323.                                                 <div class="col-sm-4 col-xs-12">
  324.                                                     <div class="media">
  325.                                                         <div class="media-left">
  326.                                                             <img
  327.                                                                     alt="report icon"
  328.                                                                     src="{{ asset('assets/uploads/report.png') }}"
  329.                                                                     class="icons" />
  330.                                                         </div>
  331.                                                         <div class="media-body">
  332.                                                             <a
  333.                                                                     href="javascript:void(0)"
  334.                                                                     data-id="participants"
  335.                                                                     class="navigate">
  336.                                                                 View detailed participants list
  337.                                                             </a><br />
  338.                                                             <a
  339.                                                                     href="{{ path('view_printable_participants',{idEvent: data.event.details.idEvent}) }}">
  340.                                                                 View a printable participants list
  341.                                                             </a><br />
  342.                                                             <div class="pull-right">
  343.                                                                 <a
  344.                                                                         href="javascript:void(0)"
  345.                                                                         data-id="participants"
  346.                                                                         class="navigate">
  347.                                                                     More...
  348.                                                                 </a>
  349.                                                             </div>
  350.                                                         </div>
  351.                                                     </div>
  352.                                                 </div>
  353.                                             {% endif %}
  354.                                             {% if data.event.report
  355.                                                 | length + data.event.eventPresentations
  356.                                                 | length + data.event.agendaDocuments
  357.                                                 | length + data.event.backgroundDocs
  358.                                                 | length + data.event.otherDocs
  359.                                                 | length >0  %}
  360.                                                 <div class="col-sm-4 col-xs-12">
  361.                                                     <div class="media">
  362.                                                         <div class="media-left">
  363.                                                             <img
  364.                                                                     alt="document icon"
  365.                                                                     src="{{ asset('assets/uploads/documents.png') }}"
  366.                                                                     class="icons" />
  367.                                                         </div>
  368.                                                         <div class="media-body">
  369.                                                             {% if data.event.report is not null and data.event.report | length > 0 %}
  370.                                                                 <a
  371.                                                                         href="javascript:void(0)"
  372.                                                                         data-id="documents"
  373.                                                                         class="navigate">
  374.                                                                     Final R
  375.                                                                     eport</a><br />
  376.                                                             {% endif %}
  377.                                                             {% if data.event.eventPresentations is not null and data.event.eventPresentations | length >0 %}
  378.                                                                 Presentations: <a
  379.                                                                     href="javascript:void(0)"
  380.                                                                     data-id="documents"
  381.                                                                     class="navigate">
  382.                                                                 {{ data.event.eventPresentations | length }}
  383.                                                                 </a><br />
  384.                                                             {% endif %}
  385.                                                             {% if data.event.agendaDocuments is not null and data.event.agendaDocuments | length >0 %}
  386.                                                                 Agenda Documents: <a
  387.                                                                     href="javascript:void(0)"
  388.                                                                     data-id="documents"
  389.                                                                     class="navigate">
  390.                                                                 {{ data.event.agendaDocuments | length }}
  391.                                                                 </a><br />
  392.                                                             {% endif %}
  393.                                                             {% if data.event.backgroundDocs is not null and data.event.backgroundDocs | length >0 %}
  394.                                                                 Background Documents: <a
  395.                                                                     href="javascript:void(0)"
  396.                                                                     data-id="documents"
  397.                                                                     class="navigate">
  398.                                                                 {{ data.event.backgroundDocs | length }}
  399.                                                                 </a><br />
  400.                                                             {% endif %}
  401.                                                             {% if data.event.otherDocs is not null and data.event.otherDocs | length >0 %}
  402.                                                                 Other Documents: <a
  403.                                                                     href="javascript:void(0)"
  404.                                                                     data-id="documents"
  405.                                                                     class="navigate">
  406.                                                                 {{ data.event.otherDocs | length }}
  407.                                                                 </a><br />
  408.                                                             {% endif %}
  409.                                                             <div class="pull-right">
  410.                                                                 <a
  411.                                                                         href="javascript:void(0)"
  412.                                                                         data-id="documents"
  413.                                                                         class="navigate">
  414.                                                                     More...
  415.                                                                 </a>
  416.                                                             </div>
  417.                                                         </div>
  418.                                                     </div>
  419.                                                 </div>
  420.                                             {% endif %}
  421.                                         </div>
  422.                                         {% if data.user is defined and data.user.canSendEmail == 1 and data.event.people.participants | length > 0 %}
  423.                                             <div
  424.                                                     class="mail-btn">
  425.                                                 <button
  426.                                                         href="#compose-mail"
  427.                                                         data-toggle="modal"
  428.                                                         {% if data.event.details.status == 1 %}
  429.                                                         class="btn btn-primary"
  430.                                                         {% else %}
  431.                                                         class="btn btn-red"
  432.                                                         {% endif %}
  433.                                                         id="compose"
  434.                                                         style="">
  435.                                                     <i class="fa fa-envelope-o fa-fw"></i>
  436.                                                     Send an email to all confirmed participants of this event.
  437.                                                 </button>
  438.                                             </div>
  439.                                         {% endif %}
  440.                                         <br/>
  441.                                         {% if is_granted('ROLE_USER') %}
  442.                                         <a
  443.                                                 href="{{ path('download_event_participants_info',{idEvent: data.event.details.idEvent}) }}"
  444.                                                 target="_blank">
  445.                                             <button
  446.                                                     class="btn btn-primary"
  447.                                                     id="export"
  448.                                                     style="display: block;">
  449.                                                 <i class="fa fa-download fa-fw"></i>
  450.                                                 Export participants info as CSV
  451.                                             </button>
  452.                                         </a>
  453.                                         {% endif %}
  454.                                     </div>
  455.                                 {% endif %}
  456.                             </div>
  457.                             <!-- /.tab-pane -->
  458.                             <div class="tab-pane" id="agenda">
  459.                                 <div class="printable-links">
  460.                                     <a
  461.                                             href="{{ path('view_agenda_printable',{idEvent: data.event.details.idEvent}) }}">
  462.                                         [View a simple printable version of this agenda]
  463.                                     </a><br />
  464.                                     <a
  465.                                             href="{{ path('view_annonated_agenda_printable',{idEvent: data.event.details.idEvent}) }}">
  466.                                         [View an annotated printable version of this agenda]
  467.                                     </a>
  468.                                 </div>
  469.                                 <div
  470.                                         class="btn-group"
  471.                                         role="group"
  472.                                         id="nestable-menu">
  473.                                     <button
  474.                                             type="button"
  475.                                             class="btn btn-default"
  476.                                             data-action="expand-all">
  477.                                         Expand All
  478.                                     </button>
  479.                                     <button
  480.                                             type="button"
  481.                                             class="btn btn-default"
  482.                                             data-action="collapse-all">
  483.                                         Collapse All
  484.                                     </button>
  485.                                 </div>
  486.                                 <div class="dd dd-nodrag" id="nestable">
  487.                                     <ul class="dd-list dd-nodrag"></ul>
  488.                                 </div>
  489.                             </div>
  490.                             <!-- /.tab-pane -->
  491.                             <div class="tab-pane" id="documents">
  492.                                 {% if data.event.report|length >0 %}
  493.                                     <div class="box-header with-border">
  494.                                         <span class="event-heading">
  495.                                             Report
  496.                                         </span>
  497.                                         <div class="box-body">
  498.                                             <div class="box-body">
  499.                                                 <table
  500.                                                         class="table table-striped table-bordered dataTable dt-responsive wrap"
  501.                                                         style="width: 100%;">
  502.                                                     <thead>
  503.                                                     <tr>
  504.                                                         <th class="all">Code</th>
  505.                                                         <th>Name</th>
  506.                                                         <th>Updated on</th>
  507.                                                         <th class="all text-right">Action</th>
  508.                                                     </tr>
  509.                                                     </thead>
  510.                                                     <tbody>
  511.                                                     {% for document in data.event.report %}
  512.                                                         <tr>
  513.                                                             <td>{{ document.docCode }}</td>
  514.                                                             <td>
  515.                                                                 <a
  516.                                                                         href="/document/{{ document.idDoc }}"
  517.                                                                         class="view-document"
  518.                                                                         data-docid="{{ document.idDoc }}">
  519.                                                                     {{ document.title }}
  520.                                                                 </a>
  521.                                                             </td>
  522.                                                             <td>{{ document.updatedAt|date("d/m/Y") }}</td>
  523.                                                             <td>
  524.                                                                 <div class="btn-group pull-right">
  525.                                                                     <i
  526.                                                                             class="fa fa-download fa-2x download-document"
  527.                                                                             aria-hidden="true"
  528.                                                                             data-idDoc="{{ document.idDoc }}" >
  529.                                                                     </i>
  530.                                                                 </div>
  531.                                                             </td>
  532.                                                         </tr>
  533.                                                     {% endfor %}
  534.                                                     </tbody>
  535.                                                 </table>
  536.                                             </div>
  537.                                         </div>
  538.                                     </div>
  539.                                 {% endif %}
  540.                                 {% if data.event.eventPresentations|length >0 %}
  541.                                     <div class="box-header with-border">
  542.                                         <span class="event-heading">Presentation</span>
  543.                                         <div class="box-body">
  544.                                             <div class="box-body">
  545.                                                 <table
  546.                                                         class="table table-striped table-bordered dataTable dt-responsive wrap col5"
  547.                                                         style="width: 100%;">
  548.                                                     {% for i in ['thead', 'tfoot'] %}
  549.                                                     <{{ i }}>
  550.                                                         <tr>
  551.                                                             {#<th class="all">Select</th>#}
  552.                                                             <th>Agenda</th>
  553.                                                             <th class="all">Code</th>
  554.                                                             <th>Name</th>
  555.                                                             <th>Updated on</th>
  556.                                                             <th class="all text-right">Action</th>
  557.                                                         </tr>
  558.                                                     </{{ i }}>
  559.                                                     {% endfor %}
  560.                                                     <tbody>
  561.                                                     {% for document in data.event.eventPresentations %}
  562.                                                         <tr>
  563.                                                             <td>{{ document.idAgendaitem }}</td>
  564.                                                             <td>{{ document.docCode }}</td>
  565.                                                             <td>
  566.                                                                 <a
  567.                                                                         href="/document/{{ document.idDoc }}"
  568.                                                                         class="view-document"
  569.                                                                         data-docid="{{ document.idDoc }}">
  570.                                                                     {{ document.title }}
  571.                                                                 </a>
  572.                                                             </td>
  573.                                                             <td>{{ document.updatedAt|date("d/m/Y") }}</td>
  574.                                                             <td>
  575.                                                                 <div class="btn-group pull-right">
  576.                                                                     <i
  577.                                                                             class="fa fa-download fa-2x download-document"
  578.                                                                             aria-hidden="true"
  579.                                                                             data-idDoc="{{ document.idDoc }}" >
  580.                                                                     </i>
  581.                                                                 </div>
  582.                                                             </td>
  583.                                                         </tr>
  584.                                                     {% endfor %}
  585.                                                     </tbody>
  586.                                                 </table>
  587.                                             </div>
  588.                                         </div>
  589.                                     </div>
  590.                                 {% endif %}
  591.                                 {% if data.event.agendaDocuments|length >0 %}
  592.                                     <div class="box-header with-border">
  593.                                         <span class="event-heading">Agenda Documents</span>
  594.                                         <div class="box-body">
  595.                                             <table
  596.                                                     class="table table-striped table-bordered dataTable dt-responsive wrap col5"
  597.                                                     style="width: 100%;" >
  598.                                                 {% for i in ['thead', 'tfoot'] %}
  599.                                                 <{{ i }}>
  600.                                                 <tr>
  601.                                                     {#<th class="all">Select</th>#}
  602.                                                     <th>Agenda</th>
  603.                                                     <th class="all">Code</th>
  604.                                                     <th>Name</th>
  605.                                                     <th>Updated on</th>
  606.                                                     <th class="all text-right">Action</th>
  607.                                                 </tr>
  608.                                                 </{{ i }}>
  609.                                                 {% endfor %}
  610.                                                 <tbody>
  611.                                                 {% for document in data.event.agendaDocuments %}
  612.                                                     <tr>
  613.                                                         <td>{{ document.idAgendaitem }}</td>
  614.                                                         <td>{{ document.docCode }}</td>
  615.                                                         <td>
  616.                                                             <a
  617.                                                                     href="/document/{{ document.idDoc }}"
  618.                                                                     class="view-document"
  619.                                                                     data-docid="{{ document.idDoc }}">
  620.                                                                 {{ document.title }}
  621.                                                             </a>
  622.                                                         </td>
  623.                                                         <td>{{ document.updatedAt|date("d/m/y") }}</td>
  624.                                                         <td>
  625.                                                             <div class="btn-group pull-right">
  626.                                                                 <i
  627.                                                                         class="fa fa-download fa-2x download-document"
  628.                                                                         aria-hidden="true"
  629.                                                                         data-idDoc="{{ document.idDoc }}" >
  630.                                                                 </i>
  631.                                                             </div>
  632.                                                         </td>
  633.                                                     </tr>
  634.                                                 {% endfor %}
  635.                                                 </tbody>
  636.                                             </table>
  637.                                         </div>
  638.                                     </div>
  639.                                 {% endif %}
  640.                                 {% if data.event.backgroundDocs|length >0 %}
  641.                                     <div class="box-header with-border">
  642.                                         <span class="event-heading">Background Documents</span>
  643.                                         <div class="box-body">
  644.                                             <div class="box-body">
  645.                                                 <table
  646.                                                         class="table table-striped table-bordered dataTable dt-responsive wrap col5"
  647.                                                         style="width: 100%;">
  648.                                                     {% for i in ['thead', 'tfoot'] %}
  649.                                                     <{{ i }}>
  650.                                                     <tr>
  651.                                                         {#<th class="all">Select</th>#}
  652.                                                         <th>Agenda</th>
  653.                                                         <th class="all">Code</th>
  654.                                                         <th>Name</th>
  655.                                                         <th>Updated on</th>
  656.                                                         <th class="all text-right">Action</th>
  657.                                                     </tr>
  658.                                                 </{{ i }}>
  659.                                                 {% endfor %}
  660.                                                 <tbody>
  661.                                                 {% for document in data.event.backgroundDocs %}
  662.                                                     <tr>
  663.                                                         <td>{{ document.idAgendaitem }}</td>
  664.                                                         <td>{{ document.docCode }}</td>
  665.                                                         <td><a
  666.                                                                     href="/document/{{ document.idDoc }}"
  667.                                                                     class="view-document"
  668.                                                                     data-docid="{{ document.idDoc }}">
  669.                                                                 {{ document.title }}
  670.                                                             </a>
  671.                                                         </td>
  672.                                                         <td>{{ document.updatedAt|date("d/m/Y") }}</td>
  673.                                                         <td>
  674.                                                             <div class="btn-group pull-right">
  675.                                                                 <i
  676.                                                                         class="fa fa-download fa-2x download-document"
  677.                                                                         aria-hidden="true"
  678.                                                                         data-idDoc="{{ document.idDoc }}" >
  679.                                                                 </i>
  680.                                                             </div>
  681.                                                         </td>
  682.                                                     </tr>
  683.                                                 {% endfor %}
  684.                                                 </tbody>
  685.                                                 </table>
  686.                                             </div>
  687.                                         </div>
  688.                                     </div>
  689.                                 {% endif %}
  690.                                 {% if data.event.otherDocs|length >0 %}
  691.                                     <div class="box-header with-border">
  692.                                         <span class="event-heading">Other Documents</span>
  693.                                         <div class="box-body">
  694.                                             <div class="box-body">
  695.                                                 <table
  696.                                                         class="table table-striped table-bordered dataTable dt-responsive wrap col4"
  697.                                                         style="width: 100%;">
  698.                                                     {% for i in ['thead', 'tfoot'] %}
  699.                                                     <{{ i }}>
  700.                                                     <tr>
  701.                                                         {#<th class="all">Select</th>#}
  702.                                                         <th class="all">Code</th>
  703.                                                         <th>Name</th>
  704.                                                         <th>Updated on</th>
  705.                                                         <th class="all text-right">Action</th>
  706.                                                     </tr>
  707.                                                 </{{ i }}>
  708.                                                 {% endfor %}
  709.                                                 <tbody>
  710.                                                 {% for document in data.event.otherDocs %}
  711.                                                     <tr>
  712.                                                         <td>{{ document.docCode }}</td>
  713.                                                         <td>
  714.                                                             <a
  715.                                                                     href="/document/{{ document.idDoc }}"
  716.                                                                     class="view-document"
  717.                                                                     data-docid="{{ document.idDoc }}">
  718.                                                                 {{ document.title }}
  719.                                                             </a>
  720.                                                         </td>
  721.                                                         <td>{{ document.updatedAt|date("d/m/Y") }}</td>
  722.                                                         <td>
  723.                                                             <div class="btn-group pull-right">
  724.                                                                 <i
  725.                                                                         class="fa fa-download fa-2x download-document"
  726.                                                                         aria-hidden="true"
  727.                                                                         data-idDoc="{{ document.idDoc }}" >
  728.                                                                 </i>
  729.                                                             </div>
  730.                                                         </td>
  731.                                                     </tr>
  732.                                                 {% endfor %}
  733.                                                 </tbody>
  734.                                                 </table>
  735.                                             </div>
  736.                                         </div>
  737.                                     </div>
  738.                                 {% endif %}
  739.                             </div>
  740.                             <!-- /.tab-pane -->
  741.                             <div class="tab-pane" id="participants">
  742.                                 <p>
  743.                                     {% set totalParticipants = data.event.people.numberOfParticipants %}
  744.                                     {% set totalParticipants = totalParticipants + data.event.people.numberOfProvisional %}
  745.                                     {% set totalParticipants =totalParticipants + data.event.people.numberOfUnapproved %}
  746.                                     There
  747.                                     {% if totalParticipants != 1 %}
  748.                                         are
  749.                                     {% else %}
  750.                                         is
  751.                                     {% endif %}
  752.                                     {{ totalParticipants }}
  753.                                         participant{% if totalParticipants != 1 %}s{% endif%}
  754.                                     associated with <a
  755.                                             href="{{ path('view_event',{ 'event': data.event.details.idEvent} )}}">
  756.                                         {{ data.event.details.title }}
  757.                                     </a>
  758.                                     {% if data.event.people.numberOfProvisional > 0 %},
  759.                                         {{ data.event.people.numberOfProvisional }} of whom
  760.                                         {% if data.event.people.numberOfProvisional != 1 %}
  761.                                             are
  762.                                         {% else %}
  763.                                             is
  764.                                         {% endif %}
  765.                                         provisional
  766.                                     {% endif %}.
  767.                                 </p>
  768.                                 {% if is_granted('ROLE_USER') %}
  769.                                 <p>
  770.                                     <a
  771.                                             href="{{ path('view_printable_participants',{idEvent: data.event.details.idEvent}) }}">
  772.                                         <button
  773.                                                 class="btn btn-primary"
  774.                                                 id="viewPrintableParticipants"
  775.                                                 style="display: block;">
  776.                                             <i class="fa fa-eye fa-fw"></i>
  777.                                             View a printable participants list
  778.                                         </button>
  779.                                     </a>
  780.                                 </p>
  781.                                 <p>
  782.                                     <a
  783.                                             href="{{ path('download_event_participants_info',{idEvent: data.event.details.idEvent}) }}"
  784.                                             target="_blank">
  785.                                         <button
  786.                                                 class="btn btn-primary"
  787.                                                 id="export"
  788.                                                 style="display: block;">
  789.                                             <i class="fa fa-download fa-fw"></i>
  790.                                             Export participants info as CSV
  791.                                         </button>
  792.                                     </a>
  793.                                 </p>
  794.                                 {% endif %}
  795.                                 {% if data.event.people.participantsByRole | length > 0 %}
  796.                                     {% for role, participants in data.event.people.participantsByRole %}
  797.                                         {% if participants | length > 0 %}
  798.                                             <div class="box-header with-border">
  799.                                                 <span class="event-heading">{{ role }}</span>
  800.                                                 <div class="box-body">
  801.                                                     <table
  802.                                                             class="table table-striped table-bordered dataTable dt-responsive wrap
  803.                                                          {% if app.user %}
  804.                                                             col3
  805.                                                          {% else %}
  806.                                                             col2
  807.                                                          {% endif %}"
  808.                                                             style="width: 100%;" >
  809.                                                     {% for i in ['thead'] %}
  810.                                                         <{{ i }}>
  811.                                                             <tr>
  812.                                                                 <th
  813.                                                                         class="all"
  814.                                                                         style="width:100%;">
  815.                                                                     Name
  816.                                                                 </th>
  817.                                                                 <th>
  818.                                                                     Country
  819.                                                                 </th>
  820.                                                                 {% if app.user %}
  821.                                                                     <th>
  822.                                                                         Comments
  823.                                                                     </th>
  824.                                                                 {% endif %}
  825.                                                             </tr>
  826.                                                         </{{ i }}>
  827.                                                     {% endfor %}
  828.                                                     <tbody>
  829.                                                     {% for participant in participants %}
  830.                                                         {% set textClass = "" %}
  831.                                                         {% if participant.status == 0 %}
  832.                                                             {% set textClass = "text-green" %}
  833.                                                             {% set title = "Confirmed & Approved" %}
  834.                                                         {% elseif participant.status == 1 %}
  835.                                                             {% set textClass = "text-yellow" %}
  836.                                                             {% set title = "Need Confirmation" %}
  837.                                                         {% elseif participant.status == 2 %}
  838.                                                             {% set textClass = "text-grey" %}
  839.                                                             {% set title = "Need Approval" %}
  840.                                                         {% elseif participant.status == 3 %}
  841.                                                             {% set textClass = "text-red" %}
  842.                                                             {% set title = "Declined" %}
  843.                                                         {% elseif participant.status == 4 %}
  844.                                                             {% set textClass = "text-darkred" %}
  845.                                                             {% set title = "Rejected" %}
  846.                                                         {% endif %}
  847.                                                         <tr>
  848.                                                             <td>
  849.                                                                 <i
  850.                                                                         class="fa fa-user fa-2x fa-fw {{ textClass }} tipso"
  851.                                                                         aria-hidden="true"
  852.                                                                         title="{{ title }}">
  853.                                                                 </i>
  854.                                                                 <a
  855.                                                                         href="{{ path('view_profile', {'user': participant.idInd}) }}"
  856.                                                                         target="_blank">
  857.                                                                     {{ participant.sname | upper ~ ' ' ~ participant.fname }}
  858.                                                                 </a>
  859.                                                             </td>
  860.                                                             <td>
  861.                                                                 {{ participant.country }}
  862.                                                             </td>
  863.                                                             {% if app.user %}
  864.                                                                 <td>
  865.                                                                     {{ participant.accommodation }}
  866.                                                                 </td>
  867.                                                             {% endif %}
  868.                                                         </tr>
  869.                                                     {% endfor %}
  870.                                                     </tbody>
  871.                                                     </table>
  872.                                                 </div>
  873.                                             </div>
  874.                                         {% endif %}
  875.                                     {% endfor %}
  876.                                 {% endif %}
  877.                                 <div class="stats">
  878.                                     {% if data.event.people.numberOfParticipants > 0  %}
  879.                                         <i class="fa fa-user fa-2x fa-fw text-green" aria-hidden="true"></i>
  880.                                         = Person has confirmed their participation and been approved to participate.<br />
  881.                                     {% endif %}
  882.                                     {% if data.event.people.numberOfProvisional > 0 %}
  883.                                         <i class="fa fa-user fa-2x fa-fw text-yellow" aria-hidden="true"></i>
  884.                                         = Person has not yet confirmed their participation.<br />
  885.                                     {% endif %}
  886.                                     {% if data.event.people.numberOfUnapproved  > 0 %}
  887.                                         <i class="fa fa-user fa-2x fa-fw text-grey" aria-hidden="true"></i>
  888.                                         = Person has applied to participate but has not yet been approved.<br />
  889.                                     {% endif %}
  890.                                     {% if data.event.people.numberOfDeclined > 0 %}
  891.                                         <i class="fa fa-user fa-2x fa-fw text-red" aria-hidden="true"></i>
  892.                                         = Person has declined to participate or had their request to participate declined.<br />
  893.                                     {% endif %}
  894.                                     {% if data.event.people.numberOfRejected > 0 %}
  895.                                         <i class="fa fa-user fa-2x fa-fw text-darkred" aria-hidden="true"></i>
  896.                                         = Person had their request to participate declined.<br />
  897.                                     {% endif %}
  898.                                     Participant Stats:<br />
  899.                                     Total Invited: {{  data.event.people.participants|length }}<br />
  900.                                     {% if data.event.people.numberOfParticipants is defined %}
  901.                                         Confirmed: {{ data.event.people.numberOfParticipants }}<br />
  902.                                     {% endif %}
  903.                                     {% if data.event.people.numberOfProvisional is defined %}
  904.                                         Not confirmed: {{ data.event.people.numberOfProvisional }}<br />
  905.                                     {% endif %}
  906.                                     {% if data.event.people.numberOfUnapproved is defined %}
  907.                                         Unapproved: {{ data.event.people.numberOfUnapproved }}<br />
  908.                                     {% endif %}
  909.                                     {% if data.event.people.numberOfDeclined is defined %}
  910.                                         Not-participating: {{ data.event.people.numberOfDeclined }}<br />
  911.                                     {% endif %}
  912.                                     {% if data.event.people.numberOfRejected is defined %}
  913.                                         Rejected: {{ data.event.people.numberOfRejected }}<br />
  914.                                     {% endif %}
  915.                                 </div>
  916.                             </div>
  917.                             <!-- /.tab-pane -->
  918.                         </div>
  919.                         <!-- /.tab-content -->
  920.                     </div>
  921.                     <!-- /.nav-tabs-custom -->
  922.                     <div id='edited-by' class="pull-right italics text-right">
  923.                         Group(s):
  924.                         {% if data.event.eventGroups|length > 0 %}
  925.                             {% for group in data.event.eventGroups  %}
  926.                                 {% if loop.last %}
  927.                                 <a
  928.                                         href="{{ path('view_group',{groupId: group.idGroup}) }}">
  929.                                     {{ group.groupname }}.<br />
  930.                                 </a>
  931.                                 {% else %}
  932.                                 <a
  933.                                         href="{{ path('view_group',{groupId: group.idGroup}) }}">
  934.                                     {{ group.groupname }},
  935.                                 </a>
  936.                                 {% endif %}
  937.                             {% endfor %}
  938.                         {% else %}
  939.                             no groups<br />
  940.                         {% endif %}
  941.                         Label(s):
  942.                         {% if data.event.eventLabels|length > 0 %}
  943.                             {% for label in data.event.eventLabels %}
  944.                                 {{ label.groupname ~ " " ~  label.labelType }}
  945.                                 {% if loop.last %}
  946.                                     <br />
  947.                                 {% else %}
  948.                                     ,
  949.                                 {% endif %}
  950.                             {% endfor %}
  951.                         {% else %}
  952.                             no labels<br />
  953.                         {% endif %}
  954.                         {% if data.event.eventEdits.createdBy is defined %}
  955.                             Created
  956.                             {% if data.event.eventEdits.createdAt is defined %}
  957.                                 at {{ data.event.eventEdits.createdAt | date('H:i') ~' on '~ data.event.eventEdits.createdAt | date('d M Y') }}
  958.                             {% endif %}
  959.                             by <a
  960.                                     href="{{ path('view_profile',{user: data.event.eventEdits.createdId}) }}">
  961.                                 {{ data.event.eventEdits.createdBy }}
  962.                             </a>
  963.                             <br />
  964.                         {% endif %}
  965.                         {% if data.event.eventEdits.lastEditBy is defined %}
  966.                             Last Updated
  967.                             {% if data.event.eventEdits.lastEditAt is defined %}
  968.                                 at {{ data.event.eventEdits.lastEditAt | date('H:i') ~' on '~ data.event.eventEdits.lastEditAt | date('d M Y') }}
  969.                             {% endif %}
  970.                             by <a
  971.                                     href="{{ path('view_profile',{user: data.event.eventEdits.lastEditId}) }}">
  972.                                 {{ data.event.eventEdits.lastEditBy }}
  973.                             </a>
  974.                             <br />
  975.                         {% endif %}
  976.                     </div>
  977.                 </div>
  978.                 <!-- /.col -->
  979.             </div>
  980.             <!-- /.row -->
  981.         </section>
  982.     </div>
  983.     {% if app.user  %}
  984.         <div
  985.                 aria-hidden="true"
  986.                 aria-labelledby="compose-mail"
  987.                 role="dialog"
  988.                 tabindex="-1"
  989.                 id="compose-mail"
  990.                 class="modal fade"
  991.                 style="display: none;">
  992.             <div class="modal-dialog modal-email modal-lg">
  993.                 <div class="modal-content">
  994.                     <div class="modal-header">
  995.                         <button
  996.                                 aria-hidden="true"
  997.                                 data-dismiss="modal"
  998.                                 class="close"
  999.                                 type="button">
  1000.                             Ã—
  1001.                         </button>
  1002.                         <h4 class="modal-title">Compose Mail</h4>
  1003.                     </div>
  1004.                     {% if data.event.details.status == 1 %}
  1005.                     <div class="modal-body">
  1006.                         <div role="form" class="form-horizontal">
  1007.                             <div class="form-group">
  1008.                                 <label class="col-lg-2 control-label">Sender</label>
  1009.                                 <div class="col-lg-10">
  1010.                                     {% if file_exists(web_path~asset('uploads/profile/profile_'~app.user.id~'.png')) %}
  1011.                                         <img
  1012.                                                 src="{{ asset('uploads/profile/profile_'~app.user.id~'.png') }}"
  1013.                                                 alt="user profile image"
  1014.                                                 class="profile-img-sm img-circle"/>
  1015.                                     {% endif %}
  1016.                                     <label class="control-label">
  1017.                                         {{ data.user.fname~' '~data.user.sname }} &lt;{{ app.user.email }}&gt;<br />
  1018.                                         <div class="checkbox">
  1019.                                             <label class="no-padding" for="selfEmail">
  1020.                                                 <input
  1021.                                                         type="checkbox"
  1022.                                                         value=""
  1023.                                                         id="selfEmail" />
  1024.                                                 <span class="cr">
  1025.                                                     <i class="cr-icon glyphicon glyphicon-ok"></i>
  1026.                                                 </span>
  1027.                                                 Send a copy of this message to me too
  1028.                                             </label>
  1029.                                         </div>
  1030.                                     </label>
  1031.                                 </div>
  1032.                             </div>
  1033.                             <div class="form-group">
  1034.                                 <label class="col-lg-2 control-label">Recipients</label>
  1035.                                 <div class="col-lg-10">
  1036.                                     <label class="">
  1037.                                         All people involved in the event: {{ data.event.details.title }}
  1038.                                     </label>
  1039.                                     <br />({{ data.event.people.total }} recipient)
  1040.                                 </div>
  1041.                             </div>
  1042.                             <div class="form-group">
  1043.                                 <label class="col-lg-2 control-label" for="subject">Subject</label>
  1044.                                 <div class="col-lg-10">
  1045.                                     <input
  1046.                                             type="text"
  1047.                                             placeholder=""
  1048.                                             id="subject"
  1049.                                             name="subject"
  1050.                                             class="form-control" />
  1051.                                 </div>
  1052.                             </div>
  1053.                             <div class="form-group">
  1054.                                 <label class="col-lg-2 control-label" for="message">Message</label>
  1055.                                 <div class="col-lg-10">
  1056.                                     <textarea
  1057.                                             rows="10"
  1058.                                             cols="30"
  1059.                                             class="form-control textarea"
  1060.                                             id="message"
  1061.                                             name="message">
  1062.                                     </textarea>
  1063.                                 </div>
  1064.                             </div>
  1065.                             <div class="form-group">
  1066.                                 <label class="col-lg-2 control-label" for="info"></label>
  1067.                                 <div class="col-lg-10">
  1068.                                     <div style="margin-top:5px">
  1069.                                         <div class="infoHidden">
  1070.                                             <a
  1071.                                                     class="showInfo"
  1072.                                                     href="javascript:void(0)">
  1073.                                                 [Info on inserting names]
  1074.                                             </a>
  1075.                                         </div>
  1076.                                         <div class="infoShown">
  1077.                                             <a
  1078.                                                     class="hideInfo"
  1079.                                                     href="javascript:void(0)"
  1080.                                                     style="float:right">
  1081.                                                 [Hide]
  1082.                                             </a>
  1083.                                             If you include these special words in your message, they will be replaced:
  1084.                                             <br /><br />
  1085.                                             <div class="table-responsive">
  1086.                                                 <table class="table table-condensed">
  1087.                                                     <tbody>
  1088.                                                         <tr>
  1089.                                                             <td>_FULLNAME_</td>
  1090.                                                             <td>Recipient name (first name &amp; surname)</td>
  1091.                                                         </tr>
  1092.                                                         <tr>
  1093.                                                             <td>_FNAME_</td>
  1094.                                                             <td>Recipient first name</td>
  1095.                                                         </tr>
  1096.                                                         <tr>
  1097.                                                             <td>_SNAME_</td>
  1098.                                                             <td>Recipient surname</td>
  1099.                                                         </tr>
  1100.                                                         <tr>
  1101.                                                             <td>_TITLE_</td>
  1102.                                                             <td>Recipient title</td>
  1103.                                                         </tr>
  1104.                                                     </tbody>
  1105.                                                 </table>
  1106.                                             </div>
  1107.                                         </div>
  1108.                                     </div>
  1109.                                 </div>
  1110.                             </div>
  1111.                             <div class="form-group">
  1112.                                 <div class="col-lg-offset-2 col-lg-10">
  1113.                                     <div class="fileUpload">
  1114.                                         <form
  1115.                                                 action="{{ path('upload_email_attachments') }}"
  1116.                                                 class="dropzone"
  1117.                                                 id="myAwesomeDropzone">
  1118.                                         </form>
  1119.                                     </div>
  1120.                                 </div>
  1121.                             </div>
  1122.                             <div class="form-group">
  1123.                                 <div class="col-lg-offset-2 col-lg-10">
  1124.                                     <div class="btn-toolbar pull-right ">
  1125.                                         <button
  1126.                                                 class="btn btn-send btn-danger"
  1127.                                                 id="closeModal"
  1128.                                                 data-dismiss="modal">
  1129.                                             <i class="fa fa-times-circle"></i>
  1130.                                             Close
  1131.                                         </button>
  1132.                                         <button
  1133.                                                 class="btn btn-send btn-primary"
  1134.                                                 id="sendmail">
  1135.                                             Send
  1136.                                             <i class="fa fa-envelope-o"></i>
  1137.                                         </button>
  1138.                                     </div>
  1139.                                 </div>
  1140.                             </div>
  1141.                         </div>
  1142.                     </div>
  1143.                     {% else %}
  1144.                         <h3 class="col-lg-offset-2">
  1145.                             <i class="fa error fa-warning">&nbsp;Event is not activated yet.</i>
  1146.                         </h3>
  1147.                         <p class="col-lg-offset-2">
  1148.                             This event is not yet activated. <br>
  1149.                             You can only send emails to participants once the event is activated.<br><br>
  1150.                         </p>
  1151.                     {% endif %}
  1152.                 </div><!-- /.modal-content -->
  1153.             </div><!-- /.modal-dialog -->
  1154.         </div><!-- /.modal -->
  1155.     {% endif %}
  1156.     <div
  1157.             class="modal fade"
  1158.             id="modal-edit"
  1159.             tabindex="-1"
  1160.             role="dialog"
  1161.             aria-labelledby="myModalLabel"
  1162.             aria-hidden="true">
  1163.         <div class="modal-dialog modal-lg">
  1164.             <div class="modal-content">
  1165.                 <div class="modal-header">
  1166.                     <h3 class="modal-title">
  1167.                         Document Details
  1168.                     </h3>
  1169.                 </div>
  1170.                 <div class="modal-body">
  1171.                 </div>
  1172.                 <div class="modal-footer">
  1173.                     <button
  1174.                             type="button"
  1175.                             class="btn btn-danger"
  1176.                             data-dismiss="modal">
  1177.                         Close
  1178.                     </button>
  1179.                 </div>
  1180.             </div>
  1181.         </div>
  1182.     </div>
  1183.     {% include 'footer.html.twig' %}
  1184.     <script src="{{ asset('js/bootstrap-datepicker.js') }}" type="text/javascript"></script>
  1185.     <script src="{{ asset('js/tipped.js') }}" type="text/javascript"></script>
  1186.     <script src="{{ asset('js/jquery.nestable.js') }}"></script>
  1187.     <script src="{{ asset('js/handlebars.min.js') }}" type="text/javascript"></script>
  1188.     <script src="{{ asset('js/jquery.dataTables.min.js') }}"></script>
  1189.     <script src="{{ asset('js/dataTables.bootstrap.min.js') }}"></script>
  1190.     <script src="{{ asset('js/dataTables.responsive.min.js') }}"></script>
  1191.     <script src="{{ asset('js/moment.min.js') }}" type="text/javascript"></script>
  1192.     <script src="{{ asset('js/datetime-moment.js') }}" type="text/javascript"></script>
  1193.     <script src="{{ asset('js/bootstrap-dialog.js') }}" type="text/javascript"></script>
  1194.     <script src="{{ asset('js/tipso.min.js') }}" type="text/javascript"></script>
  1195.     <script src="{{ asset('js/bootstrap-tooltip.js') }}" type="text/javascript"></script>
  1196.     <script src="{{ asset('js/bootstrap-confirmation.js') }}" type="text/javascript"></script>
  1197.     <script src="{{ asset('js/tinymce.min.js') }}" type="text/javascript"></script>
  1198.     <script type="text/javascript">
  1199.         var removeEmailAttachments = '{{ path('remove_email_attachments') }}';
  1200.         var getDocumentById = "{{ path('get_document_by_id') }}";
  1201.         var eventStatusChange = "{{ path('event_status_change') }}";
  1202.         var documentDownloadBlock = "{{ path('document_download_block') }}";
  1203.     </script>
  1204.     <script src="{{ asset('js/dropzone.js') }}" type="text/javascript"></script>
  1205.     <script src="{{ asset('js/event-view.js') }}" type="text/javascript"></script>
  1206.     <script type="text/javascript">
  1207.         {% if data.event.agenda != "" %}
  1208.         var obj ='{{ data.event.agenda|raw|escape('js') }}';
  1209.         //console.log(obj);
  1210.         //console.log(obj.status);
  1211.         //we still need a json.parse here, we do not get a json object but json string!!!
  1212.         const checkObj = JSON.parse(obj);
  1213.         //set the top nav menu style
  1214.         $(".event").addClass('navactive');
  1215.         Tipped.create('.tipso', {maxWidth: 250});
  1216.         function buildItem(items) {
  1217.             var html ="";
  1218.             $.each(items, function (index, item) {
  1219.                 html += "<li class='dd-item' data-id='" + item.id + "' id='" + item.id + "'>";
  1220.                 html += "<div class='dd-handle'><span class='group-name dd-nodrag'>"
  1221.                     + item.idAgendaitem + ' - ' + item.title ;
  1222.                 if(item.notes.length>0){
  1223.                     html += "<br /><strong>" +item.notes + "</strong>";
  1224.                 }
  1225.                 if(item.requiredActions.length>0){
  1226.                     html += " <u>" + item.requiredActions + "</u>";
  1227.                 }
  1228.                 if(item.documents.length>0){
  1229.                     $.each(item.documents,function (key, documentfile) {
  1230.                         html += "<br />" +
  1231.                             "<i class='fa fa-file' aria-hidden='true'></i> " +
  1232.                             "<a " +
  1233.                             "       href='javascript:void(0)' " +
  1234.                             "       class='view-document' " +
  1235.                             "       data-docid='" + documentfile.idDoc + "'>" +
  1236.                                 documentfile.docCode + " " + documentfile.doctitle +
  1237.                             "</a>";
  1238.                     })
  1239.                 }
  1240.                 html += "</span>" +
  1241.                     "</div>";
  1242.                 if (item.children) {
  1243.                     html += "<ol class='dd-list'>";
  1244.                     html += buildItem(item.children);
  1245.                     html += "</ol>";
  1246.                 }
  1247.                 html += "</li>";
  1248.             });
  1249.             return html;
  1250.         }
  1251.         //check if we got an error message (with status = 0)
  1252.         if (checkObj["status"] != 0) {
  1253.             $.each(JSON.parse(obj), function (index, item) {
  1254.                 $('#nestable ul').append(buildItem(item));
  1255.                 Tipped.create('.tipso', {maxWidth: 250});
  1256.             });
  1257.         }
  1258.         $("#nestable").nestable();
  1259.         $('.dd').nestable('collapseAll');
  1260.         $(".dd-nodrag").on("mousedown", function(event) {
  1261.             // mousedown prevent nestable click
  1262.             event.preventDefault();
  1263.             return false;
  1264.         });
  1265.         {% endif %}
  1266.         //console.log(obj);
  1267.         //console.log(JSON.parse(obj).status);
  1268.         var participants = $(".col3").DataTable({
  1269.             "oLanguage": {
  1270.                 "sInfo": "Showing _START_ to _END_ of _TOTAL_ Participants",
  1271.                 "sInfoEmpty": "Showing 0 to 0 of 0 Participant"
  1272.             },
  1273.             "responsive": {
  1274.                 details: {
  1275.                     type: "column"
  1276.                 }
  1277.             },
  1278.             "colReorder": true,
  1279.             "bPaginate": true,
  1280.             "bLengthChange": true,
  1281.             "bFilter": true,
  1282.             "bInfo": true,
  1283.             "bAutoWidth": true,
  1284.             "hash":true,
  1285.             "columns": [
  1286.                 { "width": "40%" },
  1287.                 { "width": "20%" },
  1288.                 { "width": "30%" }
  1289.             ],
  1290.             "aaSorting": [],
  1291.             //aLengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
  1292.             aLengthMenu: [[50, 75, 100, -1], [50, 75, 100, "All"]],
  1293.         });
  1294.         var participants2col = $(".col2").DataTable({
  1295.             "oLanguage": {
  1296.                 "sInfo": "Showing _START_ to _END_ of _TOTAL_ Participants",
  1297.                 "sInfoEmpty": "Showing 0 to 0 of 0 Participant"
  1298.             },
  1299.             "responsive": {
  1300.                 details: {
  1301.                     type: "column"
  1302.                 }
  1303.             },
  1304.             "colReorder": true,
  1305.             "bPaginate": true,
  1306.             "bLengthChange": true,
  1307.             "bFilter": true,
  1308.             "bInfo": true,
  1309.             "bAutoWidth": true,
  1310.             "hash":true,
  1311.             "columns": [
  1312.                 { "width": "40%" },
  1313.                 { "width": "20%" }
  1314.             ],
  1315.             "aaSorting": [],
  1316.             //aLengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
  1317.             aLengthMenu: [[50, 75, 100, -1], [50, 75, 100, "All"]],
  1318.         });
  1319.         $.fn.dataTable.moment( 'DD/MM/YY' );
  1320.         var col4 = $(".col4").DataTable({
  1321.             "oLanguage": {
  1322.                 "sInfo": "Showing _START_ to _END_ of _TOTAL_ Documents",
  1323.                 "sInfoEmpty": "Showing 0 to 0 of 0 Document"
  1324.             },
  1325.             "responsive": {
  1326.                 details: {
  1327.                     type: "column"
  1328.                 }
  1329.             },
  1330.             "colReorder": true,
  1331.             "bPaginate": true,
  1332.             "bLengthChange": true,
  1333.             "bFilter": true,
  1334.             "bInfo": true,
  1335.             "bAutoWidth": true,
  1336.             "hash":true,
  1337.             "columns": [
  1338.                 {"width": "20%" },
  1339.                 { "width": "40%" },
  1340.                 { "width": "20%" },
  1341.                 { "width": "10%" }
  1342.             ],
  1343.             order: [[ 1, "desc" ]],
  1344.             //aLengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
  1345.             aLengthMenu: [[50, 75, 100, -1], [50, 75, 100, "All"]],
  1346.         });
  1347.         var col5 = $(".col5").DataTable({
  1348.             "oLanguage": {
  1349.                 "sInfo": "Showing _START_ to _END_ of _TOTAL_ Documents",
  1350.                 "sInfoEmpty": "Showing 0 to 0 of 0 Document"
  1351.             },
  1352.             "responsive": {
  1353.                 details: {
  1354.                     type: "column"
  1355.                 }
  1356.             },
  1357.             "colReorder": true,
  1358.             "bPaginate": true,
  1359.             "bLengthChange": true,
  1360.             "bFilter": true,
  1361.             "bInfo": true,
  1362.             "bAutoWidth": true,
  1363.             "hash":true,
  1364.             "columns": [
  1365.                 {"width": "15%" },
  1366.                 { "width": "15%" },
  1367.                 { "width": "40%" },
  1368.                 { "width": "15%" },
  1369.                 { "width": "15%" }
  1370.             ],
  1371.             order: [[ 0, "asc" ]],
  1372.             //aLengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
  1373.             aLengthMenu: [[50, 75, 100, -1], [50, 75, 100, "All"]],
  1374.         });
  1375.         tinymce.init(
  1376.             {
  1377.                 selector: 'textarea',
  1378.                 plugins: [
  1379.                     "advlist autolink lists link image charmap print preview anchor",
  1380.                     "searchreplace visualblocks code fullscreen",
  1381.                     "insertdatetime media table contextmenu paste imagetools powerpaste"
  1382.                 ],
  1383.                 toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
  1384.                 powerpaste_allow_local_images: true,
  1385.                 powerpaste_word_import: 'prompt',
  1386.                 powerpaste_html_import: 'prompt',
  1387.                 branding: false,
  1388.                 relative_urls: false,
  1389.                 convert_urls: false,
  1390.                 forced_root_block : false
  1391.             }
  1392.         );
  1393.         $(document).on(
  1394.             'focusin',
  1395.             function(e)
  1396.             {
  1397.                 if ($(e.target).closest(".mce-window").length) {
  1398.                     e.stopImmediatePropagation();
  1399.                 }
  1400.             }
  1401.         );
  1402.         // Javascript to enable link to tab
  1403.         if (window.location.hash != "") {
  1404.             $('a[href="' + window.location.hash + '"]').click()
  1405.             $(window).scrollTop(0);
  1406.         }
  1407.         $('.nav-tabs a').on(
  1408.             'shown.bs.tab',
  1409.             function (e)
  1410.             {
  1411.                 window.location.hash = e.target.hash;
  1412.                 $(window).scrollTop(0);
  1413.             }
  1414.         );
  1415.         $("body").on(
  1416.             "click",
  1417.             ".navigate",
  1418.             function (event)
  1419.             {
  1420.                 var id = $(this).data("id");
  1421.                 $(".nav-tabs a[href='#" + id + "']").tab("show");
  1422.             }
  1423.         );
  1424.         Dropzone.options.myAwesomeDropzone =
  1425.         {
  1426.             init: function()
  1427.                 {
  1428.                     this.on('success', function(file, response) {
  1429.                         $("#message").after($('<input type="hidden" name="file[]" class="file" value="' + response + '">'));
  1430.                     });
  1431.                     this.on('queuecomplete', function()
  1432.                         {
  1433.                             // Invoked when all files finished uploading
  1434.                             // Now just submit the form. It will send the filenames along since
  1435.                             // they are added as hidden input fields.
  1436.                         }
  1437.                     );
  1438.                     this.on('removedfile', function (file, response)
  1439.                         {
  1440.                             $('.file:input[value="'+file.fid+'"]').remove();
  1441.                         }
  1442.                     );
  1443.                 },
  1444.             maxFilesize: 10,
  1445.             maxFiles: 15,
  1446.             accept: function(file, done)
  1447.                 {
  1448.                     var thumbnail = $('.dropzone').find(".dz-preview:last");
  1449.                     thumbnail.removeClass('dz-file-preview').addClass('dz-image-preview');
  1450.                     switch (file.type) {
  1451.                         case 'application/pdf':
  1452.                             thumbnail.find('img').attr('src','{{ asset("img/pdf-icon.png") }}');
  1453.                             break;
  1454.                         case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
  1455.                             thumbnail.find('img').attr('src','{{ asset("img/word-icon.png") }}');
  1456.                             break;
  1457.                         case 'application/vnd.ms-excel':
  1458.                             thumbnail.find('img').attr('src','{{ asset("img/excel-icon.png") }}');
  1459.                             break;
  1460.                         case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
  1461.                             thumbnail.find('img').attr('src','{{ asset("img/excel-icon.png") }}');
  1462.                             break;
  1463.                         case 'application/vnd.ms-powerpoint':
  1464.                             thumbnail.find('img').attr('src','{{ asset("img/PowerPoint-icon.png") }}');
  1465.                             break;
  1466.                         case 'application/application/zip, application/octet-stream':
  1467.                             thumbnail.find('img').attr('src','{{ asset("img/zip-icon.jpg") }}');
  1468.                             break;
  1469.                         case 'text/csv':
  1470.                             thumbnail.find('img').attr('src','{{ asset("img/csv-icon.jpg") }}');
  1471.                             break;
  1472.                         case 'text/plain':
  1473.                             thumbnail.find('img').attr('src','{{ asset("img/txt-icon.png") }}');
  1474.                             break;
  1475.                         case 'application/zip':
  1476.                             thumbnail.find('img').attr('src','{{ asset("img/zip-icon.jpg") }}');
  1477.                             break;
  1478.                     }
  1479.                     done();
  1480.                 },
  1481.         };
  1482.         $("#sendmail").click(
  1483.             function ()
  1484.             {
  1485.                 $this = $(this);
  1486.                 var subject = $("#subject").val();
  1487.                 var message = tinyMCE.get('message').getContent();
  1488.                 selfEmail = $("#selfEmail").is(":checked");
  1489.                 var file = $('input:hidden.file').serialize();
  1490.                 if ($.trim(subject) === "") {
  1491.                     $("#subject").parents('.form-group').addClass('has-error');
  1492.                     errorsubject = true;
  1493.                 } else {
  1494.                     $("#subject").parents('.form-group').removeClass('has-error');
  1495.                     errorsubject = false;
  1496.                 }
  1497.                 if ($.trim(message) === "") {
  1498.                     $("#message").parents('.form-group').addClass('has-error');
  1499.                     $("#message").siblings(".mce-tinymce").css('border-color','red');
  1500.                     errormessage = true;
  1501.                 } else {
  1502.                     $("#message").parents('.form-group').removeClass('has-error');
  1503.                     $("#message").siblings(".mce-tinymce").css('border-color','rgb(210, 214, 222)');
  1504.                     errormessage = false;
  1505.                 }
  1506.                 {% if app.user.id is defined %}
  1507.                 if (!errormessage && !errorsubject) {
  1508.                     $this.prop("disabled",true);
  1509.                     $this.html("<i class='fa fa-spin fa-cog'></i> Sending</button>");
  1510.                     $.ajax({
  1511.                         url: "{{ path('email_queue') }}",
  1512.                         data:{
  1513.                             userid: "{{ app.user.id }}",
  1514.                             eventid: "{{ data.event.details.idEvent }}",
  1515.                             email: "{{ app.user.email }}",
  1516.                             selfmail: selfEmail,
  1517.                             subject: subject,
  1518.                             message: message,
  1519.                             file: file,
  1520.                             searchstring: window.location.href
  1521.                         },
  1522.                         type: "POST",
  1523.                         success:function (response) {
  1524.                             $this.html("Send <i class='fa fa-envelope-o'></i>");
  1525.                             $(".dz-default.dz-message").css("opacity",1);
  1526.                             $("#selfEmail").prop("checked",false);
  1527.                             $("#subject").val("");
  1528.                             tinymce.get("message").setContent('');
  1529.                             $('div.dz-success').remove();
  1530.                             $("#message").siblings(".file").remove();
  1531.                             $this.prop("disabled",false);
  1532.                             $("#compose-mail").modal("hide");
  1533.                             if (response.status === 0) {
  1534.                                 BootstrapDialog.alert({
  1535.                                     title: 'Email Received Successfully.',
  1536.                                     message: 'Your email is successfully received. It will now be queued and sent out to the recipients shortly.',
  1537.                                     type: BootstrapDialog.TYPE_SUCCESS,
  1538.                                     closable: false,
  1539.                                     draggable: false,
  1540.                                     buttonLabel: 'OK',
  1541.                                 });
  1542.                             } else {
  1543.                                 let message = 'There was an error sending your email. Please try again later.<br />';
  1544.                                 message += response.error + '<br />';
  1545.                                 message += response.returnMessage;
  1546.                                 BootstrapDialog.alert({
  1547.                                     title: 'Email Not Sent.',
  1548.                                     message: message,
  1549.                                     type: BootstrapDialog.TYPE_DANGER,
  1550.                                     closable: false,
  1551.                                     draggable: false,
  1552.                                     buttonLabel: 'OK',
  1553.                                 });
  1554.                             }
  1555.                         }
  1556.                     });
  1557.                 }
  1558.                 {% endif %}
  1559.             }
  1560.         );
  1561.         $("body").on(
  1562.             "click",
  1563.             ".view-document",
  1564.             function ()
  1565.             {
  1566.                 var $this = $(this);
  1567.                 var $modal = $("#modal-edit")
  1568.                 var idDoc = $this.data("docid");
  1569.                 //var doctype = $this.data("doctype");
  1570.                 $modal.find(".modal-header").html("<h3 class='modal-title'>Document Details</h3>");
  1571.                 $modal.children("modal-dialog").addClass("modal-lg");
  1572.                 $modal.find(".modal-footer").html("<button type='button' class='btn btn-danger' data-dismiss='modal'>Close</button>");
  1573.                 $modal.find(".modal-body").html("");
  1574.                 $modal.modal("show");
  1575.                 $.ajax({
  1576.                     url: getDocumentById,
  1577.                     type: "GET",
  1578.                     data: {idDoc: idDoc},
  1579.                 })
  1580.                     .done(function(data) {
  1581.                         $modal.find(".modal-body").html(data);
  1582.                     });
  1583.             }
  1584.         );
  1585.         $("body").on(
  1586.             "click",
  1587.             ".eventAction",
  1588.             function ()
  1589.             {
  1590.                 $this = $(this);
  1591.                 $this.html("<i class='fa fa-cog fa-spin fa-fw' aria-hidden='true'></i> Please wait...");
  1592.                 var eventStatus = $this.data("status");
  1593.                 $.ajax({
  1594.                     url: eventStatusChange,
  1595.                     type: "POST",
  1596.                     data: {idEvent: {{ data.event.details.idEvent}}, eventStatus: eventStatus},
  1597.                 }).done(function (response) {
  1598.                     console.log(response);
  1599.                     if(response.status == 1){
  1600.                         switch (response.eStatus){
  1601.                             case "0":
  1602.                                 $this.replaceWith("<button " +
  1603.                                     "class='btn btn-success eventAction' " +
  1604.                                     "data-status='1'>" +
  1605.                                     "<i class='fa fa-check fa-fw' aria-hidden='true'></i> " +
  1606.                                     "Activate" +
  1607.                                     "</button>");
  1608.                                 break;
  1609.                             case "1":
  1610.                                 $this.replaceWith("<button " +
  1611.                                     "class='btn btn-danger eventAction' " +
  1612.                                     "data-status='0'>" +
  1613.                                     "<i class='fa fa-ban fa-fw' aria-hidden='true'></i> " +
  1614.                                     "Deactivate" +
  1615.                                     "</button>");
  1616.                                 break;
  1617.                             case "2":
  1618.                                 $this.replaceWith("<button " +
  1619.                                     "class='btn btn-warning eventAction' " +
  1620.                                     "data-status=3'>" +
  1621.                                     "<i class='fa fa-times fa-fw' aria-hidden='true'></i> " +
  1622.                                     "Delete" +
  1623.                                     "</button>");
  1624.                                 break;
  1625.                             case "3":
  1626.                                 $this.replaceWith("<button " +
  1627.                                     "class='btn btn-success eventAction' " +
  1628.                                     "data-status='0'>" +
  1629.                                     "<i class='fa fa-check fa-fw aria-hidden=true'></i> " +
  1630.                                     "Undelete" +
  1631.                                     "</button>");
  1632.                                 break;
  1633.                         }
  1634.                     }
  1635.                 });
  1636.             }
  1637.         );
  1638.         $('#nestable-menu').on(
  1639.             'click',
  1640.             function(e)
  1641.             {
  1642.                 var target = $(e.target),
  1643.                     action = target.data('action');
  1644.                 if (action === 'expand-all') {
  1645.                     $('.dd').nestable('expandAll');
  1646.                 }
  1647.                 if (action === 'collapse-all') {
  1648.                     $('.dd').nestable('collapseAll');
  1649.                 }
  1650.             }
  1651.         );
  1652.         $(document).ready(
  1653.             function()
  1654.             {
  1655.                 $('[class=showInfo]').on('click', function(){
  1656.                     $(document).find('[class=infoHidden]').hide();
  1657.                     $(document).find('[class=infoShown]').show();
  1658.                     return false;
  1659.                 });
  1660.                 $('[class=hideInfo]').on('click', function(){
  1661.                     $(document).find('[class=infoHidden]').show();
  1662.                     $(document).find('[class=infoShown]').hide();
  1663.                     return false;
  1664.                 });
  1665.             }
  1666.         );
  1667.     </script>
  1668. {% endblock %}