Use {% load url from future %} in reviews templates
Using https://github.com/futurecolors/django-future-url
This commit is contained in:
parent
ed7278e926
commit
4c912da4ac
9 changed files with 53 additions and 28 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
{% load url from future %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped table-bordered table-reviews">
|
<table class="table table-striped table-bordered table-reviews">
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
<tr class="{{ proposal.user_vote_css }}">
|
<tr class="{{ proposal.user_vote_css }}">
|
||||||
<td>{{ proposal.number }}</td>
|
<td>{{ proposal.number }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url review_detail proposal.pk %}">
|
<a href="{% url 'review_detail' proposal.pk %}">
|
||||||
<small><strong>{{ proposal.speaker }}</strong></small>
|
<small><strong>{{ proposal.speaker }}</strong></small>
|
||||||
<br />
|
<br />
|
||||||
{{ proposal.title }}
|
{{ proposal.title }}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "site_base.html" %}
|
{% extends "site_base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load sitetree %}
|
{% load sitetree %}
|
||||||
|
|
||||||
|
@ -60,25 +63,25 @@
|
||||||
{{ section }}
|
{{ section }}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url review_section section.section.slug %}">
|
<a href="{% url 'review_section' section.section.slug %}">
|
||||||
{% trans "All Reviews" %}
|
{% trans "All Reviews" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% comment %}
|
{% comment %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url review_section_assignments section.section.slug %}">
|
<a href="{% url 'review_section_assignments' section.section.slug %}">
|
||||||
{% trans "Your Assignments" %}
|
{% trans "Your Assignments" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url review_status section.section.slug %}">
|
<a href="{% url 'review_status' section.section.slug %}">
|
||||||
{% trans "Voting Status" %}
|
{% trans "Voting Status" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if request.user.is_staff %}
|
{% if request.user.is_staff %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url result_notification section.section.slug 'accepted' %}">Result Notification</a>
|
<a href="{% url 'result_notification' section.section.slug 'accepted' %}">Result Notification</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "reviews/base.html" %}
|
{% extends "reviews/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block extra_style %}
|
{% block extra_style %}
|
||||||
|
@ -13,14 +16,14 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<ul class="nav nav-pills">
|
<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 == '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 == '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>
|
<li{% if status == 'standby' %} class="active"{% endif %}><a href="{% url 'result_notification' section_slug 'standby' %}">standby</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h1>Result Notification</h1>
|
<h1>Result Notification</h1>
|
||||||
|
|
||||||
<form method="post" action="{% url result_notification_prepare section_slug status %}">
|
<form method="post" action="{% url 'result_notification_prepare' section_slug status %}">
|
||||||
|
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
|
@ -54,7 +57,7 @@
|
||||||
<td><input class="action-select" type="checkbox" name="_selected_action" value="{{ proposal.pk }}"></td>
|
<td><input class="action-select" type="checkbox" name="_selected_action" value="{{ proposal.pk }}"></td>
|
||||||
<td>{{ proposal.number }}</td>
|
<td>{{ proposal.number }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url review_detail proposal.pk %}">
|
<a href="{% url 'review_detail' proposal.pk %}">
|
||||||
<small><strong>{{ proposal.speaker }}</strong></small>
|
<small><strong>{{ proposal.speaker }}</strong></small>
|
||||||
<br />
|
<br />
|
||||||
{{ proposal.title }}
|
{{ proposal.title }}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "reviews/base.html" %}
|
{% extends "reviews/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
@ -23,7 +26,7 @@
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<h2>Email</h2>
|
<h2>Email</h2>
|
||||||
|
|
||||||
<form method="post" action="{% url result_notification_send section_slug status %}">
|
<form method="post" action="{% url 'result_notification_send' section_slug status %}">
|
||||||
|
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
|
@ -42,7 +45,7 @@
|
||||||
{% include "reviews/_result_notification_prepare_help.html" %}
|
{% include "reviews/_result_notification_prepare_help.html" %}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Send {{ proposals|length }} Email{{ proposals|length|pluralize }}</button>
|
<button type="submit" class="btn btn-primary">Send {{ proposals|length }} Email{{ proposals|length|pluralize }}</button>
|
||||||
<a class="btn" href="{% url result_notification section_slug status %}">Cancel</a>
|
<a class="btn" href="{% url 'result_notification' section_slug status %}">Cancel</a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "reviews/base.html" %}
|
{% extends "reviews/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Reviewers</h1>
|
<h1>Reviewers</h1>
|
||||||
|
|
||||||
|
@ -30,7 +33,7 @@
|
||||||
{% for reviewer in reviewers %}
|
{% for reviewer in reviewers %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url review_list_user section_slug reviewer.pk %}">{{ reviewer.get_full_name }}</a>
|
<a href="{% url 'review_list_user' section_slug reviewer.pk %}">{{ reviewer.get_full_name }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ reviewer.total_votes }}
|
{{ reviewer.total_votes }}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "reviews/base.html" %}
|
{% extends "reviews/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Review Assignments</h1>
|
<h1>Review Assignments</h1>
|
||||||
|
|
||||||
|
@ -13,12 +16,12 @@
|
||||||
{% for assignment in assignments %}
|
{% for assignment in assignments %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url review_detail assignment.proposal.pk %}">
|
<a href="{% url 'review_detail' assignment.proposal.pk %}">
|
||||||
{{ assignment.proposal.title }}
|
{{ assignment.proposal.title }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<form method="post" action="{% url review_assignment_opt_out assignment.pk %}">
|
<form method="post" action="{% url 'review_assignment_opt_out' assignment.pk %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="submit" value="Opt-out" />
|
<input type="submit" value="Opt-out" />
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "reviews/base.html" %}
|
{% extends "reviews/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load markitup_tags %}
|
{% load markitup_tags %}
|
||||||
{% load bootstrap_tags %}
|
{% load bootstrap_tags %}
|
||||||
|
@ -126,7 +129,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% if is_manager %}
|
{% if is_manager %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<form class="form-inline" action="{% url review_delete review.id %}" method="POST">
|
<form class="form-inline" action="{% url 'review_delete' review.id %}" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button class="btn btn-mini btn-danger" type="submit">Delete</button>
|
<button class="btn btn-mini btn-danger" type="submit">Delete</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "site_base.html" %}
|
{% extends "site_base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load markitup_tags %}
|
{% load markitup_tags %}
|
||||||
{% load uni_form_tags %}
|
{% load uni_form_tags %}
|
||||||
|
|
||||||
|
@ -55,7 +58,7 @@
|
||||||
|
|
||||||
<h2>Review</h2>
|
<h2>Review</h2>
|
||||||
|
|
||||||
<form method="POST" action="{% url review_review proposal.pk %}" class="uniForm">
|
<form method="POST" action="{% url 'review_review' proposal.pk %}" class="uniForm">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<fieldset class="inlineLabels">
|
<fieldset class="inlineLabels">
|
||||||
{{ review_form|as_uni_form }}
|
{{ review_form|as_uni_form }}
|
||||||
|
@ -67,7 +70,7 @@
|
||||||
|
|
||||||
<h2>Comment</h2>
|
<h2>Comment</h2>
|
||||||
|
|
||||||
<form method="POST" action="{% url review_comment proposal.pk %}" class="uniForm">
|
<form method="POST" action="{% url 'review_comment' proposal.pk %}" class="uniForm">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{ comment_form|as_uni_form }}
|
{{ comment_form|as_uni_form }}
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
{% extends "reviews/base.html" %}
|
{% extends "reviews/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Voting Status ({{ section_slug }})</h1>
|
<h1>Voting Status ({{ section_slug }})</h1>
|
||||||
|
|
||||||
{% if key %}
|
{% if key %}
|
||||||
<div class="breadcrumbs">
|
<div class="breadcrumbs">
|
||||||
<a href="{% url review_status section_slug "positive" %}">Positive</a> |
|
<a href="{% url 'review_status' section_slug "positive" %}">Positive</a> |
|
||||||
<a href="{% url review_status section_slug "negative" %}">Negative</a> |
|
<a href="{% url 'review_status' section_slug "negative" %}">Negative</a> |
|
||||||
<a href="{% url review_status section_slug "indifferent" %}">Indifferent</a> |
|
<a href="{% url 'review_status' section_slug "indifferent" %}">Indifferent</a> |
|
||||||
<a href="{% url review_status section_slug "controversial" %}">Controversial</a> |
|
<a href="{% url 'review_status' section_slug "controversial" %}">Controversial</a> |
|
||||||
<a href="{% url review_status section_slug "too_few" %}">Too Few</a>
|
<a href="{% url 'review_status' section_slug "too_few" %}">Too Few</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -42,35 +45,35 @@
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="{% url review_status section_slug "positive" %}">Positive</a>
|
<a href="{% url 'review_status' section_slug "positive" %}">Positive</a>
|
||||||
<span class="badge">{{ proposals.positive|length }}</span>
|
<span class="badge">{{ proposals.positive|length }}</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and at least one +1 and no −1s
|
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and at least one +1 and no −1s
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="{% url review_status section_slug "negative" %}">Negative</a>
|
<a href="{% url 'review_status' section_slug "negative" %}">Negative</a>
|
||||||
<span class="badge">{{ proposals.negative|length }}</span>
|
<span class="badge">{{ proposals.negative|length }}</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and at least one −1 and no +1s
|
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and at least one −1 and no +1s
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="{% url review_status section_slug "indifferent" %}">Indifferent</a>
|
<a href="{% url 'review_status' section_slug "indifferent" %}">Indifferent</a>
|
||||||
<span class="badge">{{ proposals.indifferent|length }}</span>
|
<span class="badge">{{ proposals.indifferent|length }}</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and neither a +1 or a −1
|
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and neither a +1 or a −1
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="{% url review_status section_slug "controversial" %}">Controversial</a>
|
<a href="{% url 'review_status' section_slug "controversial" %}">Controversial</a>
|
||||||
<span class="badge">{{ proposals.controversial|length }}</span>
|
<span class="badge">{{ proposals.controversial|length }}</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and both a +1 and −1
|
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and both a +1 and −1
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="{% url review_status section_slug "too_few" %}">Too Few Reviews</a>
|
<a href="{% url 'review_status' section_slug "too_few" %}">Too Few Reviews</a>
|
||||||
<span class="badge">{{ proposals.too_few|length }}</span>
|
<span class="badge">{{ proposals.too_few|length }}</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
Loading…
Reference in a new issue