Use {% load url from future %} in proposals templates
Using https://github.com/futurecolors/django-future-url
This commit is contained in:
parent
935ec48032
commit
ed7278e926
8 changed files with 35 additions and 17 deletions
|
@ -1,8 +1,9 @@
|
||||||
|
{% load url from future %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a>
|
<a href="{% url 'proposal_detail' proposal.pk %}">{{ proposal.title }}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ proposal.kind.name }}</td>
|
<td>{{ proposal.kind.name }}</td>
|
||||||
|
@ -31,9 +32,9 @@
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="{% url proposal_pending_join proposal.id %}">
|
<li><a href="{% url 'proposal_pending_join' proposal.id %}">
|
||||||
{% trans 'Accept invitation' %}</a></li>
|
{% trans 'Accept invitation' %}</a></li>
|
||||||
<li><a href="{% url proposal_pending_decline proposal.id
|
<li><a href="{% url 'proposal_pending_decline' proposal.id
|
||||||
%}">{% trans 'Decline invitation' %}</a></li>
|
%}">{% trans 'Decline invitation' %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% load url from future %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ document.download_url }}">{{ document.description }}</a></td>
|
<td><a href="{{ document.download_url }}">{{ document.description }}</a></td>
|
||||||
<td>
|
<td>
|
||||||
<form style="margin: 0;" method="post" action="{% url proposal_document_delete document.pk %}">
|
<form style="margin: 0;" method="post" action="{% url 'proposal_document_delete' document.pk %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-mini">delete</button>
|
<button type="submit" class="btn btn-mini">delete</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
{% load url from future %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a>
|
<a href="{% url 'proposal_detail' proposal.pk %}">{{ proposal.title }}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ proposal.kind.name }}</td>
|
<td>{{ proposal.kind.name }}</td>
|
||||||
|
@ -24,8 +25,8 @@
|
||||||
<td>
|
<td>
|
||||||
{% if not proposal.cancelled %}
|
{% if not proposal.cancelled %}
|
||||||
{% if request.user == proposal.speaker.user and proposal.can_edit %}
|
{% if request.user == proposal.speaker.user and proposal.can_edit %}
|
||||||
<a href="{% url proposal_edit proposal.pk %}" class="btn btn-mini"><i class="icon-pencil"></i> Edit</a>
|
<a href="{% url 'proposal_edit' proposal.pk %}" class="btn btn-mini"><i class="icon-pencil"></i> Edit</a>
|
||||||
<a href="{% url proposal_speaker_manage proposal.id %}" class="btn btn-mini"><i class="icon-user"></i> Manage Additional Speakers</a>
|
<a href="{% url 'proposal_speaker_manage' proposal.id %}" class="btn btn-mini"><i class="icon-user"></i> Manage Additional Speakers</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "proposals/base.html" %}
|
{% extends "proposals/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% load bootstrap_tags %}
|
{% load bootstrap_tags %}
|
||||||
|
@ -13,6 +16,6 @@
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<p>Are you sure you want to cancel <b>{{ proposal.title }}</b>?</p>
|
<p>Are you sure you want to cancel <b>{{ proposal.title }}</b>?</p>
|
||||||
<input class="btn btn-danger" type="submit" value="I am sure" />
|
<input class="btn btn-danger" type="submit" value="I am sure" />
|
||||||
<a class="btn" href="{% url proposal_detail proposal.pk %}">{% trans 'No, keep it for now' %}</a>
|
<a class="btn" href="{% url 'proposal_detail' proposal.pk %}">{% trans 'No, keep it for now' %}</a>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "proposals/base.html" %}
|
{% extends "proposals/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load account_tags %}
|
{% load account_tags %}
|
||||||
{% load bootstrap_tags %}
|
{% load bootstrap_tags %}
|
||||||
|
@ -10,14 +13,14 @@
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{% if not proposal.cancelled %}
|
{% if not proposal.cancelled %}
|
||||||
{% if request.user == proposal.speaker.user %}
|
{% if request.user == proposal.speaker.user %}
|
||||||
<a href="{% url proposal_edit proposal.pk %}" class="btn">
|
<a href="{% url 'proposal_edit' proposal.pk %}" class="btn">
|
||||||
{% trans "Edit this proposal" %}
|
{% trans "Edit this proposal" %}
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url proposal_cancel proposal.pk %}" class="btn">
|
<a href="{% url 'proposal_cancel' proposal.pk %}" class="btn">
|
||||||
{% trans "Cancel this proposal" %}
|
{% trans "Cancel this proposal" %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url proposal_leave proposal.pk %}" class="btn">
|
<a href="{% url 'proposal_leave' proposal.pk %}" class="btn">
|
||||||
{% trans "Remove me from this proposal" %}
|
{% trans "Remove me from this proposal" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -52,7 +55,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ document.download_url }}">{{ document.description }}</a></td>
|
<td><a href="{{ document.download_url }}">{{ document.description }}</a></td>
|
||||||
<td>
|
<td>
|
||||||
<form style="margin: 0;" method="post" action="{% url proposal_document_delete document.pk %}">
|
<form style="margin: 0;" method="post" action="{% url 'proposal_document_delete' document.pk %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-mini">{% trans 'delete' %}</button>
|
<button type="submit" class="btn btn-mini">{% trans 'delete' %}</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -63,7 +66,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans 'No supporting documents attached to this proposal.' %}</p>
|
<p>{% trans 'No supporting documents attached to this proposal.' %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="btn btn-small{% if proposal.cancelled %} btn-disabled{% endif %}" href="{% url proposal_document_create proposal.pk %}"><i class="icon-upload"></i> {% trans 'Add Document' %}</a>
|
<a class="btn btn-small{% if proposal.cancelled %} btn-disabled{% endif %}" href="{% url 'proposal_document_create' proposal.pk %}"><i class="icon-upload"></i> {% trans 'Add Document' %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "proposals/base.html" %}
|
{% extends "proposals/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load bootstrap_tags %}
|
{% load bootstrap_tags %}
|
||||||
{% load markitup_tags %}
|
{% load markitup_tags %}
|
||||||
|
|
||||||
|
@ -8,7 +11,7 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Edit: {{ proposal.title }}</h1>
|
<h1>Edit: {{ proposal.title }}</h1>
|
||||||
|
|
||||||
<p><a href="{% url proposal_speaker_manage proposal.pk %}">Manage speakers</a></p>
|
<p><a href="{% url 'proposal_speaker_manage' proposal.pk %}">Manage speakers</a></p>
|
||||||
|
|
||||||
<form method="POST" action="" enctype="multipart/form-data">
|
<form method="POST" action="" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
@ -17,7 +20,7 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input class="btn btn-primary" type="submit" value="Save" />
|
<input class="btn btn-primary" type="submit" value="Save" />
|
||||||
<a class="btn" href="{% url proposal_detail proposal.pk %}">Cancel</a>
|
<a class="btn" href="{% url 'proposal_detail' proposal.pk %}">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{% extends "proposals/base.html" %}
|
{% extends "proposals/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% load bootstrap_tags %}
|
{% load bootstrap_tags %}
|
||||||
|
@ -7,7 +10,7 @@
|
||||||
<h1>{% trans 'Proposal:' %} {{ proposal.title }}</h1>
|
<h1>{% trans 'Proposal:' %} {{ proposal.title }}</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="{% url proposal_edit proposal.pk %}">{% trans 'Edit proposal' %}
|
<a href="{% url 'proposal_edit' proposal.pk %}">{% trans 'Edit proposal' %}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "proposals/base.html" %}
|
{% extends "proposals/base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load boxes_tags %}
|
{% load boxes_tags %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
|
@ -13,7 +16,7 @@
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for kind in kinds %}
|
{% for kind in kinds %}
|
||||||
<li><a href="{% url proposal_submit_kind kind.slug %}">{{ kind }}</a></li>
|
<li><a href="{% url 'proposal_submit_kind' kind.slug %}">{{ kind }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue