~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to views/campaign-preview.twig

  • Committer: Dan Garner
  • Date: 2015-08-11 09:29:02 UTC
  • mto: This revision was merged to the branch mainline in revision 453.
  • Revision ID: git-v1:a86fb4369b7395c13367577d23b14c0ab4528c1a
Transitions fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{#
2
 
/*
3
 
 * Spring Signage Ltd - http://www.springsignage.com
4
 
 * Copyright (C) 2017 Spring Signage Ltd
5
 
 * (campaign-page.twig)
6
 
 */
7
 
This is the template for the campaign page
8
 
#}
9
 
{% extends "authed.twig" %}
10
 
{% import "inline.twig" as inline %}
11
 
 
12
 
{% block pageContent %}
13
 
    <div class="widget">
14
 
        <div class="widget-title">
15
 
            {% set campaignName = campaign.campaign %}
16
 
            {% if campaign.isLayoutSpecific %}
17
 
                {% trans %}Layout Preview for {{ campaignName }}{% endtrans %}
18
 
            {% else %}
19
 
                {% trans %}Campaign Preview for {{ campaignName }}{% endtrans %}
20
 
            {% endif %}
21
 
        </div>
22
 
        <div class="widget-body">
23
 
            <p><b>{% trans "total duration" %}</b> {{ duration|datehms }} <i>({% trans "hours:min:sec" %})</i></p>
24
 
            <p><b>{% trans "number of layouts" %}</b> : {{ campaign.numberLayouts }} </p>
25
 
            <div class="row clearfix">
26
 
                {% for extendedLayout in extendedLayouts %}
27
 
                    <div class="col-sm-6 col-md-4 col-lg-3">
28
 
                        <div class="row">
29
 
                            <div class="col-sm-12">
30
 
                                <div class="embed-responsive embed-responsive-4by3">
31
 
                                    <div class="embed-responsive-item preview-container"
32
 
                                         data-url="{{ urlFor('layout.preview', { "id": extendedLayout.layout.layoutId }) }}'">
33
 
                                        {% include 'layout-preview-partial.twig' with {'layout': extendedLayout.layout, 'previewOptions': extendedLayout.previewOptions } %}
34
 
                                    </div>
35
 
                                </div>
36
 
                            </div>
37
 
                        </div>
38
 
                        <div class="row">
39
 
                            <div class="col-sm-8">
40
 
                                <small>{% trans "id" %}:</small> {{ extendedLayout.layout.layoutId }}<br/>
41
 
                                <small>{% trans "name" %}:</small> {{ extendedLayout.layout.layout }}<br/>
42
 
                                <small>{% trans "duration" %}:</small> {{ extendedLayout.duration|datehms }}<br/>
43
 
                            </div>
44
 
                            <div class="col-sm-4">
45
 
                                <a class="btn btn-default btn-sm" href="{{ urlFor("layout.preview", {id: extendedLayout.layout.layoutId}) }}" target="_blank">
46
 
                                    {% trans "Open full screen" %}
47
 
                                    <span class="fa fa-tablet"></span>
48
 
                                </a>
49
 
                            </div>
50
 
                        </div>
51
 
                    </div>
52
 
                {% endfor %}
53
 
            </div>
54
 
        </div>
55
 
    </div>
56
 
{% endblock %}
57
 
 
58
 
{% block javaScript %}
59
 
    <script src="{{ theme.uri("libraries/jquery/jquery-1.11.1.min.js") }}"></script>
60
 
    <script src="{{ theme.uri("libraries/html5preloader/html5Preloader.js") }}"></script>
61
 
    <script src="{{ theme.uri("js/html-preview.js") }}"></script>
62
 
    <script type="text/javascript">
63
 
        (function($){
64
 
          $(document).ready(function(){
65
 
            {% for extendedLayout in extendedLayouts %}
66
 
              dsInit({{ extendedLayout.layout.layoutId }}, {{ extendedLayout.previewOptions|json_encode()|raw }}, false);
67
 
            {% endfor %}
68
 
          });
69
 
        }(jQuery));
70
 
    </script>
71
 
{% endblock %}
72
 
 
73
 
{% block headContent %}
74
 
        <link rel="stylesheet" type="text/css" href="{{ theme.uri("css/html-preview.css") }}" />
75
 
{% endblock %}