<commit_before>{% extends "base.html" %}

{% load staticfiles %}
{% load config_tags %}

{% block styles %}
  {{ block.super }}
  <link rel="stylesheet" type="text/css" href="{% static 'css/map.css' %}">
{% endblock %}

{% block scripts %}
  {{ block.super }}
  <script src="https://maps.googleapis.com/maps/api/js?key={{ GOOGLE_API_KEY }}&sensor=false&language=uk"></script>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
  <script src="{% static 'js/map.js' %}"></script>
  <script>
    mapApp.constant('urls', {
      events: "{% url 'api_dispatch_list' resource_name='events' api_name='v1' %}",
      eventupdates: "{% url 'api_dispatch_list' resource_name='eventupdates' api_name='v1' %}",
      operatorAddEventUpdate: "{% url 'events:operator_add_eventupdate' %}",
    });
    mapApp.constant('mapSettings', {
        highlight: {% if newevent_highlight %}true{% else %}false{% endif %},
        sound: {% if newevent_sound %}true{% else %}false{% endif %},
        wakeup_interval: {{ wakeup_interval }},
    });
  </script>
{% endblock %}

{% block content %}
<audio id="audiotag" src="{% static 'audio/beep.mp3' %}" preload="auto"></audio>

  <div class="page-header">
    {% include "account/login_button_block.html" %}
    <h3>Events map</h3>
  </div>
  <div class="row">
    <div class="col-md-12">
      {% verbatim %}
      <div ng-app="mapApp">
        <div ng-controller="EventListCtrl">
          <event-marker click="select(event)"
                        ng-repeat="event in events"
                        ng-if="event.id != selectedEvent.id">
            <div>
              <p ng-if="event.user.full_name != null">
                <span class="glyphicon glyphicon-exclamation-sign"
                      ng-if="event.type == 'victim'"></span>
                <span class="glyphicon glyphicon-user"
                      ng-if="event.type == 'support'"></span>
                      {{ event.user.full_name }}
              </p>
              <span class="badge">{{ event.latest_update.timestamp | date:'HH:mm' }}</span>
              {{ event.latest_update.text || "..." }}
            </div>
          </event-marker>
          <div class="selected-event panel panel-primary"
               ng-if="selectedEvent != null">
            <h4 class="panel-heading">Status:
              <span class="label label-danger"
                    ng-if="selectedEvent.status == 'A'">active</span>
              <span class="label label-primary"
                    ng-if="selectedEvent.status == 'P'">passive</span>
              <span class="label label-default"
                    ng-if="selectedEvent.status == 'F'">finished</span>
              <button type="button" class="close"
                      ng-click="select(null)">&times;</button>
            </h4>
            <div class="panel-body">
              <div class="list-group">
                <div class="list-group-item">
                  <p>Add event update</p>
                  <input id="input-text-update" class="form-control input-sm" type="text" placeholder="Text" 
                         ng-model="fields.addEventUpdateText"
                         ng-keydown="ctrlEnter($event)"/>
                  <button class="btn btn-primary btn-sm button-add"
                          ng-click="addEventUpdate()">Add</button>
                </div>
                <div class="list-group-item"
                     ng-repeat="update in selectedEvent.updates">
                  <eventupdate-marker click="focus(update.location)">
                    <p>{{ update.timestamp | date:'dd.MM HH:mm' }}</p>
                  </eventupdate-marker>
                  <p class="list-group-item-heading">
                    <span class="badge">{{ update.timestamp | date:'dd.MM HH:mm' }}</span>
                    {{ update.text || "..." }}
                  </p>
                  <a href="{{ update.audio }}" class="btn btn-default"
                     ng-if="update.audio != null">
                    <span class="glyphicon glyphicon-headphones"></span> Play</a>
                  <a href="{{ update.video }}" class="btn btn-default"
                     ng-if="update.video != null">
                    <span class="glyphicon glyphicon-film"></span> Play</a>
                  <a class="btn btn-success"
                     ng-if="update.location != null"
                     ng-click="focus(update.location)">
                    <span class="glyphicon glyphicon-map-marker"></span></a>
                </div>
              </div>
            </div>
          </div>
          <div class="selected-event panel panel-primary " 
                ng-if="selectedEvent == null">
            <h4 class="panel-heading event-heading">Dispatcher panel</h4>
            <div class="panel-body">
                <div class="list-group">
                    <div class="list-group-item"
                         ng-class="{'list-group-item-warning': event.isNew}"
                         ng-click="event.isNew = false"
                         ng-repeat="event in events">
                      <a class="btn btn-success" ng-click="focus(event.latest_location)">
                        <span class="glyphicon glyphicon-map-marker"></span>
                      </a>
                      <div class="event-name"
                           ng-click="select(event)"
                           ng-bind="event.user.full_name"></div>
                    </div>
                </div>
            </div>
          </div>
        </div>
         <div id="map-canvas"></div>
      </div>
      {% endverbatim %}
    </div>
  </div>
{% endblock %}
<commit_msg>ticket:58 Changed button text<commit_after>{% extends "base.html" %}

{% load staticfiles %}
{% load config_tags %}

{% block styles %}
  {{ block.super }}
  <link rel="stylesheet" type="text/css" href="{% static 'css/map.css' %}">
{% endblock %}

