Commit 2babe908 authored by Mirko Vucicevich's avatar Mirko Vucicevich

Merge branch 'extended-widget-changelog' into 'master'

Extended widget changelog

See merge request !61
parents bc435477 ea254b98
......@@ -132,6 +132,21 @@ def frontpage(request):
}
return render(request, 'UI/frontpage.html', context)
# This screen shows all the widget changes
@login_required
def changeLog(request):
# Loading changed layers
changed_layers = Version.objects.filter(
layer__shared=True,
publish=True
).distinct().order_by('-edit_date')
context = {
'changed_layers': changed_layers,
}
return render(request, 'layers/layer_new_and_updated.html', context)
def ajaximage(request):
if request.method == "POST":
......
......@@ -57,6 +57,7 @@ urlpatterns = [
url(r'^widgets/newedit/$', layers.views.editLayernew, name="edit_layer_new_new"),
url(r'^widgets/newedit/(?P<layer_id>\d+)/$', layers.views.editLayernew, name="edit_layer_new"),
url(r'^widgets/changelog/$', layers.views.changeLog, name="layer_change_log"),
# Slide Editing
url(r'^slides/$', layers.views.manageSlides, name="slides"),
......
......@@ -85,6 +85,11 @@
{% if version.last_edit %}By {{version.last_edit}}: {% endif %}{{ version.changes }}</li>
{% endfor %}
</ul>
<div class="row">
<div class="col text-center">
<button class="btn btn-primary btn-sm" onclick="location.href='{% url 'layer_change_log' %}'" >Show More</button>
</div>
</div>
</info-panel>
</div>
</div>
......
{% extends 'UI/skin.html' %}
{% load breadcrumbs %}
{% block breadcrumbs %}
{% breadcrumb_url 'Widgets' 'layers' %}
{% breadcrumb_url 'Widget Changelog' 'layer_change_log' %}
{% endblock %}
{% block style %}
<style>
.container {
padding-top: 50px;
}
</style>
{% endblock %}
{% block body %}
<div class="container">
<div class="row">
<info-panel title="New and Updated">
<ul class="fa-ul">
{% for version in changed_layers %}
<li><i class="fa-li fa fa-angle-double-right"></i><b>{{ version.layer.title }}</b> - {{ version.edit_date }}
<br/>
{% if version.last_edit %}By {{version.last_edit}}: {% endif %}{{ version.changes }}</li>
{% endfor %}
</ul>
</info-panel>
</div>
</div>
{% endblock %}
......@@ -23,6 +23,7 @@
<info-panel title="Individually-packaged content delivery">
Widgets are self-contained customizable objects which can be added to your slides. Things like an image, a youtube video, a calender, or a clock can all be widgets which can be added to slides. Each widget is a simple construct of javascript, css, html, and jinja which allows users to easily develop their own widgets. Here you will find all the widgets that are in the official repository, widgets which you yourself have created, and widgets which you have added to your account.
</info-panel>
<button class="btn btn-primary btn-md" onclick="location.href='{% url 'layer_change_log' %}'">View Widget Changelog</button>
</div>
<div id="listLayersLoader" class="col-lg-8 col-md-7 col-xs-12">
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment