Skip to content

Commit

Permalink
Closes #1323 and fixes a datatables template bug."
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrbyers authored and mauromsl committed Nov 14, 2019
1 parent f7292a3 commit d9fe17d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ <h2>1. Select Copyeditor</h2>
<thead>
<tr>
<th>Select</th>
<th>Name</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email Address</th>
<th>Active Copyedits</th>
</tr>
Expand All @@ -35,7 +36,8 @@ <h2>1. Select Copyeditor</h2>
{% for copyeditor_role in copyeditors %}
<tr>
<td><input type="radio" name="copyeditor" value="{{ copyeditor_role.user.id }}" {% if copyeditor_role.user == form.cleaned_data.copyeditor %}checked="checked"{% endif %}></td>
<td>{{ copyeditor_role.user.full_name }}</td>
<td>{{ copyeditor_role.user.first_name }}{% if copyeditor_role.user.middle_name %} {{ copyeditor_role.user.middle_name }}{% endif %}</td>
<td>{{ copyeditor_role.user.last_name }}</td>
<td>{{ copyeditor_role.user.email }}</td>
<td>{{ copyeditor_role.user.active_copyedits|length }}</td>
</tr>
Expand Down Expand Up @@ -64,6 +66,7 @@ <h2>2. Select Files</h2>
<th>Uploaded</th>
<th>Download</th>
</tr>

{% for file in article.manuscript_files.all %}
<tr>
<td><input type="checkbox" name="files_for_copyediting" value="{{ file.id }}"
Expand Down Expand Up @@ -109,7 +112,7 @@ <h2>3. Set Options</h2>
{% endblock body %}

{% block js %}
{% include "elements/datatables.html" with target="#copyeditor" %}
{% include "elements/datatables.html" with target="#copyeditor" sort=2 order='asc' %}
{% include "elements/datepicker.html" with target="#id_due" %}
{% include "elements/jqte.html" %}
<script src="{% static "admin/js/csrf.js" %}"></script>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/admin/elements/datatables.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lengthMenu": [[25, 50, 10, -1], [25, 50, 10, "All"]],
{% if hide_length %}"bLengthChange": false,{% endif %}
{% if hide_page %}"bPaginate": false,{% endif %}
{% if sort %}"order": [[ {{ order }}, "{{ sort }}" ]],{% endif %}
{% if sort and order %}"order": [[ {{ sort }}, "{{ order }}" ]],{% endif %}
{% if disable_ordering %}"ordering": false,{% endif %}
{% if page_length %}"pageLength": {{ page_length }},{% endif %}
});
Expand Down

0 comments on commit d9fe17d

Please sign in to comment.