<commit_before>{% extends "manage/event_request.html" %}
{% set page = "events" %}

{% block manage_title %}
  Editing event "{{ event.title }}"
{% endblock %}

{% block site_css %}
  {{ super() }}
  {% compress css %}
  <link href="{{ static('manage/css/event-edit.css') }}" rel="stylesheet" type="text/css">
  {% endcompress %}
{% endblock %}

{% block site_js %}
  {{ super() }}
  {% compress js %}
    <script src="{{ static('manage/js/event-edit.js') }}"></script>
  {% endcompress %}
{% endblock %}


{% block content_class %}col-md-6{% endblock %}
{% block extra_columns %}
<div class="col-md-4">
  <div class="sidebar span4 well">
    <p><strong>Event status: {{ event.status }}</strong></p>
    <ul>
      {% for approval in event.approval_set.all() %}
        <li>
        {% if approval.processed %}
          {% set badge = 'success' if approval.approved else 'important' %}
          <span class="badge badge-{{ badge }}">
            {{ 'Approved' if approval.approved else 'Rejected' }}
          </span>
          <span class="badge badge-inverse">{{ approval.group }}</span>
          &nbsp;
          {{ approval.processed_time|js_date }}<br>{{ approval.user.email }}
          {% if approval.comment %}
            - {{ approval.comment }}
          {% endif %}
        {% else %}
          Needs review from {{ approval.group }}
        {% endif %}
        </li>
      {% endfor %}
      {% if not almost_equal(event.modified, event.created) %}
      <li>
        <span class="badge badge-info">Modified</span>
        {{ event.modified|js_date }}<br>{{ event.modified_user.email }}
      </li>
      {% endif %}
      <li>
        <span class="badge badge-info">Created</span>
        {{ event.created|js_date }}<br>{{ event.creator.email }}</li>
    </ul>
    {% if suggested_event %}
    <p><a href="{{ url('suggest:summary', suggested_event.pk) }}">This event was originally suggested</a> by
      <strong>{{ suggested_event.user.email }}</strong>
      {% if suggested_event.submitted %}
      {{ suggested_event.submitted|js_date }}.
      {% else %}
        <em>suggested event submission retracted</em>.
      {% endif %}
    </p>
    {% endif %}

    {% if suggested_event and suggested_event.upload %}
        <p style="margin-top:25px"><strong>File Upload:</strong> (from requested event)</p>
        <table class="event-upload">
          <tr>
            <th>Name:</th>
            <td class="file-name">{{ suggested_event.upload.file_name }}</td>
          </tr>
          <tr>
            <th>Size:</th>
            <td>{{ suggested_event.upload.size | filesizeformat }}</td>
          </tr>
          <tr>
            <th>URL:</th>
            <td><a href="{{ suggested_event.upload.url }}">Open</td>
          </tr>
        </table>
    {% elif event.upload %}
        <p style="margin-top:25px"><strong>File Upload:</strong></p>
        <table class="event-upload">
           <tr>
             <th>Name:</th>
             <td class="file-name">{{ event.upload.file_name }}</td>
           </tr>
           <tr>
             <th>Size:</th>
             <td>{{ event.upload.size | filesizeformat }}</td>
           </tr>
           <tr>
             <th>URL:</th>
             <td><a href="{{ event.upload.url }}">Open</td>
           </tr>
        </table>
        <p><a href="{{ url('manage:event_upload', event.pk) }}" class="btn btn-primary btn-sm">Upload a different file</a></p>
    {% elif event.is_pending() %}
        <p style="margin-top:25px"><strong>File Upload:</strong></p><commit_msg>fixes bug 1029647 - No Way to replace file for Pre-Recorded Events<commit_after>{% extends "manage/event_request.html" %}
{% set page = "events" %}

{% block manage_title %}
  Editing event "{{ event.title }}"
{% endblock %}

{% block site_css %}
  {{ super() }}
  {% compress css %}
  <link href="{{ static('manage/css/event-edit.css') }}" rel="stylesheet" type="text/css">
  {% endcompress %}
{% endblock %}

{% block site_js %}
  {{ super() }}
  {% compress js %}
    <script src="{{ static('manage/js/event-edit.js') }}"></script>
  {% endcompress %}
{% endblock %}


{% block content_class %}col-md-6{% endblock %}
{% block extra_columns %}
<div class="col-md-4">
  <div class="sidebar span4 well">
    <p><strong>Event status: {{ event.status }}</strong></p>
    <ul>
      {% for approval in event.approval_set.all() %}
        <li>
        {% if approval.processed %}
          {% set badge = 'success' if approval.approved else 'important' %}
          <span class="badge badge-{{ badge }}">
            {{ 'Approved' if approval.approved else 'Rejected' }}
          </span>
          <span class="badge badge-inverse">{{ approval.group }}</span>
          &nbsp;
          {{ approval.processed_time|js_date }}<br>{{ approval.user.email }}
          {% if approval.comment %}
            - {{ approval.comment }}
          {% endif %}
        {% else %}
          Needs review from {{ approval.group }}
        {% endif %}
        </li>
      {% endfor %}
      {% if not almost_equal(event.modified, event.created) %}
      <li>
        <span class="badge badge-info">Modified</span>
        {{ event.modified|js_date }}<br>{{ event.modified_user.email }}
      </li>
      {% endif %}
      <li>
        <span class="badge badge-info">Created</span>
        {{ event.created|js_date }}<br>{{ event.creator.email }}</li>
    </ul>
    {% if suggested_event %}
    <p><a href="{{ url('suggest:summary', suggested_event.pk) }}">This event was originally suggested</a> by
      <strong>{{ suggested_event.user.email }}</strong>
      {% if suggested_event.submitted %}
      {{ suggested_event.submitted|js_date }}.
      {% else %}
        <em>suggested event submission retracted</em>.
      {% endif %}
    </p>
    {% endif %}

    {% if suggested_event and suggested_event.upload %}
        <p style="margin-top:25px"><strong>File Upload:</strong> (from requested event)</p>
        <table class="event-upload">
          <tr>
            <th>Name:</th>
            <td class="file-name">{{ suggested_event.upload.file_name }}</td>
          </tr>
          <tr>
            <th>Size:</th>
            <td>{{ suggested_event.upload.size | filesizeformat }}</td>
          </tr>
          <tr>
            <th>URL:</th>
            <td><a href="{{ suggested_event.upload.url }}">Open</td>
          </tr>
        </table>
        <p><a href="{{ url('manage:event_upload', event.pk) }}" class="btn btn-primary btn-sm">Upload a different file</a></p>
    {% elif event.upload %}
        <p style="margin-top:25px"><strong>File Upload:</strong></p>
        <table class="event-upload">
           <tr>
             <th>Name:</th>
             <td class="file-name">{{ event.upload.file_name }}</td>
           </tr>
           <tr>
             <th>Size:</th>
             <td>{{ event.upload.size | filesizeformat }}</td>
           </tr>
           <tr>
             <th>URL:</th>
             <td><a href="{{ event.upload.url }}">Open</td>
           </tr>
        </table>
        <p><a href="{{ url('manage:event_upload', event.pk) }}" class="btn btn-primary btn-sm">Upload a different file</a></p>
    {% elif event.is_pending() %}
        <p style="margin-top:25px"><strong>File Upload:</strong></p>
{'fraction_non_alphanumeric': 0.1929123000551572, 'fraction_numerical': 0.0034473248758963046, 'mean_word_length': 2.2292965271593945, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 195, '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': '7144161', 'n_tokens_mistral': 2412, 'n_tokens_neox': 2205, 'n_words': 465}