Added custom slides portlet.
This commit is contained in:
parent
3d0fe9b565
commit
dc863cc3b9
@ -16,7 +16,7 @@ class ProjectorSlide(models.Model, SlideMixin):
|
||||
|
||||
title = models.CharField(max_length=100, verbose_name=_("Title"))
|
||||
text = models.TextField(null=True, blank=True, verbose_name=_("Text"))
|
||||
weight = models.IntegerField(default=0, verbose_name=_("Weight"))
|
||||
#weight = models.IntegerField(default=0, verbose_name=_("Weight"))
|
||||
|
||||
def slide(self):
|
||||
return {
|
||||
|
@ -11,6 +11,7 @@ $(function() {
|
||||
success: function(data) {
|
||||
$('.activate_link').removeClass('active');
|
||||
$('li').removeClass('activeline');
|
||||
$('div').removeClass('activeline');
|
||||
link.addClass('active');
|
||||
link.parent().addClass('activeline');
|
||||
},
|
||||
|
@ -64,7 +64,7 @@
|
||||
{% if category != 'projector' %}
|
||||
<div class="portlet">
|
||||
{% with category_big=category|capfirst %}
|
||||
<div class="portlet-header">{% trans category_big %}</div>
|
||||
<div class="portlet-header">{% trans category_big %}</div>
|
||||
{% endwith %}
|
||||
<div class="portlet-content">
|
||||
{% for slides in group %}
|
||||
@ -143,5 +143,29 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- end portlet-->
|
||||
|
||||
<!-- Custom slides -->
|
||||
{% for category, group in categories.items %}
|
||||
{% if category == 'projector' %}
|
||||
<div class="portlet">
|
||||
<div class="portlet-header">{% trans "Custom slides" %}</div>
|
||||
<div class="portlet-content">
|
||||
{% for slides in group %}
|
||||
{% if slides.control_template %}
|
||||
{% include slides.control_template %}
|
||||
{% endif %}
|
||||
{% if not forloop.last %}
|
||||
<hr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<a href='{% url custom_slides_new %}'>
|
||||
<button class="button" type="button" onclick="window.location='{% url custom_slides_new %}'">
|
||||
<span class="icon add">{%trans 'New slide' %}</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div> <!-- end portlet-->
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div> <!-- end column -->
|
||||
{% endblock %}
|
||||
|
@ -3,10 +3,10 @@
|
||||
{% load tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} – {%trans "New Slide" %}{% endblock %}
|
||||
{% block title %}{{ block.super }} – {%trans "New custom slide" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans 'New Slide' %}</h1>
|
||||
<h1>{% trans 'New custom slide' %}</h1>
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button class="button" type="submit">
|
||||
|
@ -53,7 +53,7 @@ urlpatterns = patterns('projector.views',
|
||||
template_name='projector/new.html',
|
||||
permission_required='projector.can_manage_projector'
|
||||
),
|
||||
name='projector_new',
|
||||
name='custom_slides_new',
|
||||
),
|
||||
|
||||
url(r'^bigger/$', 'projector_edit', {'direction': 'bigger'},
|
||||
|
@ -395,7 +395,7 @@ input[type="submit"], input[type="button"] {
|
||||
.button .import{
|
||||
background:url(../images/icons/import.png) no-repeat 0px 0px;
|
||||
}
|
||||
.button .add{
|
||||
.add{
|
||||
background:url(../images/icons/add.png) no-repeat 0px 0px;
|
||||
}
|
||||
.button .number{
|
||||
|
Loading…
Reference in New Issue
Block a user