Commit 24d9bf15 authored by Mirko Vucicevich's avatar Mirko Vucicevich

Merge branch 'no-slides-slideshow-error' into 'master'

Better redirection for slideshows with no slides

See merge request !56
parents e5e662d5 27639a83
......@@ -1105,6 +1105,7 @@ def viewSlideshow(request, slideshow_id):
dimensions = [100.0 * aspect[0] / aspect[1], 100.0 * aspect[1] / aspect[0]]
else:
dimensions = [100, 56.25]
return render(request, 'slideshows/slideshow_no_slides_found.html')
return render(request, 'slideshows/slideshowrender.html', {'dimensions': dimensions, 'slideshow': slideshow, 'fs_src': '/slides/view/%s/' % first_slide.slide.id, 'fs_time': first_slide.length * 1000})
......
{% extends 'UI/skin.html' %}
{% load breadcrumbs %}
{% block breadcrumbs %}
{% breadcrumb_url 'Slideshows' 'slideshows' %}
{% endblock %}
{% block style %}
<style>
div.no-slides {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
}
</style>
{% endblock %}
{% block body %}
<div class="no-slides">
<h2>This slideshow has no slides!</h2>
<a href={% url 'slideshows' %} class="btn btn-primary btn-lg">Back to Slideshows</a>
</div>
{% endblock %}
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