Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add event log (approvals, created, modified) to edit page.

  • Loading branch information...
commit 32936894c97c054c64ebc660f8540220ebec2b78 1 parent 1132ae7
Tim Mickel tmickel authored
10 airmozilla/manage/static/manage/css/manage.css
@@ -32,6 +32,16 @@ div.controls select {
32 32 display: inline;
33 33 }
34 34
  35 +/* event edit status floating box */
  36 +.event-status {
  37 + position: absolute;
  38 + right: 2%;
  39 +}
  40 +
  41 +.event-status li {
  42 + margin-bottom: 10px;
  43 +}
  44 +
35 45 .timeago {
36 46 border-bottom: 1px dotted #000;
37 47 }
34 airmozilla/manage/templates/manage/event_edit.html
@@ -4,3 +4,37 @@
4 4 {% block manage_title %}
5 5 Editing event "{{ event.title }}"
6 6 {% endblock %}
  7 +
  8 +{% block manage_content %}
  9 + <div class="event-status span4 well">
  10 + <strong>Event status: {{ event.status }}</strong>
  11 + <ul>
  12 + {% for approval in event.approval_set.all() %}
  13 + <li>
  14 + {% if approval.processed %}
  15 + {% set badge = 'success' if approval.approved else 'important' %}
  16 + <span class="badge badge-{{ badge }}">
  17 + {{ 'Approved' if approval.approved else 'Rejected' }}
  18 + </span>
  19 + <span class="badge badge-inverse">{{ approval.group }}</span>
  20 + &nbsp;
  21 + {{ approval.processed_time|js_date }}<br>{{ approval.user.email }}
  22 + {% if approval.comment %}
  23 + - {{ approval.comment }}
  24 + {% endif %}
  25 + {% else %}
  26 + Needs review from {{ approval.group }}
  27 + {% endif %}
  28 + </li>
  29 + {% endfor %}
  30 + <li>
  31 + <span class="badge badge-info">Modified</span>
  32 + {{ event.modified|js_date }}<br>{{ event.modified_user.email }}
  33 + </li>
  34 + <li>
  35 + <span class="badge badge-info">Created</span>
  36 + {{ event.created|js_date }}<br>{{ event.creator.email }}</li>
  37 + </ul>
  38 + </div>
  39 + {% include 'manage/_default_form_upload.html' %}
  40 +{% endblock %}

0 comments on commit 3293689

Please sign in to comment.
Something went wrong with that request. Please try again.