{# /** * 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 "authed.twig" %} {% import "inline.twig" as inline %} {% import "forms.twig" as forms %} {% block title %}{% set campaignName = campaign.campaign %}{% trans %}{{ campaignName }} - Campaign Builder{% endtrans %} | {% endblock %} {% set hideNavigation = "1" %} {% block pageContent %}

{{ campaign.campaign }}

{% set title %}{% trans "Name" %}{% endset %} {% set helpText %}{% trans "The Name for this Campaign" %}{% endset %} {{ forms.input("name", title, campaign.campaign, helpText) }} {% set title %}{% trans "Start Date" %}{% endset %} {% set helpText %}{% trans "Select the start date for this campaign" %}{% endset %} {{ forms.date("startDt", title, campaign.getStartDt(), helpText, "starttime-control", "required", "") }} {% set title %}{% trans "End Date" %}{% endset %} {% set helpText %}{% trans "Select the end date for this campaign" %}{% endset %} {{ forms.date("endDt", title, campaign.getEndDt(), helpText, "endtime-control", "required", "") }} {% set title %}{% trans "Display" %}{% endset %} {% set helpText %}{% trans "Please select one or more displays / groups for this event to be shown on." %}{% endset %} {% set attributes = [ { name: "data-search-url", value: url_for("displayGroup.search") }, { name: "data-trans-groups", value: "Groups"|trans }, { name: "data-trans-display", value: "Display"|trans }, { name: "data-search-term", value: "displayGroup" }, { name: "data-id-property", value: "displayGroupId" }, { name: "data-text-property", value: "displayGroup" }, ] %} {{ forms.dropdown("displayGroupIds[]", "dropdownmulti", title, displayGroupIds, displayGroups, "displayGroupId", "displayGroup", helpText, "", "", "", "", attributes) }} {% set title %}{% trans "Target Type" %}{% endset %} {% set helpText %}{% trans "How would you like to set the target for this campaign?" %}{% endset %} {% set options = [ { id: "plays", name: "Plays"|trans }, { id: "budget", name: "Budget"|trans }, { id: "imp", name: "Impressions"|trans }, ] %} {{ forms.dropdown("targetType", "single", title, campaign.targetType, options, "id", "name", helpText, "campaign-type-ad") }} {% set title %}{% trans "Target" %}{% endset %} {% set helpText %}{% trans "What is the target number for this Campaign over its entire playtime" %}{% endset %} {{ forms.number("target", title, campaign.target, 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 %}
{{ 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.button("Save"|trans, "submit", null, null, null, "btn-success") }}
{# Layouts #} {% set attributes = [ { name: "data-search-url", value: url_for("layout.search") }, { name: "data-search-term", value: "layout" }, { name: "data-search-term-tags", value: "tags" }, { name: "data-trans-layout", value: "Layout"|trans }, { name: "data-id-property", value: "layoutId" }, { name: "data-text-property", value: "layout" }, { name: "data-placeholder--id", value: null }, { name: "data-placeholder--value", value: "Add a layout"|trans }, ] %} {% set title %}{% trans "Add Layout" %}{% endset %} {% set helpText %}{% trans "Please select a Layout to add to this Campaign" %}{% endset %} {{ forms.dropdown("layoutId", "single", title, event.campaignId, null, "campaignId", "campaign", helpText, "layout-control", "", "", "", attributes) }}
{% trans "ID" %} {% trans "Name" %} {% trans "Duration" %} {% trans "Day Parts" %} {% trans "Days of the week" %} {% trans "Geofence" %}
Time - {{ stats.complete }}%
Target - {{ stats.target }}%
{{ "Plays"|trans }} {{ campaign.plays }}
{{ "Spend"|trans }} {{ campaign.spend }}
{{ "Impressions"|trans }} {{ campaign.impressions }}
{{ "Stats need to be enabled on the Displays and Layouts selected on this campaign"|trans }}
{% endblock %} {% block javaScript %} {# Initialise JS variables and translations #} {% endblock %}