{% block scripts %}
  {{ block.super }}
  <script src="https://maps.googleapis.com/maps/api/js?key={{ GOOGLE_API_KEY }}&sensor=false&language=uk"></script>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
  <script src="{% static 'js/map.js' %}"></script>
  <script>
    mapApp.constant('urls', {
      events: "{% url 'api_dispatch_list' resource_name='events' api_name='v1' %}",
      eventupdates: "{% url 'api_dispatch_list' resource_name='eventupdates' api_name='v1' %}",
      operatorAddEventUpdate: "{% url 'events:operator_add_eventupdate' %}",
    });
    mapApp.constant('mapSettings', {
        highlight: {% if newevent_highlight %}true{% else %}false{% endif %},
        sound: {% if newevent_sound %}true{% else %}false{% endif %},
        wakeup_interval: {{ wakeup_interval }},
    });
  </script>
{% endblock %}

{% block content %}
<audio id="audiotag" src="{% static 'audio/beep.mp3' %}" preload="auto"></audio>

  <div class="page-header">
    {% include "account/login_button_block.html" %}
    <h3>Events map</h3>
  </div>
  <div class="row">
    <div class="col-md-12">
      {% verbatim %}
      <div ng-app="mapApp">
        <div ng-controller="EventListCtrl">
          <event-marker click="select(event)"
                        ng-repeat="event in events"
                        ng-if="event.id != selectedEvent.id">
            <div>
              <p ng-if="event.user.full_name != null">
                <span class="glyphicon glyphicon-exclamation-sign"
                      ng-if="event.type == 'victim'"></span>
                <span class="glyphicon glyphicon-user"
                      ng-if="event.type == 'support'"></span>
                      {{ event.user.full_name }}
              </p>
              <span class="badge">{{ event.latest_update.timestamp | date:'HH:mm' }}</span>
              {{ event.latest_update.text || "..." }}
            </div>
          </event-marker>
          <div class="selected-event panel panel-primary"
               ng-if="selectedEvent != null">
            <h4 class="panel-heading">Status:
              <span class="label label-danger"
                    ng-if="selectedEvent.status == 'A'">active</span>
              <span class="label label-primary"
                    ng-if="selectedEvent.status == 'P'">passive</span>
              <span class="label label-default"
                    ng-if="selectedEvent.status == 'F'">finished</span>
              <button type="button" class="close"
                      ng-click="select(null)">&times;</button>
            </h4>
            <div class="panel-body">
              <div class="list-group">
                <div class="list-group-item">
                  <p>Add event update</p>
                  <input id="input-text-update" class="form-control input-sm" type="text" placeholder="Text" 
                         ng-model="fields.addEventUpdateText"
                         ng-keydown="ctrlEnter($event)"/>
                  <button class="btn btn-primary btn-sm button-add"
                          ng-click="addEventUpdate()">Click or hit Ctrl+Enter</button>
                </div>
                <div class="list-group-item"
                     ng-repeat="update in selectedEvent.updates">
                  <eventupdate-marker click="focus(update.location)">
                    <p>{{ update.timestamp | date:'dd.MM HH:mm' }}</p>
                  </eventupdate-marker>
                  <p class="list-group-item-heading">
                    <span class="badge">{{ update.timestamp | date:'dd.MM HH:mm' }}</span>
                    {{ update.text || "..." }}
                  </p>
                  <a href="{{ update.audio }}" class="btn btn-default"
                     ng-if="update.audio != null">
                    <span class="glyphicon glyphicon-headphones"></span> Play</a>
                  <a href="{{ update.video }}" class="btn btn-default"
                     ng-if="update.video != null">
                    <span class="glyphicon glyphicon-film"></span> Play</a>
                  <a class="btn btn-success"
                     ng-if="update.location != null"
                     ng-click="focus(update.location)">
                    <span class="glyphicon glyphicon-map-marker"></span></a>
                </div>
              </div>
            </div>
          </div>
          <div class="selected-event panel panel-primary " 
                ng-if="selectedEvent == null">
            <h4 class="panel-heading event-heading">Dispatcher panel</h4>
            <div class="panel-body">
                <div class="list-group">
                    <div class="list-group-item"
                         ng-class="{'list-group-item-warning': event.isNew}"
                         ng-click="event.isNew = false"
                         ng-repeat="event in events">
                      <a class="btn btn-success" ng-click="focus(event.latest_location)">
                        <span class="glyphicon glyphicon-map-marker"></span>
                      </a>
                      <div class="event-name"
                           ng-click="select(event)"
                           ng-bind="event.user.full_name"></div>
                    </div>
                </div>
            </div>
          </div>
        </div>
         <div id="map-canvas"></div>
      </div>
      {% endverbatim %}
    </div>
  </div>
{% endblock %}

{'fraction_non_alphanumeric': 0.16514245515300738, 'fraction_numerical': 0.0028139289482940555, 'mean_word_length': 1.6867469879518073, 'pattern_counts': {'":': 0, '<': 199, '<?xml version=': 0, '>': 199, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4812224', 'n_tokens_mistral': 3359, 'n_tokens_neox': 3107, 'n_words': 560}