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

{% load tz %}

{% block cssExtras %}
{{ block.super }}
<style type="text/css" title="currentStyle">
	@import "{{ EXTERNAL_URL }}jquery-ui/themes/base/jquery-ui.css";
	@import url('{{EXTERNAL_URL}}jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon.css');
</style>
<style type="text/css">
table.planIndex td.exportFormat a {
    padding-right: 10px;
}

</style>
{% endblock cssExtras %}

{% block siteSection %}{{ settings.XGDS_PLANNER2_PLAN_MONIKER }} Index{% endblock siteSection %}

{% block sitemenu-content-secondary %}
{% include "xgds_planner2/planner2_subnav.html" %}
{% endblock %}

{% block content %}
{{ block.super }}

<form name='PlanForm' action="{% url 'planner2_delete' %}" method="post">
<input type="submit" class="mybutton right" id="deleteButton" value="Delete Selected" ></input>
<input class="mybutton right" type="button" id="toggle_button" value="Toggle Lock" ></input>
{% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
<input class="mybutton right" type="button" onclick="showScheduleDialog()" id="schedule_button" value="Schedule Selected" ></input>
{% endif %}
<a href={% if XGDS_PLANNER2_CREATE_URL %} "{{ XGDS_PLANNER2_CREATE_URL }}" {% else %} "{% url 'planner2_planCreate' %}" {% endif %} class="mybutton" style="float:right; margin-bottom:3px;"> Create {{ settings.XGDS_PLANNER2_PLAN_MONIKER }}</a>
<table id="dataTable" class="planIndex">
<thead class="table_header">
  <tr>
  	<th><label for="pick_master">All</label><br/><input type="checkbox" id="pick_master" /></th>
    <th></th>
    <th>Name</th>
    <th>Author</th>
    <th>Last Edit</th>
    <th>{{settings.XGDS_MAP_SERVER_SITE_MONIKER}}</th>
    <th>Dist</th>
    <th>#Stn</th>
    <th>#Commands</th>
    {% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
    <th>Scheduled</th>
    {% endif %}
    <th>Export</th>
  </tr>
</thead>
<tbody>
{% for plan in plans %}
  <tr id={{ plan.id }}>
  	<td><input type="checkbox" id="pick_{{plan.id}}" name="picks" value="{{plan.id}}" class="check"/></td>
  	<td>{% if plan.readOnly %}<img src="{{ STATIC_URL }}xgds_planner2/images/lock.png" alt="Read Only">{% endif %}</td>
  	<td ><label for="pick_{{plan.id}}"><a href="{% url 'planner2_edit' plan.id %}" id="edit_{{plan.id}}">{{ plan.name }}</a></label></td>
  	<td>{{ plan.creator }}</td>
    <td>{% timezone TIME_ZONE %}{{ plan.dateModified|date:"Y-m-d H:i e" }}{% endtimezone %}</td>
    <td>{{ plan.jsonPlan.site.name }}</td>
    <td class="right">{{ plan.lengthMeters|floatformat }}</td>
    <td class="center">{{ plan.numStations }}</td>
    <td >{{ plan.numCommands }} &nbsp;&nbsp;{{ plan.getSummaryOfCommandsByType|safe }}</td>
    {% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
    <td style="width:150px;">{% for execution in plan.executions.all %} {% timezone jsonPlan.site.alternateCrs.properties.timezone %}{{ execution.planned_start_time|date:"Y-m-d H:i e"}}{% endtimezone %}<br/>{% endfor %}</td>
    {% endif %}
    <td class="exportFormat">
      {% for exporter in plan.getExporters %}
        <a href="{{ exporter.url }}" style="text-decoration:none">
          {{ exporter.label }} 
        </a>
      {% endfor %}
    </td>
  </tr>
{% endfor %}
</tbody>
</table>
</form>

{% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
<div id="scheduleDialog" style="display:none">
	<form name='ScheduleForm' id="scheduleForm" action="{% url 'planner2_schedulePlans' %}" method="post"><commit_msg>check for plan executions before iterating<commit_after>{% extends "base.html" %}

{% load tz %}

{% block cssExtras %}
{{ block.super }}
<style type="text/css" title="currentStyle">
	@import "{{ EXTERNAL_URL }}jquery-ui/themes/base/jquery-ui.css";
	@import url('{{EXTERNAL_URL}}jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon.css');
</style>
<style type="text/css">
table.planIndex td.exportFormat a {
    padding-right: 10px;
}

</style>
{% endblock cssExtras %}

{% block siteSection %}{{ settings.XGDS_PLANNER2_PLAN_MONIKER }} Index{% endblock siteSection %}

{% block sitemenu-content-secondary %}
{% include "xgds_planner2/planner2_subnav.html" %}
{% endblock %}

{% block content %}
{{ block.super }}

<form name='PlanForm' action="{% url 'planner2_delete' %}" method="post">
<input type="submit" class="mybutton right" id="deleteButton" value="Delete Selected" ></input>
<input class="mybutton right" type="button" id="toggle_button" value="Toggle Lock" ></input>
{% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
<input class="mybutton right" type="button" onclick="showScheduleDialog()" id="schedule_button" value="Schedule Selected" ></input>
{% endif %}
<a href={% if XGDS_PLANNER2_CREATE_URL %} "{{ XGDS_PLANNER2_CREATE_URL }}" {% else %} "{% url 'planner2_planCreate' %}" {% endif %} class="mybutton" style="float:right; margin-bottom:3px;"> Create {{ settings.XGDS_PLANNER2_PLAN_MONIKER }}</a>
<table id="dataTable" class="planIndex">
<thead class="table_header">
  <tr>
  	<th><label for="pick_master">All</label><br/><input type="checkbox" id="pick_master" /></th>
    <th></th>
    <th>Name</th>
    <th>Author</th>
    <th>Last Edit</th>
    <th>{{settings.XGDS_MAP_SERVER_SITE_MONIKER}}</th>
    <th>Dist</th>
    <th>#Stn</th>
    <th>#Commands</th>
    {% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
    <th>Scheduled</th>
    {% endif %}
    <th>Export</th>
  </tr>
</thead>
<tbody>
{% for plan in plans %}
  <tr id={{ plan.id }}>
  	<td><input type="checkbox" id="pick_{{plan.id}}" name="picks" value="{{plan.id}}" class="check"/></td>
  	<td>{% if plan.readOnly %}<img src="{{ STATIC_URL }}xgds_planner2/images/lock.png" alt="Read Only">{% endif %}</td>
  	<td ><label for="pick_{{plan.id}}"><a href="{% url 'planner2_edit' plan.id %}" id="edit_{{plan.id}}">{{ plan.name }}</a></label></td>
  	<td>{{ plan.creator }}</td>
    <td>{% timezone TIME_ZONE %}{{ plan.dateModified|date:"Y-m-d H:i e" }}{% endtimezone %}</td>
    <td>{{ plan.jsonPlan.site.name }}</td>
    <td class="right">{{ plan.lengthMeters|floatformat }}</td>
    <td class="center">{{ plan.numStations }}</td>
    <td >{{ plan.numCommands }} &nbsp;&nbsp;{{ plan.getSummaryOfCommandsByType|safe }}</td>
    {% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
	    <td style="width:150px;">{% if plan.executions %}{% for execution in plan.executions.all %} {% timezone plan.jsonPlan.site.alternateCrs.properties.timezone %}{{ execution.planned_start_time|date:"Y-m-d H:i e"}}{% endtimezone %}<br/>{% endfor %}{% endif %}</td>
    {% endif %}
    <td class="exportFormat">
      {% for exporter in plan.getExporters %}
        <a href="{{ exporter.url }}" style="text-decoration:none">
          {{ exporter.label }} 
        </a>
      {% endfor %}
    </td>
  </tr>
{% endfor %}
</tbody>
</table>
</form>

{% if settings.XGDS_PLANNER2_SCHEDULE_INCLUDED %}
<div id="scheduleDialog" style="display:none">
	<form name='ScheduleForm' id="scheduleForm" action="{% url 'planner2_schedulePlans' %}" method="post">
{'fraction_non_alphanumeric': 0.2119815668202765, 'fraction_numerical': 0.006048387096774193, 'mean_word_length': 4.966494845360825, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 169, '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': '5826495', 'n_tokens_mistral': 2717, 'n_tokens_neox': 2554, 'n_words': 463}