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 %}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a>
|
||||
<a href="{% url 'proposal_detail' proposal.pk %}">{{ proposal.title }}</a>
|
||||
</td>
|
||||
|
||||
<td>{{ proposal.kind.name }}</td>
|
||||
|
@ -31,9 +32,9 @@
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<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>
|
||||
<li><a href="{% url proposal_pending_decline proposal.id
|
||||
<li><a href="{% url 'proposal_pending_decline' proposal.id
|
||||
%}">{% trans 'Decline invitation' %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{% load url from future %}
|
||||
{% load i18n %}
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
@ -45,7 +46,7 @@
|
|||
<tr>
|
||||
<td><a href="{{ document.download_url }}">{{ document.description }}</a></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 %}
|
||||
<button type="submit" class="btn btn-mini">delete</button>
|
||||
</form>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% load url from future %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a>
|
||||
<a href="{% url 'proposal_detail' proposal.pk %}">{{ proposal.title }}</a>
|
||||
</td>
|
||||
|
||||
<td>{{ proposal.kind.name }}</td>
|
||||
|
@ -24,8 +25,8 @@
|
|||
<td>
|
||||
{% if not proposal.cancelled %}
|
||||
{% 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_speaker_manage proposal.id %}" class="btn btn-mini"><i class="icon-user"></i> Manage Additional Speakers</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>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{% extends "proposals/base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% load bootstrap_tags %}
|
||||
|
@ -13,6 +16,6 @@
|
|||
{% csrf_token %}
|
||||
<p>Are you sure you want to cancel <b>{{ proposal.title }}</b>?</p>
|
||||
<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>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{% extends "proposals/base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
|
||||
|
||||
{% load i18n %}
|
||||
{% load account_tags %}
|
||||
{% load bootstrap_tags %}
|
||||
|
@ -10,14 +13,14 @@
|
|||
<div class="pull-right">
|
||||
{% if not proposal.cancelled %}
|
||||
{% 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" %}
|
||||
</a>
|
||||
<a href="{% url proposal_cancel proposal.pk %}" class="btn">
|
||||
<a href="{% url 'proposal_cancel' proposal.pk %}" class="btn">
|
||||
{% trans "Cancel this proposal" %}
|
||||
</a>
|
||||
{% 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" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -52,7 +55,7 @@
|
|||
<tr>
|
||||
<td><a href="{{ document.download_url }}">{{ document.description }}</a></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 %}
|
||||
<button type="submit" class="btn btn-mini">{% trans 'delete' %}</button>
|
||||
</form>
|
||||
|
@ -63,7 +66,7 @@
|
|||
{% else %}
|
||||
<p>{% trans 'No supporting documents attached to this proposal.' %}</p>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{% extends "proposals/base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
|
||||
|
||||
{% load bootstrap_tags %}
|
||||
{% load markitup_tags %}
|
||||
|
||||
|
@ -8,7 +11,7 @@
|
|||
{% block body %}
|
||||
<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">
|
||||
{% csrf_token %}
|
||||
|
@ -17,7 +20,7 @@
|
|||
</fieldset>
|
||||
<div class="form-actions">
|
||||
<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>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{% extends "proposals/base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% load bootstrap_tags %}
|
||||
|
@ -7,7 +10,7 @@
|
|||
<h1>{% trans 'Proposal:' %} {{ proposal.title }}</h1>
|
||||
|
||||
<p>
|
||||
<a href="{% url proposal_edit proposal.pk %}">{% trans 'Edit proposal' %}
|
||||
<a href="{% url 'proposal_edit' proposal.pk %}">{% trans 'Edit proposal' %}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{% extends "proposals/base.html" %}
|
||||
|
||||
{% load url from future %}
|
||||
|
||||
|
||||
{% load boxes_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
|
@ -13,7 +16,7 @@
|
|||
|
||||
<ul>
|
||||
{% 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 %}
|
||||
</ul>
|
||||
{% else %}
|
||||
|
|
Loading…
Reference in a new issue