From 6e63465feaca441e8534cf07af8162b9c2b3ba68 Mon Sep 17 00:00:00 2001 From: Tobias Schulmann Date: Sat, 30 Jun 2018 15:28:03 +1200 Subject: [PATCH] Basic styling for review section --- pinaxcon/templates/flatpages/homepage.html | 2 +- pinaxcon/templates/site_base.html | 4 +- .../symposion/reviews/_review_table.html | 2 +- .../templates/symposion/reviews/base.html | 141 ++++---- .../symposion/reviews/review_detail.html | 305 +++++++++--------- 5 files changed, 225 insertions(+), 229 deletions(-) diff --git a/pinaxcon/templates/flatpages/homepage.html b/pinaxcon/templates/flatpages/homepage.html index e33be9cf..4842e54e 100644 --- a/pinaxcon/templates/flatpages/homepage.html +++ b/pinaxcon/templates/flatpages/homepage.html @@ -12,7 +12,7 @@ integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgB crossorigin=""> {% endblock %} -{% block body %} +{% block body_out %}
diff --git a/pinaxcon/templates/site_base.html b/pinaxcon/templates/site_base.html index 12ac14b8..7167e7b6 100644 --- a/pinaxcon/templates/site_base.html +++ b/pinaxcon/templates/site_base.html @@ -57,10 +57,10 @@

{% block page_title %}{% endblock %}

