Files
@ cb4b0fac3871
Branch filter:
Location: symposion_app/symposion/templates/reviews/result_notification.html
cb4b0fac3871
6.5 KiB
text/html
Merge branch 'django1.6-compatibility' of https://github.com/mbrochh/symposion into mbrochh-django1.6-compatibility
Conflicts:
symposion/boxes/urls.py
symposion/cms/urls.py
symposion/conference/urls.py
symposion/proposals/models.py
symposion/proposals/urls.py
symposion/reviews/urls.py
symposion/schedule/models.py
symposion/schedule/urls.py
symposion/speakers/urls.py
symposion/sponsorship/urls.py
symposion/teams/urls.py
Conflicts:
symposion/boxes/urls.py
symposion/cms/urls.py
symposion/conference/urls.py
symposion/proposals/models.py
symposion/proposals/urls.py
symposion/reviews/urls.py
symposion/schedule/models.py
symposion/schedule/urls.py
symposion/speakers/urls.py
symposion/sponsorship/urls.py
symposion/teams/urls.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | {% extends "reviews/base.html" %}
{% load i18n %}
{% block extra_style %}
<style type="text/css">
.table-striped tbody tr.selected td {
background-color: #F7F4E6;
}
</style>
{% endblock %}
{% block body %}
<ul class="nav nav-pills">
<li{% if status == 'accepted' %} class="active"{% endif %}><a href="{% url result_notification section_slug 'accepted' %}">accepted</a>
<li{% if status == 'rejected' %} class="active"{% endif %}><a href="{% url result_notification section_slug 'rejected' %}">rejected</a>
<li{% if status == 'standby' %} class="active"{% endif %}><a href="{% url result_notification section_slug 'standby' %}">standby</a>
</ul>
<h1>Result Notification</h1>
<form method="post" action="{% url result_notification_prepare section_slug status %}">
{% csrf_token %}
<p>
Select one or more proposals (<span class="action-counter">0</span> currently selected)
<br/>
then pick an email template
<select name="notification_template">
<option value="">[blank]</option>
{% for template in notification_templates %}
<option value="{{ template.pk }}">{{ template.label }}</option>
{% endfor %}
</select>
<br/>
<button id="next-button" type="submit" class="btn btn-primary" disabled>Next <i class="icon icon-chevron-right"></i></button>
</p>
<table class="table table-striped table-bordered">
<thead>
<th><input type="checkbox" id="action-toggle"></th>
<th>#</th>
<th>{% trans "Speaker / Title" %}</th>
<th>{% trans "Category" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Notified?" %}</th>
</thead>
<tbody>
{% for proposal in proposals %}
<tr>
<td><input class="action-select" type="checkbox" name="_selected_action" value="{{ proposal.pk }}"></td>
<td>{{ proposal.number }}</td>
<td>
<a href="{% url review_detail proposal.pk %}">
<small><strong>{{ proposal.speaker }}</strong></small>
<br />
{{ proposal.title }}
</a>
</td>
<td>{{ proposal.track }}</td>
<td>
{% with proposal.result.status as status %}
<div class="{{ status }}">
{% if status != "undecided" %}
<span>{{ status }}</span>
{% endif %}
</div>
{% endwith %}
</td>
<td>
{% if proposal.notifications.exists %}yes{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
(function($) {
$.fn.actions = function(opts) {
var options = $.extend({}, $.fn.actions.defaults, opts);
var actionCheckboxes = $(this);
checker = function(checked) {
$(actionCheckboxes).prop("checked", checked)
.parent().parent().toggleClass(options.selectedClass, checked);
}
updateCounter = function() {
var sel = $(actionCheckboxes).filter(":checked").length;
$(options.counterContainer).html(sel);
$(options.allToggle).prop("checked", function() {
if (sel == actionCheckboxes.length) {
value = true;
} else {
value = false;
}
return value;
});
if (sel == 0) {
$("#next-button").prop("disabled", true);
} else {
$("#next-button").prop("disabled", false);
}
}
// Check state of checkboxes and reinit state if needed
$(this).filter(":checked").each(function(i) {
$(this).parent().parent().toggleClass(options.selectedClass);
updateCounter();
});
$(options.allToggle).click(function() {
checker($(this).prop("checked"));
updateCounter();
});
lastChecked = null;
$(actionCheckboxes).click(function(event) {
if (!event) { var event = window.event; }
var target = event.target ? event.target : event.srcElement;
if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey == true) {
var inrange = false;
$(lastChecked).prop("checked", target.checked)
.parent().parent().toggleClass(options.selectedClass, target.checked);
$(actionCheckboxes).each(function() {
if ($.data(this) == $.data(lastChecked) || $.data(this) == $.data(target)) {
inrange = (inrange) ? false : true;
}
if (inrange) {
$(this).prop("checked", target.checked)
.parent().parent().toggleClass(options.selectedClass, target.checked);
}
});
}
$(target).parent().parent().toggleClass(options.selectedClass, target.checked);
lastChecked = target;
updateCounter();
});
}
/* Setup plugin defaults */
$.fn.actions.defaults = {
counterContainer: "span.action-counter",
allToggle: "#action-toggle",
selectedClass: "selected"
}
})($);
$(function() {
$("tr input.action-select").actions();
});
</script>
{% endblock %}
|