<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load permissions %}


{% block title %}
  {% trans 'Enhydris - Station' %} - {%if station %}{{ station.name }} {% endif %}
{% endblock %}


{% block extrajs %}
  <script type="text/javascript" src="{% static "js/jquery.collapser.mod.js" %}"></script>
  <script type="text/javascript">
    enhydris.mapMode = 2;
    {% if station %}enhydris.agentityId = {{station.id}};{% endif %}
  </script>
  <script type="text/javascript">
    $(document).ready(function(){
      $(".verification_required").click(function(){
        return confirmPost();
      });
    });

    function confirmPost(){
      var agree=confirm("Are you sure you want to delete this object?");
        if (agree)
          return true;
        else
          return false ;
      }

    function togl(name) {
      $("#"+ name).stop().toggle()
    }

    $(document).ready(function ($) {
      $('#tabs').tab();
    });
  </script>
{% endblock %}


{% block content %}
  <div class="container">
    {% if notifications %}
      <div class="alert alert-warning">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        <i class="fa fa-hand-o-right"></i>
        {% for message in notifications %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}
      </div>
    {% endif %}
    {% if station %}
    <div class="row">
      {% if station.point %}
        <div class="col-md-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <a href='{% url "station_edit" station.id%}'><h5>{{ station.name }}</h5></a>
            </div>
            <div class="panel-body">
              <div id="map" class="map"></div>
            </div>
          </div>
        </div>
      {% endif %}
        <div class="col-md-8">
          <div class="panel panel-default">
            <div class="panel-heading">
              <b>{% trans "Station Details" %}</b><br>
              <sub>
                {% if request.user|can_edit:station %}
                  <a class="btn btn-xs btn-primary" href='{% url "station_edit" station.id%}'>{% trans "Edit" %}</a>
                {% endif %}
                {% if request.user|can_delete:station %}
                  <a onClick='return confirmPost()' href='{% url "station_delete" station.id%}' class="btn btn-xs btn-danger" >{% trans "Delete" %}</a>
                {% endif %}
              <sub>
              <sub>
                {% if request.user|can_edit:station %}
                  <button style="float:right" onclick="togl('more')"class="btn btn-primary btn-xs" id="show_results"> {% trans "Show/Hide more options" %}</button>
                  <br>
                  <div id="more" style="display:none;padding-top:10px" >
                    <a class="btn btn-xs btn-default " href="{% url "timeseries_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Timeseries</a>
                    <a class="btn btn-xs btn-default " href="{% url "instrument_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Instrument</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentityfile_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New File</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentitygenericdata_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Generic Item</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentityevent_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Event</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentityaltcode_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Alt Code</a>
                    <a class="btn btn-xs btn-default " href="{% url "overseer_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Overseer</a>
                  </div>
                  {% endif %}
              </sub>
            </div> <!--Heading Panel -->
            <div class="table-responsive">
              <table class="table table-hover table-condensed">
                <tr>
                  <th class="col-md-2">{% trans 'ID' %}</th>
                  <td colspan='2'>{{ station.id }}</td>
                </tr>
                <tr>
                  <th class="col-md-3">{% trans 'Name' %}</th>
                  <td colspan='2'>{{ station.name }}</td>
                </tr>
              </tr>
              <tr>
                <th class="col-md-3">{% trans 'Remarks' %}</th>
                <td colspan='2'>{{ station.remarks }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Water Basin' %}</th>
                <td colspan='2'>{{ station.water_basin.name }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Water Division' %}</th>
                <td colspan='2'>{{ station.water_division.name }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Political Division' %}</th>
                <td colspan='2'>{{ station.political_division.name }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Co-ordinates' %}</th>
                <td colspan='2'>{{ station.point.x | floatformat:5 }}, {{ station.point.y | floatformat:5 }}
                  {% if station.approximate %}
                    ({% trans 'approximate' %})
                  {% endif %}
                  {% if station.srid != 4326 %}
                    <small>
                      <br>
                      ({{ wgs84_name }};
                      {% trans "originally" %}
                      {{ station.original_cs_name }}
                      [srid={{ station.srid }}]:
                      {{ station.original_abscissa }},
                      {{ station.original_ordinate }})
                    </small>
                  {% endif %}
                </td>
                <tr>
                  <th class="col-md-3" >{% trans 'Altitude' %}</th>
                  <td colspan='2'>{{ station.altitude|floatformat:2 }}
                    {% if station.asrid %}[srid={{ station.asrid }}]{% endif %}<commit_msg>Display latitude-longitude, not vice-versa<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load permissions %}


{% block title %}
  {% trans 'Enhydris - Station' %} - {%if station %}{{ station.name }} {% endif %}
{% endblock %}


{% block extrajs %}
  <script type="text/javascript" src="{% static "js/jquery.collapser.mod.js" %}"></script>
  <script type="text/javascript">
    enhydris.mapMode = 2;
    {% if station %}enhydris.agentityId = {{station.id}};{% endif %}
  </script>
  <script type="text/javascript">
    $(document).ready(function(){
      $(".verification_required").click(function(){
        return confirmPost();
      });
    });

    function confirmPost(){
      var agree=confirm("Are you sure you want to delete this object?");
        if (agree)
          return true;
        else
          return false ;
      }

    function togl(name) {
      $("#"+ name).stop().toggle()
    }

    $(document).ready(function ($) {
      $('#tabs').tab();
    });
  </script>
{% endblock %}


{% block content %}
  <div class="container">
    {% if notifications %}
      <div class="alert alert-warning">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        <i class="fa fa-hand-o-right"></i>
        {% for message in notifications %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}
      </div>
    {% endif %}
    {% if station %}
    <div class="row">
      {% if station.point %}
        <div class="col-md-4">
          <div class="panel panel-default">
            <div class="panel-heading">
              <a href='{% url "station_edit" station.id%}'><h5>{{ station.name }}</h5></a>
            </div>
            <div class="panel-body">
              <div id="map" class="map"></div>
            </div>
          </div>
        </div>
      {% endif %}
        <div class="col-md-8">
          <div class="panel panel-default">
            <div class="panel-heading">
              <b>{% trans "Station Details" %}</b><br>
              <sub>
                {% if request.user|can_edit:station %}
                  <a class="btn btn-xs btn-primary" href='{% url "station_edit" station.id%}'>{% trans "Edit" %}</a>
                {% endif %}
                {% if request.user|can_delete:station %}
                  <a onClick='return confirmPost()' href='{% url "station_delete" station.id%}' class="btn btn-xs btn-danger" >{% trans "Delete" %}</a>
                {% endif %}
              <sub>
              <sub>
                {% if request.user|can_edit:station %}
                  <button style="float:right" onclick="togl('more')"class="btn btn-primary btn-xs" id="show_results"> {% trans "Show/Hide more options" %}</button>
                  <br>
                  <div id="more" style="display:none;padding-top:10px" >
                    <a class="btn btn-xs btn-default " href="{% url "timeseries_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Timeseries</a>
                    <a class="btn btn-xs btn-default " href="{% url "instrument_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Instrument</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentityfile_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New File</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentitygenericdata_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Generic Item</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentityevent_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Event</a>
                    <a class="btn btn-xs btn-default " href="{% url "gentityaltcode_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Alt Code</a>
                    <a class="btn btn-xs btn-default " href="{% url "overseer_add" %}?station_id={{ station.id }}"><i class="glyphicon glyphicon-plus"></i> New Overseer</a>
                  </div>
                  {% endif %}
              </sub>
            </div> <!--Heading Panel -->
            <div class="table-responsive">
              <table class="table table-hover table-condensed">
                <tr>
                  <th class="col-md-2">{% trans 'ID' %}</th>
                  <td colspan='2'>{{ station.id }}</td>
                </tr>
                <tr>
                  <th class="col-md-3">{% trans 'Name' %}</th>
                  <td colspan='2'>{{ station.name }}</td>
                </tr>
              </tr>
              <tr>
                <th class="col-md-3">{% trans 'Remarks' %}</th>
                <td colspan='2'>{{ station.remarks }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Water Basin' %}</th>
                <td colspan='2'>{{ station.water_basin.name }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Water Division' %}</th>
                <td colspan='2'>{{ station.water_division.name }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Political Division' %}</th>
                <td colspan='2'>{{ station.political_division.name }}</td>
              </tr>
              <tr>
                <th class="col-md-3" >{% trans 'Co-ordinates' %}</th>
                <td colspan='2'>{{ station.point.y | floatformat:5 }}, {{ station.point.x | floatformat:5 }}
                  {% if station.approximate %}
                    ({% trans 'approximate' %})
                  {% endif %}
                  {% if station.srid != 4326 %}
                    <small>
                      <br>
                      ({{ wgs84_name }};
                      {% trans "originally" %}
                      {{ station.original_cs_name }}
                      [srid={{ station.srid }}]:
                      x={{ station.original_abscissa }},
                      y={{ station.original_ordinate }})
                    </small>
                  {% endif %}
                </td>
                <tr>
                  <th class="col-md-3" >{% trans 'Altitude' %}</th>
                  <td colspan='2'>{{ station.altitude|floatformat:2 }}
                    {% if station.asrid %}[srid={{ station.asrid }}]{% endif %}
{'fraction_non_alphanumeric': 0.18727145413522134, 'fraction_numerical': 0.005290593635727068, 'mean_word_length': 1.7348936170212765, 'pattern_counts': {'":': 0, '<': 263, '<?xml version=': 0, '>': 263, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5441096', 'n_tokens_mistral': 4102, 'n_tokens_neox': 3688, 'n_words': 847}