{% block body_base %} - {% block body %} + {% block body_out %}
-
+
{% block body_outer %} {% endblock %}
diff --git a/pinaxcon/templates/symposion/reviews/_review_table.html b/pinaxcon/templates/symposion/reviews/_review_table.html index bc0e6508..0870b1a4 100644 --- a/pinaxcon/templates/symposion/reviews/_review_table.html +++ b/pinaxcon/templates/symposion/reviews/_review_table.html @@ -1,6 +1,6 @@ {% load i18n %} - +
diff --git a/pinaxcon/templates/symposion/reviews/base.html b/pinaxcon/templates/symposion/reviews/base.html index 7ea259c1..1b8d7a2d 100644 --- a/pinaxcon/templates/symposion/reviews/base.html +++ b/pinaxcon/templates/symposion/reviews/base.html @@ -6,82 +6,81 @@ {% block body_class %}reviews{% endblock %} {% block body_outer %} -
-
-
- -
-
- {% block sidebar %} - {% for section in review_sections %} - -
- {% block body %} - {% endblock %} +
+
+ {% block sidebar %} + {% for section in review_sections %} + + {% endfor %} + {% endblock %}
-
+ + +
+ {% block body %} + {% endblock %} +
+
+ {% endblock %} {% block extra_script %} - + - + + + $("table.table-reviews").dataTable({ + "stateSave": true, + "lengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]], + "pageLength": 100, + "colReorder": true, + "buttons": [{ + extend: 'collection', + text: 'Export', + buttons: ["copy", "csv", "print"] + }, + { extend: 'collection', + text: 'Columns', + buttons: [ + { extend: 'columnsToggle', + columns: '.toggle' }, + { extend: 'columnToggle', + text: 'Vote details', + columns: '.votes' + } + ] +}]}); + {% endblock %} diff --git a/pinaxcon/templates/symposion/reviews/review_detail.html b/pinaxcon/templates/symposion/reviews/review_detail.html index fc831487..58922920 100644 --- a/pinaxcon/templates/symposion/reviews/review_detail.html +++ b/pinaxcon/templates/symposion/reviews/review_detail.html @@ -6,183 +6,180 @@ {% block body %} - - - {% if is_manager %} -
-
- {% csrf_token %} -
- {% if proposal.result.status == "accepted" %} - Accepted - - - {% else %} - {% if proposal.result.status == "rejected" %} - Rejected - - {% else %} - {% if proposal.result.status == "standby" %} - Standby - - {% else %} - Undecided - - {% endif %} - {% endif %} - {% endif %} -
- -
- {% endif %} - -

#{{ proposal.number }}: {{ proposal.title }} ({{ proposal.speaker }})

- -
- -
-
- {% include "symposion/proposals/_proposal_fields.html" %} +{% if is_manager %} +
+
+ {% csrf_token %} +
+ {% if proposal.result.status == "accepted" %} + Accepted + -
+ + {% else %} + {% if proposal.result.status == "rejected" %} + Rejected + + {% else %} + {% if proposal.result.status == "standby" %} + Standby + + {% else %} + Undecided + + {% endif %} + {% endif %} + {% endif %} +
+ +
+{% endif %} -

{% trans "Current Results" %}

-
# {% trans "Speaker / Title" %}
- - - - - - - - - - - - - - - -
+2 votes+1 votes-1 votes-2 votes{% trans "Total Responses" %} -
{{ proposal.plus_two }}{{ proposal.plus_one }}{{ proposal.minus_one }}{{ proposal.minus_two }}{{ proposal.total_votes }}
+

#{{ proposal.number }}: {{ proposal.title }} ({{ proposal.speaker }})

-
- - {% if review_form %} +
+ +
+
+ {% include "symposion/proposals/_proposal_fields.html" %} +
+
+
+
+

{% trans "Current Results" %}

+ + + + + + + + + + + + + + + + + +
+2 votes+1 votes-1 votes-2 votes{% trans "Total Responses" %}
{{ proposal.plus_two }}{{ proposal.plus_one }}{{ proposal.minus_one }}{{ proposal.minus_two }}{{ proposal.total_votes }}
+ +
+ + {% if review_form %}
{% trans "Submit Review" %}

Enter your vote and any comment to go along with it. You can revise your vote or comment multiple times with an existing vote (your previously recorded score will be replaced during calculations). Your vote and comments are not public and will only be viewable by other reviewers.

{% csrf_token %} - {{ review_form|bootstrap }} -
- - -
+ {{ review_form|bootstrap }} +
+ + +
- {% else %} + {% else %}

You do not have permission to vote on this proposal.

- {% endif %} - - {% if reviews %} + {% endif %} + + {% if reviews %}
Review Comments
{% for review in reviews %} -
-
- {{ review.vote }} -
- {% if is_manager %} -
-
- {% csrf_token %} - -
-
- {% endif %} -
-   - - {% if review.user.speaker_profile %} - {{ review.user.speaker_profile.name }} - {% else %} - {{ review.user.username }} - {% endif %} - - {{ review.submitted_at|timesince }} ago
- {{ review.comment_html|safe }} -
+
+
+ {{ review.vote }}
+ {% if is_manager %} +
+
+ {% csrf_token %} + +
+
+ {% endif %} +
+   + + {% if review.user.speaker_profile %} + {{ review.user.speaker_profile.name }} + {% else %} + {{ review.user.username }} + {% endif %} + + {{ review.submitted_at|timesince }} ago
+ {{ review.comment_html|safe }} +
+
{% endfor %} - {% endif %} + {% endif %} +
-
- {% if review_messages %} -

{% trans "Conversation with the submitter" %}

+
+
+
+
+ {% if review_messages %} +

{% trans "Conversation with the submitter" %}

{% for message in review_messages %} -
-
- {{ message.user.username }} - {{ message.submitted_at|timesince }} ago
- {{ message.message|safe }} -
+
+
+ {{ message.user.username }} + {{ message.submitted_at|timesince }} ago
+ {{ message.message|safe }}
+
{% endfor %}
- {% endif %} - -
- {% trans "Send a message" %} -

- {% blocktrans %} + {% endif %} + + +

{% trans "Send a message" %}

+

+ {% blocktrans %} If you'd like to communicate with the submitter, use the following form and he or she will be notified and given the opportunity to respond. - {% endblocktrans %} -

- {% csrf_token %} - {{ message_form|bootstrap }} -
- -
-
+ {% endblocktrans %} +

+ {% csrf_token %} + {{ message_form|bootstrap }} +
+ +
+ +
+
- + +
+
+
+
{% endblock %}