From 3c34905e6f73dd12b47c8690183a50e2991d3278 Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Wed, 22 Nov 2017 13:28:44 +0100
Subject: [PATCH] Update remove old views

---
 submissions/templates/submissions/pool.html | 369 --------------------
 submissions/urls.py                         |   2 -
 2 files changed, 371 deletions(-)
 delete mode 100644 submissions/templates/submissions/pool.html

diff --git a/submissions/templates/submissions/pool.html b/submissions/templates/submissions/pool.html
deleted file mode 100644
index 97489bda2..000000000
--- a/submissions/templates/submissions/pool.html
+++ /dev/null
@@ -1,369 +0,0 @@
-{% extends 'submissions/_pool_base.html' %}
-
-{% block pagetitle %}: Submissions Pool{% endblock pagetitle %}
-
-{% comment %}
-
-    This template is U/S; to be removed.
-
-    -- JdW 22 Nov, 2017
-
-{% endcomment %}
-
-{% load bootstrap %}
-{% load guardian_tags %}
-{% load scipost_extras %}
-{% load submissions_extras %}
-
-{% block breadcrumb_items %}
-    {{block.super}}
-    <span class="breadcrumb-item">Pool</span>
-{% endblock %}
-
-{% block content %}
-
-{% with is_ECAdmin=request.user|is_in_group:'Editorial Administrators' %}
-
-<!-- Page content -->
-<div class="row">
-    <div class="col-lg-8">
-
-        {% if is_ECAdmin %}
-            {% if recommendations.put_to_voting.exists %}
-                <div class="row">
-                    <div class="col-12">
-                        <h3 class="highlight mt-0">Administrative actions on recommendations undergoing voting:</h3>
-                        <ul>
-                            <li>To send an email reminder to each Fellow with at least one voting duty, <a href="{% url 'submissions:remind_Fellows_to_vote' %}">click here</a></li>
-                        </ul>
-                    </div>
-                </div>
-
-                <div class="row">
-                    <div class="col-12">
-                        <h1 class="highlight mt-0">Recommendations undergoing voting</h1>
-                    </div>
-                </div>
-
-                <div class="row">
-                    {% for rec in recommendations.put_to_voting %}
-                        {% if not forloop.first %}
-                            <hr>
-                        {% endif %}
-
-                        <div class="col-12" id="undergoing_rec_{{rec.id}}">
-                            <div class="card">
-                                <div class="card-body">
-                                    {% include 'partials/submissions/submission_title.html' with submission=rec.submission %}
-                                    {% include 'partials/submissions/pool/submission_info_table.html' with submission=rec.submission %}
-                                </div>
-                            </div>
-
-                            <div class="card card-outline-secondary">
-                                {% include 'submissions/_recommendation_fellow_content.html' with recommendation=rec %}
-                                <div class="card-body">
-
-                                    <h3 class="card-title">Fellows eligible to vote:</h3>
-                                    <ul>
-                                      <li>
-                                    	  {% for eligible in rec.eligible_to_vote.all|sort_by:'user__last_name' %}
-                                        	  {{ eligible.user.last_name }},&nbsp;
-                                    	  {% endfor %}
-                                        </li>
-                                    </ul>
-
-                                    <h3 class="card-title">Voting results up to now:</h3>
-                                    <ul>
-                                        <li>
-                                            Agreed:&nbsp;({{ rec.voted_for.all.count }})
-                                            {% for agreed in rec.voted_for.all|sort_by:'user__last_name' %}
-                                                {{ agreed.user.last_name }},&nbsp;
-                                            {% endfor %}
-                                        </li>
-                                        <li>
-                                            Disagreed:&nbsp;({{ rec.voted_against.all.count }})
-                                            {% for disagreed in rec.voted_against.all|sort_by:'user__last_name' %}
-                                                {{ disagreed.user.last_name }},&nbsp;
-                                            {% endfor %}
-                                        </li>
-                                        <li>
-                                            Abstained:&nbsp;({{ rec.voted_abstain.all.count }})
-                                            {% for abstained in rec.voted_abstain.all|sort_by:'user__last_name' %}
-                                                {{ abstained.user.last_name }},&nbsp;
-                                            {% endfor %}
-                                        </li>
-                                    </ul>
-
-                                    <h3 class="card-title">Remarks:</h3>
-                                    <ul>
-                                      {% for rem in rec.remarks.all %}
-                                          <li>{% include 'partials/submissions/remark_small.html' with remark=rem %}</li>
-                                     {% empty %}
-                                         <li><em>No remarks</em></li>
-                                      {% endfor %}
-                                    </ul>
-                                </div>
-                                <div class="card-footer">
-                                    <h3 class="card-title">Actions:</h3>
-                                    <ul>
-                                        <li>To fix the College decision and follow the Editorial Recommendation as is: <a href="{% url 'submissions:fix_College_decision' rec_id=rec.id %}">click here</a></li>
-                                        <li>To request a modification of the Recommendation to request for revision: click here</li>
-                                    </ul>
-                                </div>
-                            </div>
-                        </div>
-                    {% endfor %}
-                </div>
-                <hr>
-            {% endif %}
-
-            {% if recommendations.voting_in_preparation.exists %}
-                <div class="row">
-                    <div class="col-12">
-                        <h1 class="highlight mt-0">Recommendations to prepare for voting</h1>
-                    </div>
-                </div>
-
-                {% for rec in recommendations.voting_in_preparation %}
-                    {% if not forloop.first %}
-                        <hr>
-                    {% endif %}
-
-                    <div class="row">
-                        <div class="col-12" id="prepare_rec_{{rec.id}}">
-                            <div class="card">
-                                <div class="card-body">
-                                    {% include 'partials/submissions/submission_title.html' with submission=rec.submission %}
-                                    {% include 'partials/submissions/pool/submission_info_table.html' with submission=rec.submission %}
-                                </div>
-                            </div>
-
-                            <div class="card card-outline-secondary">
-                                {% include 'submissions/_recommendation_fellow_content.html' with recommendation=rec %}
-                                <div class="card-footer">
-                                    <h3>Actions:</h3>
-                                    <ul>
-                                        <li><a href="{% url 'submissions:prepare_for_voting' rec_id=rec.id %}">Prepare for voting</a></li>
-                                    </ul>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                {% endfor %}
-                <hr>
-            {% endif %}
-        {% endif %}
-
-        {% if assignments_to_consider %}
-            <div class="row">
-                <div class="col-12">
-                    <div class="highlight p-3">
-                        <h1 class="p-0">Assignment request</h1>
-                        <h3 class="p-0 mt-1 d-block text-muted">Can you act as Editor-in-charge? (see below to accept/decline)</h3>
-                    </div>
-                </div>
-            </div>
-            {% for assignment_to_consider in assignments_to_consider %}
-                <div class="row">
-                    <div class="col-12">
-                        <div class="card">
-                            {% include 'partials/submissions/pool/submission_assignment_request.html' with assignment=assignment_to_consider %}
-                        </div>
-                    </div>
-                </div>
-            {% endfor %}
-            <hr>
-        {% endif %}
-
-        {% if recs_to_vote_on %}
-            <div class="row">
-                <div class="col-12">
-                    <h1 class="highlight mt-0">Recommendations to vote on</h1>
-                </div>
-            </div>
-            {% for recommendation in recs_to_vote_on %}
-                {% if not forloop.first %}
-                    <hr>
-                {% endif %}
-
-                <div class="row">
-                    <div class="col-12">
-                        <div class="card">
-                            <div class="card-body">
-                                {% include 'partials/submissions/submission_title.html' with submission=recommendation.submission %}
-                                {% include 'partials/submissions/pool/submission_info_table.html' with submission=recommendation.submission %}
-                            </div>
-                        </div>
-
-                        <div class="card card-outline-secondary">
-                            {% include 'submissions/_recommendation_fellow_content.html' with recommendation=recommendation %}
-                            <div class="card-body">
-                                <h3 class="card-title">Voting results up to now:</h3>
-                                <ul>
-                                    <li>
-                                        Agreed ({{ recommendation.voted_for.all.count }}):
-                                        {% for agreed in recommendation.voted_for.all|sort_by:'user__last_name' %}
-                                            {{ agreed.user.last_name }}{% if not forloop.last %},{% endif %}
-                                        {% endfor %}
-                                    </li>
-                                    <li>
-                                        Disagreed ({{ recommendation.voted_against.all.count }}):
-                                        {% for disagreed in recommendation.voted_against.all|sort_by:'user__last_name' %}
-                                            {{ disagreed.user.last_name }}{% if not forloop.last %},{% endif %}
-                                        {% endfor %}
-                                    </li>
-                                    <li>
-                                        Abstained ({{ recommendation.voted_abstain.all.count }}):
-                                        {% for abstained in recommendation.voted_abstain.all|sort_by:'user__last_name' %}
-                                            {{ abstained.user.last_name }}{% if not forloop.last %},{% endif %}
-                                        {% endfor %}
-                                    </li>
-                                </ul>
-
-                                <h3 class="card-title">Remarks:</h3>
-                                <ul>
-                                  {% for rem in recommendation.remarks.all %}
-                                      <li>{% include 'partials/submissions/remark_small.html' with remark=rem %}</li>
-                                 {% empty %}
-                                     <li><em>No remarks</em></li>
-                                  {% endfor %}
-                                </ul>
-                            </div>
-                            <div class="card-footer">
-                                <h3>Your position on this recommendation</h3>
-                                <form action="{% url 'submissions:vote_on_rec' rec_id=recommendation.id %}" method="post">
-                                    {% csrf_token %}
-                                    {{ rec_vote_form|bootstrap:'0,12' }}
-                                    <input type="submit" name="submit" value="Cast your vote" class="btn btn-primary submitButton" id="submit-id-submit">
-                                </form>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            {% endfor %}
-            <hr>
-        {% endif %}
-
-        <div class="row">
-            <div class="col-12">
-                <h1 class="highlight mt-0">SciPost Submissions Pool</h1>
-            </div>
-        </div>
-
-        <div class="row hidden-lg-up">
-            <div class="col-12">
-                <h3>Submissions by status:</h3>
-                <ul>
-                {% for key, val in submission_status %}
-                    <li>
-                        <a href="{% url 'submissions:submissions_by_status' status=key %}">{{ val }}</a>
-                    </li>
-                {% endfor %}
-                </ul>
-            </div>
-        </div>
-
-        <hr class="hidden-lg-up">
-
-        <div class="row">
-            <div class="col-12">
-                <!-- Submissions list -->
-                {% for sub in submissions %}
-                    <div class="card card-outline-secondary mt-1" id="pool_submission_{{sub.id}}">
-                        {% include 'submissions/_submission_card_in_pool.html' with submission=sub remark_form=remark_form is_ECAdmin=is_ECAdmin user=request.user %}
-                    </div>
-                {% endfor %}
-            </div>
-        </div>
-    </div><!-- End page content -->
-
-    <!-- Sidebar -->
-    <div class="col-lg-4 hidden-md-down">
-        <div class="card card-outline-secondary">
-            <div class="card-body">
-                <h2 class="card-title">Pool</h2>
-                <!-- Status -->
-                <a href="#pool_filter_status" data-toggle="collapse" class="collapsed">
-                    <h3 class="card-title text-gray-dark">Submissions by status</h3>
-                </a>
-                <div id="pool_filter_status" class="collapse">
-                    <ul class="pl-4">
-                        {% for key, val in submission_status %}
-                            <li>
-                                <a href="{% url 'submissions:submissions_by_status' status=key %}">{{ val }}</a>
-                            </li>
-                        {% endfor %}
-                    </ul>
-                </div><!-- end status -->
-
-                {% if is_ECAdmin %}
-                    {% if recommendations.put_to_voting.exists %}
-                        <!-- Preparing -->
-                        <a href="#rec_filter_voting" data-toggle="collapse" class="collapsed">
-                            <h3 class="card-title text-gray-dark">Recommendations undergoing voting ({{recommendations_undergoing_voting|length}})</h3>
-                        </a>
-                        <div id="rec_filter_voting" class="collapse">
-                            <ul class="list-group list-group-flush">
-                                {% for recommendation in recommendations.put_to_voting %}
-                                    <li class="list-group-item">
-                                        <div class="card-body">
-                                            <a href="#undergoing_rec_{{recommendation.id}}">{{recommendation.submission.title}}</a>
-                                            <p class="text-muted my-0">{{recommendation.submission.author_list}}</p>
-                                            <p class="my-0">Formulated on {{recommendation.date_submitted}}</p>
-                                        </div>
-                                    </li>
-                                {% endfor %}
-                            </ul>
-                        </div><!-- end preparing -->
-                    {% endif %}
-
-                    {% if recommendations.voting_in_preparation.exists %}
-                        <!-- Preparing -->
-                        <a href="#rec_filter_prepare" data-toggle="collapse" class="collapsed">
-                            <h3 class="card-title text-gray-dark">Recommendations to prepare ({{recommendations_to_prepare_for_voting|length}})</h3>
-                        </a>
-                        <div id="rec_filter_prepare" class="collapse">
-                            <ul class="list-group list-group-flush">
-                                {% for recommendation in recommendations.voting_in_preparation %}
-                                    <li class="list-group-item">
-                                        <div class="card-body">
-                                            <a href="#prepare_rec_{{recommendation.id}}">{{recommendation.submission.title}}</a>
-                                            <p class="text-muted my-0">{{recommendation.submission.author_list}}</p>
-                                            <p class="my-0">Formulated on {{recommendation.date_submitted}}</p>
-                                        </div>
-                                    </li>
-                                {% endfor %}
-                            </ul>
-                        </div><!-- end preparing -->
-                    {% endif %}
-                {% endif %}
-
-                <!-- Pool -->
-                <a href="#pool_filter_submissions" data-toggle="collapse">
-                    <h3 class="card-title text-gray-dark">Submissions in pool ({{submissions|length}})</h3>
-                </a>
-                <div id="pool_filter_submissions" class="collapse show">
-                    <ul class="list-group list-group-flush">
-                        {% for submission in submissions %}
-                            <li class="list-group-item">
-                                <div class="card-body" style="overflow: auto;">
-                                    <a href="#pool_submission_{{submission.id}}">{{submission.title}}</a>
-                                    <p class="text-muted mb-1">{{submission.author_list}}</p>
-                                    <p class="label label-secondary label-sm my-2">{{submission.get_status_display}}</p>
-                                </div>
-                            </li>
-                        {% empty %}
-                            <li class="list-group-item">
-                                <h4 class="card-title"><em>No submission in the pool</em></h4>
-                            </li>
-                        {% endfor %}
-                    </ul>
-                </div><!-- end pool -->
-            </div>
-        </div>
-    </div>
-</div>
-
-{% endwith %}
-
-{% endblock %}
diff --git a/submissions/urls.py b/submissions/urls.py
index 1a10cce67..3981f846e 100644
--- a/submissions/urls.py
+++ b/submissions/urls.py
@@ -45,8 +45,6 @@ urlpatterns = [
         name='prefill_using_identifier'),
     url(r'^pool/$', views.pool, name='pool'),
     url(r'^pool/{regex}/$'.format(regex=SUBMISSIONS_COMPLETE_REGEX), views.pool, name='pool'),
-    url(r'^submissions_by_status/(?P<status>[a-zA-Z_]+)$',
-        views.submissions_by_status, name='submissions_by_status'),  # DEPRECATED
     url(r'^add_remark/{regex}$'.format(regex=SUBMISSIONS_COMPLETE_REGEX),
         views.add_remark, name='add_remark'),
 
-- 
GitLab