0byt3m1n1
Path:
/
home
/
mgatv524
/
public_html
/
mixmidia
/
modules
/
[
Home
]
File: datasetview-form-edit.twig
{# /* * Xibo - Digital Signage - https://www.xibo.org.uk * Copyright (C) 2012-2020 Xibo Signage Ltd * * 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 <http://www.gnu.org/licenses/>. */ #} {% extends "form-base.twig" %} {% import "forms.twig" as forms %} {% block formTitle %} {% set dataSetName = module.getExtra().dataSet.dataSet %} {% trans %}Edit DataSet View: DataSet is {{ dataSetName }}{% endtrans %} {% endblock %} {% block extra %}{{ module.getExtra()|json_encode|raw }}{% endblock %} {% block formHtml %} <div class="row"> <ul class="nav nav-tabs" role="tablist"> <li class="active"><a href="#general" role="tab" data-toggle="tab"><span>{% trans "General" %}</span></a></li> <li><a href="#configurationTab" role="tab" data-toggle="tab"><span>{% trans "Configuration" %}</span></a></li> <li><a href="#appearanceTab" role="tab" data-toggle="tab"><span>{% trans "Appearance" %}</span></a></li> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"> {% trans "Templates" %}<span class="caret"></span> </a> <ul class="dropdown-menu"> <li class="template-override-controls"><a href="#optionalStylesheetTab" role="tab" data-toggle="tab"><span>{% trans "Optional Stylesheet" %}</span></a></li> <li><a href="#noDataTemplateTab" role="tab" data-toggle="tab"><span>{% trans "No Data" %}</span></a></li> <li><a href="#optionalJavascriptTab" role="tab" data-toggle="tab"><span>{% trans "Optional JavaScript" %}</span></a></li> </ul> </li> <li><a href="#orderCriteria" role="tab" data-toggle="tab"><span>{% trans "Order" %}</span></a></li> <li><a href="#filterCriteria" role="tab" data-toggle="tab"><span>{% trans "Filter" %}</span></a></li> <li><a href="#cachingTab" role="tab" data-toggle="tab"><span>{% trans "Caching" %}</span></a></li> </ul> <div class="col-md-12"> <form id="dataSetViewEditForm2" class="XiboForm form-horizontal" data-form-step="2" method="put" action="{{ urlFor("module.widget.edit", {id: module.widget.widgetId}) }}"> <div class="tab-content"> <div class="tab-pane active" id="general"> {% set title %}{% trans "Name" %}{% endset %} {% set helpText %}{% trans "An optional name for this widget" %}{% endset %} {{ forms.input("name", title, module.getOption("name"), helpText) }} {% set title %}{% trans "Set a duration?" %}{% endset %} {% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %} {{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }} {% set title %}{% trans "Duration" %}{% endset %} {% set helpText %}{% trans "The duration in seconds this item should be displayed" %}{% endset %} {{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }} {% set title %}{% trans "Duration is per page" %}{% endset %} {% set helpText %}{% trans "The duration specified is per page otherwise it is overall Widget duration." %}{% endset %} {{ forms.checkbox("durationIsPerPage", title, module.getOption("durationIsPerPage"), helpText) }} {% set title %}{% trans "Enable Stats Collection?" %}{% endset %} {% set helpText %}{% trans "Enable the collection of Proof of Play statistics for this Widget. Ensure that ‘Enable Stats Collection’ is set to ‘On’ in the Display Settings." %}{% endset %} {% set offOption %}{% trans "Off" %}{% endset %} {% set onOption %}{% trans "On" %}{% endset %} {% set inheritOption %}{% trans "Inherit" %}{% endset %} {% set options = [ { id: "Off", value: offOption }, { id: "On", value: onOption }, { id: "Inherit", value: inheritOption } ] %} {{ forms.dropdown("enableStat", "single", title, module.getOption("enableStat", theme.getSetting("WIDGET_STATS_ENABLED_DEFAULT")), options, "id", "value", helpText) }} </div> <div class="tab-pane" id="configurationTab"> {% set message %}{% trans "Below you can select the columns to be shown in the table - drag and drop to reorder and to move between lists." %}{% endset %} {{ forms.message(message) }} <div class="row"> <div class="col-md-12"> <div class="connectedlist col-sm-6"> <p class="text-info">{% trans "Columns Selected" %}</p> <ul id="columnsIn" class="connectedSortable"> {% for column in module.dataSetColumnsSelected() %} <li id="{{ column.dataSetColumnId }}" class="li-sortable">{{ column.heading }}</li> {% endfor %} </ul> </div> <div class="connectedlist col-sm-6"> <p class="text-info">{% trans "Columns Available" %}</p> <ul id="columnsOut" class="connectedSortable"> {% for column in module.dataSetColumnsNotSelected() %} <li id="{{ column.dataSetColumnId }}" class="li-sortable">{{ column.heading }}</li> {% endfor %} </ul> </div> </div> </div> {% set title %}{% trans "Show the table headings?" %}{% endset %} {% set helpText %}{% trans "Should the Table headings be shown?" %}{% endset %} {{ forms.checkbox("showHeadings", title, module.getOption("showHeadings"), helpText) }} {% set title %}{% trans "Lower Row Limit" %}{% endset %} {% set helpText %}{% trans "Please enter the Lower Row Limit for this DataSet (enter 0 for no limit)')" %}{% endset %} {{ forms.number("lowerLimit", title, module.getOption("lowerLimit"), helpText) }} {% set title %}{% trans "Upper Row Limit" %}{% endset %} {% set helpText %}{% trans "Please enter the Upper Row Limit for this DataSet (enter 0 for no limit)" %}{% endset %} {{ forms.number("upperLimit", title, module.getOption("upperLimit"), helpText ) }} {% set title %}{% trans "Rows per page" %}{% endset %} {% set helpText %}{% trans "Please enter the number of rows per page. 0 for no pages." %}{% endset %} {{ forms.number("rowsPerPage", title, module.getOption("rowsPerPage"), helpText) }} </div> <div class="tab-pane" id="appearanceTab"> {% set title %}{% trans "Template" %}{% endset %} {% set helpText %}{% trans "Select the template you would like to apply. This can be overridden using the check box below." %}{% endset %} {{ forms.dropdown("templateId", "single", title, module.getOption("templateId"), module.templatesAvailable(), "id", "value", helpText, "template-selector-control") }} {% set title %}{% trans "Override the template?" %}{% endset %} {% set helpText %}{% trans "Tick if you would like to override the template." %}{% endset %} {{ forms.checkbox("overrideTemplate", title, module.getOption("overrideTemplate", "1"), helpText) }} {% set useTemplatesMessage %} {% trans "With Override the Template selected enter your own text, html and css by using the Templates drop down menu in the tab header above." %} {% endset %} {{ forms.message(useTemplatesMessage, 'template-override-controls') }} {% set title %}{% trans "Background Colour" %}{% endset %} {% set helpText %}{% trans "Use the colour picker to select the background colour" %}{% endset %} {{ forms.input("backgroundColor", title, module.getOption("backgroundColor"), helpText) }} {% set title %}{% trans "Border Colour" %}{% endset %} {% set helpText %}{% trans "Use the colour picker to select the border colour" %}{% endset %} {{ forms.input("borderColor", title, module.getOption("borderColor"), helpText) }} {% set title %}{% trans "Font Colour" %}{% endset %} {% set helpText %}{% trans "Use the colour picker to select the font colour" %}{% endset %} {{ forms.input("fontColor", title, module.getOption("fontColor"), helpText) }} {% set title %}{% trans "Font" %}{% endset %} {% set attributes = [ { name: "data-search-url", value: urlFor("library.font.list") }, { name: "data-value", value: module.getOption("fontFamily") } ] %} {% set helpText %}{% trans "Select a custom font - leave empty to use the default font." %}{% endset %} {{ forms.dropdown("fontFamily", "single", title, "", [{id: "", value: ""}], "id", "value", helpText, "", "", "", "", attributes) }} {% set title %}{% trans "Font Size" %}{% endset %} {% set helpText %}{% trans "Set the font size" %}{% endset %} {{ forms.number("fontSize", title, module.getOption("fontSize"), helpText) }} </div> <div class="tab-pane" id="noDataTemplateTab"> <div class="form-content-title container-fluid text-right"> <h4 class="col-xs-6 text-left">{% trans "No Data Template" %}</h4> <input type="checkbox" class="col-xs-6 pull-right bootstrap-switch-target" id="noDataMessage_advanced" name="noDataMessage_advanced" {% if module.getOption("noDataMessage_advanced", 0) == 1 %}checked{% endif %} data-size="small" data-label-text="{% trans "Visual editor" %}" data-label-width="80px" data-on-text="{% trans "On" %}" data-off-text="{% trans "Off" %}"> </div> {% set noDataMessageMessage1 %} {% trans "Enter text or HTML in the box below." %}<br> {% endset %} {{ forms.message(noDataMessageMessage1, 'noDataMessage-advanced-editor-hide') }} {% set noDataMessageMessage2 %} {% trans "Enter the text to display." %} {% trans "The red rectangle reflects the size of the region you are editing." %} {% trans "Shift+Enter will drop a single line. Enter alone starts a new paragraph." %} {% endset %} {{ forms.message(noDataMessageMessage2, 'noDataMessage-advanced-editor-show') }} {% set helpText %}{% trans "A message to display when no data is returned from the source" %}{% endset %} {{ forms.textarea("noDataMessage", "", module.getRawNode("noDataMessage"), helpText, "", "", 5) }} </div> <div class="tab-pane" id="optionalStylesheetTab"> <div class="form-content-title"> <h4>{% trans "Optional Stylesheet Template" %}</h4> </div> {% set title %}{% trans "Enter a style sheet for the table" %}{% endset %} {{ forms.textarea("styleSheet", "", module.getRawNode("styleSheet", module.defaultStyleSheet()), title, "template-override-controls", "", 10) }} </div> <div class="tab-pane" id="optionalJavascriptTab"> <div class="form-content-title"> <h4>{% trans "Optional JavaScript" %}</h4> </div> {{ forms.textarea("javaScript", "", module.getRawNode("javaScript"), "", "", "", 10) }} </div> <div class="tab-pane" id="orderCriteria"> {% set message %}{% trans "The DataSet results can be ordered by any column and set below. New fields can be added by selecting the plus icon at the end of the current row. Should a more complicated order be required the advanced checkbox can be selected to provide custom SQL syntax." %}{% endset %} {{ forms.message(message) }} <div id="orderClause"> </div> {% set title %}{% trans "Use advanced order clause?" %}{% endset %} {% set helpText %}{% trans "Provide a custom clause instead of using the clause builder above." %}{% endset %} {{ forms.checkbox("useOrderingClause", title, module.getOption("useOrderingClause", 0), helpText) }} {% set title %}{% trans "Order" %}{% endset %} {% set helpText %}{% trans "Please enter a SQL clause for how this dataset should be ordered" %}{% endset %} {{ forms.input("ordering", title, module.getOption("ordering"), helpText, "order-clause-field") }} </div> <div class="tab-pane" id="filterCriteria"> {% set message %}{% trans "The DataSet results can be filtered by any column and set below. New fields can be added by selecting the plus icon at the end of the current row. Should a more complicated filter be required the advanced checkbox can be selected to provide custom SQL syntax." %}{% endset %} {{ forms.message(message) }} {% set message %}{% trans "The substitution [DisplayId] can be used in filter clauses and will be substituted at run time with the Display ID. When shown in the CMS it will be substituted with 0." %}{% endset %} {{ forms.message(message) }} <div id="filterClause"> </div> {% set title %}{% trans "Use advanced filter clause?" %}{% endset %} {% set helpText %}{% trans "Provide a custom clause instead of using the clause builder above." %}{% endset %} {{ forms.checkbox("useFilteringClause", title, module.getOption("useFilteringClause", 0), helpText) }} {% set title %}{% trans "Filter" %}{% endset %} {% set helpText %}{% trans "Please enter a SQL clause to filter this DataSet." %}{% endset %} {{ forms.input("filter", title, module.getOption("filter"), helpText, "filter-clause-field") }} </div> <div class="tab-pane" id="cachingTab"> {% set title %}{% trans "Update Interval (mins)" %}{% endset %} {% set helpText %}{% trans "Please enter the update interval in minutes. This should be kept as high as possible. For example, if the data will only change once per day this could be set to 60." %}{% endset %} {{ forms.number("updateInterval", title, module.getOption("updateInterval", 5), helpText, "", "required") }} </div> </div> <input type="hidden" name="step" value="2" /> </form> </div> </div> {% endblock %}