{# /** * Copyright (C) 2020 Xibo Signage Ltd * * Xibo - Digital Signage - http://www.xibo.org.uk * * This file is part of Xibo. * * Xibo is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * Xibo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Xibo. If not, see . */ #} {% extends "form-base.twig" %} {% import "forms.twig" as forms %} {% import "inline.twig" as inline %} {% block formTitle %} {% set campaignName = campaign.campaign %} {% trans %}Edit Campaign "{{ campaignName }}"{% endtrans %} {% endblock %} {% block formButtons %} {% trans "Cancel" %}, XiboDialogClose() {% trans "Save" %}, campaignFormSubmit($('#campaignEditForm')) {% endblock %} {% block callBack %}campaignAssignLayoutsFormOpen{% endblock %} {% block formHtml %}
{% if currentUser.featureEnabled('folder.view') %}
{{ forms.hidden('folderId', campaign.folderId) }} {% endif %} {% set title %}{% trans "Name" %}{% endset %} {% set helpText %}{% trans "The Name for this Campaign" %}{% endset %} {{ forms.input("name", title, campaign.campaign, helpText) }} {% if currentUser.featureEnabled("tag.tagging") %} {% set title %}{% trans "Tags" %}{% endset %} {% set helpText %}{% trans "Tags for this Campaign - Comma separated string of Tags or Tag|Value format. If you choose a Tag that has associated values, they will be shown for selection below." %}{% endset %} {{ forms.inputWithTags("tags", title, campaign.getTagString(), helpText, 'tags-with-value') }}

{% set title %}{% trans "Tag value" %}{% endset %} {{ forms.dropdown("tagValue", "single", title, "", options, "key", "value") }}
{% set title %}{% trans "Tag value" %}{% endset %} {% set helpText %}{% trans "Please provide the value for this Tag and confirm by pressing enter on your keyboard." %}{% endset %} {{ forms.input("tagValueInput", title, "", helpText) }}

{% trans "This tag requires a set value, please select one from the Tag value dropdown or provide Tag value in the dedicated field." %}

{% endif %} {% set title %}{% trans "Enable cycle based playback" %}{% endset %} {% set helpText %}{% trans "When cycle based playback is enabled only 1 Layout from this Campaign will be played each time it is in a Schedule loop. The same Layout will be shown until the 'Play count' is achieved." %}{% endset %} {{ forms.checkbox("cyclePlaybackEnabled", title, campaign.cyclePlaybackEnabled, helpText, "campaign-type-list", null, false, "input-cycle-playback-enabled") }} {% set title %}{% trans "Play count" %}{% endset %} {% set helpText %}{% trans "In cycle based playback, how many plays should each Layout have before moving on?" %}{% endset %} {{ forms.number("playCount", title, campaign.playCount, helpText, "cycle-based-playback campaign-type-list") }} {% set title %}{% trans "List play order" %}{% endset %} {% set helpText %}{% trans "When this campaign is scheduled alongside another campaign with the same display order, how should the layouts in both campaigns be ordered?" %}{% endset %} {% set options = [ { id: "round", name: "Round-robin"|trans }, { id: "block", name: "Block"|trans }, ] %} {{ forms.dropdown("listPlayOrder", "single", title, campaign.listPlayOrder, options, "id", "name", helpText, "campaign-type-list no-cycle-based-playback") }}
{{ forms.message("Add reference fields if needed"|trans) }} {% set title %}{% trans "Reference 1" %}{% endset %} {{ forms.input("ref1", title, campaign.ref1, null) }} {% set title %}{% trans "Reference 2" %}{% endset %} {{ forms.input("ref2", title, campaign.ref2, null) }} {% set title %}{% trans "Reference 3" %}{% endset %} {{ forms.input("ref3", title, campaign.ref3, null) }} {% set title %}{% trans "Reference 4" %}{% endset %} {{ forms.input("ref4", title, campaign.ref4, null) }} {% set title %}{% trans "Reference 5" %}{% endset %} {{ forms.input("ref5", title, campaign.ref5, null) }}
{{ forms.hidden("manageLayouts", 0) }}
    {% set title %}{% trans "ID" %}{% endset %} {{ inline.number("campaignId", title) }} {% set title %}{% trans "Name" %}{% endset %} {{ inline.input("layout", title) }} {% if currentUser.featureEnabled("tag.tagging") %} {% set title %}{% trans "Tags" %}{% endset %} {% set exactTagTitle %}{% trans "Exact match?" %}{% endset %} {% set logicalOperatorTitle %}{% trans "When filtering by multiple Tags, which logical operator should be used?" %}{% endset %} {% set helpText %}{% trans "A comma separated list of tags to filter by. Enter a tag|tag value to filter tags with values. Enter --no-tag to filter all items without tags. Enter - before a tag or tag value to exclude from results." %}{% endset %} {{ inline.inputWithTags("tags", title, null, helpText, null, null, null, "exactTags", exactTagTitle, logicalOperatorTitle) }} {% endif %} {% if currentUser.featureEnabled("folder.view") %} {% set title %}{% trans "Folder Filter" %}{% endset %} {% set attributes = [ { name: "data-width", value: "100%" }, { name: "data-search-url", value: url_for("folders.search") }, { name: "data-filter-options", value: '{"gridView":1}' }, { name: "data-search-term", value: "folderName" }, { name: "data-id-property", value: "folderId" }, { name: "data-text-property", value: "text" }, { name: "data-initial-key", value: "folderId" }, { name: "data-allow-clear", value: "true" }, { name: "data-placeholder--id", value: null }, { name: "data-placeholder--value", value: "" } ] %} {{ inline.dropdown("folderId", "single", title, "", null, "", "", helpText, "pagedSelect", "", "", "", attributes) }} {% endif %} {% set title %}{% trans "Owner" %}{% endset %} {% set helpText %}{% trans "Show items owned by the selected User." %}{% endset %} {% set attributes = [ { name: "data-width", value: "200px" }, { name: "data-allow-clear", value: "true" }, { name: "data-placeholder--id", value: null }, { name: "data-placeholder--value", value: "" }, { name: "data-search-url", value: url_for("user.search") }, { name: "data-search-term", value: "userName" }, { name: "data-search-term-tags", value: "tags" }, { name: "data-id-property", value: "userId" }, { name: "data-text-property", value: "userName" }, { name: "data-initial-key", value: "userId" }, ] %} {{ inline.dropdown("userId", "single", title, "", null, "userId", "userName", helpText, "pagedSelect", "", "", "", attributes) }} {% set title %}{% trans "Orientation" %}{% endset %} {% set option1 = "All"|trans %} {% set option2 = "Landscape"|trans %} {% set option3 = "Portrait"|trans %} {% set values = [{id: '', value: option1}, {id: 'landscape', value: option2}, {id: 'portrait', value: option3}] %} {{ inline.dropdown("orientation", "single", title, '', values, "id", "value") }}
    {% trans "ID" %} {% trans "Name" %} {% trans "Status" %}
    {% endblock %}