#205 show Application number in projector Tab
This commit is contained in:
parent
239f328372
commit
bf46342d17
|
@ -0,0 +1,23 @@
|
|||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
{% load tags %}
|
||||
|
||||
<ul style="line-height: 180%">
|
||||
{% for application in applications %}
|
||||
<li class="{% if application.active %}activeline{% endif %}">
|
||||
<a href="{% url projector_activate_slide application.sid %}" class="activate_link {% if application.active %}active{% endif %}">
|
||||
<div></div>
|
||||
</a>
|
||||
<a href="{% url projctor_preview_slide application.sid %}" title="{% trans 'Preview' %}" class="icon preview right">
|
||||
<span></span>
|
||||
</a>
|
||||
<a href="{% model_url application 'edit' %}">
|
||||
{% if application.number %}
|
||||
{% trans 'Application' %} {{ application.number }}:
|
||||
{% endif %}
|
||||
{{ application }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
@ -46,7 +46,7 @@ from utils.utils import template, permission_required, \
|
|||
render_to_forbitten, del_confirm_form, gen_confirm_form
|
||||
from utils.template import Tab
|
||||
|
||||
from projector.api import get_model_widget
|
||||
from projector.projector import Widget
|
||||
|
||||
from poll.views import PollFormView
|
||||
|
||||
|
@ -895,4 +895,7 @@ def register_tab(request):
|
|||
|
||||
|
||||
def get_widgets(request):
|
||||
return [get_model_widget(name='applications', model=Application)]
|
||||
return [
|
||||
Widget(name='applications', template='application/widget.html',
|
||||
context={'applications': Application.objects.all()})
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue