0byt3m1n1
Path:
/
home
/
mgatv524
/
public_html
/
mctv
/
views
/
[
Home
]
File: authed.twig
{# /** * 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 <http://www.gnu.org/licenses/>. */ #} {% extends "base.twig" %} {% block content %} {% set horizontalNav = currentUser.getOptionValue("navigationMenuPosition", theme.getSetting("NAVIGATION_MENU_POSITION", "vertical")) == "horizontal" %} {% set hideNavigation = currentUser.getOptionValue("hideNavigation", "0") %} <div {% if hideNavigation == "0" and not horizontalNav and not forceHide %}id="page-wrapper"{% endif %} class="active"> {% if hideNavigation == "0" and not forceHide %} {% if horizontalNav %} <nav class="navbar navbar-default navbar-expand-lg"> <a class="navbar-brand" href="#"> <img class="xibo-logo" src="{{ theme.uri("img/xibologo.png") }}"> </a> <!-- Brand and toggle get grouped for better mobile display --> <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse-1" aria-controls="navbarNav" aria-expanded="false"> <span class="fa fa-bars"></span> </button> <!-- Collect the nav links, forms, and other content for toggling --> <div class="navbar-collapse collapse justify-content-between" id="navbar-collapse-1"> {% include "authed-topbar.twig" %} <ul class="nav navbar-nav navbar-right"> {% include "authed-theme-topbar.twig" ignore missing %} {% if currentUser.featureEnabled("drawer") %} {% include "authed-notification-drawer.twig" %} {% endif %} {% include "authed-user-menu.twig" %} </ul> </div><!-- /.navbar-collapse --> </nav> {% else %} <div class="navbar-collapse navbar-collapse-side collapse" id="navbar-collapse-1"> {% include "authed-sidebar.twig" %} </div> {% endif %} {% endif %} <div id="content-wrapper"> <div class="page-content"> {% if not horizontalNav or hideNavigation == "1" or forceHide %} <div class="row header header-side"> <div class="col-sm-12"> <div class="meta pull-left"> <div class="page"><img class="xibo-logo" src="{{ theme.uri("img/xibologo.png") }}"></div> </div> {% if not forceHide %} <button type="button" class="pull-right navbar-toggler navbar-toggler-side" data-toggle="collapse" data-target="#navbar-collapse-1" aria-controls="navbarNav" aria-expanded="false"> <span class="fa fa-bars"></span> </button> <div class="user pull-right"> {% include "authed-user-menu.twig" %} </div> {% if currentUser.featureEnabled("drawer") %} <div class="user user-notif pull-right"> {% include "authed-notification-drawer.twig" %} </div> {% endif %} {% include "authed-theme-topbar.twig" ignore missing %} {% endif %} </div> </div> {% endif %} <div class="row"> <div class="col-sm-12"> {% block actionMenu %}{% endblock %} {% block pageContent %}{% endblock %} </div> </div> <div class="row"> <div class="col-sm-12"> {% block pageFooter %}{% endblock %} </div> </div> </div> </div> </div> {% endblock %} {% block javaScriptTemplates %} <script type="text/javascript"> var userPreferencesUrl = "{{ url_for("user.pref") }}"; // TODO: Change this to a call to all route permissions ( something like currentUser.getRoutePermissions() ) var userRoutePermissions = { tags: "{{ currentUser.featureEnabled('tag.tagging') }}" }; // Equals helper for the templates below Handlebars.registerHelper('eq', function(v1, v2, opts) { if (v1 === v2) { return opts.fn(this); } else { return opts.inverse(this); } }); Handlebars.registerHelper('neq', function(v1, v2, opts) { if (v1 !== v2) { return opts.fn(this); } else { return opts.inverse(this); } }); </script> {% verbatim %} <script type="text/x-handlebars-template" id="buttons-template"> <div class="btn-group pull-right" title="{% endverbatim %}{% trans "Row Menu" %}{% verbatim %}"> <button class="btn btn-white dropdown-toggle" data-toggle="dropdown"></button> <div class="dropdown-menu dropdown-menu-right"> {{#each buttons}} {{#if divider}} <div class="dropdown-divider"></div> {{else multiSelectOnly}} <a {{#each dataAttributes}} data-{{ name }}="{{ value }}" {{/each}} class="dropdown-item multi-select-button {{#if class}}{{ class }}{{else}}XiboMultiHiddenButton{{/if}} {{ id }}" style="display: none;" tabindex="-1" href="#"> {{ text }} </a> {{else}} {{#if external}} <a class="dropdown-item {{ id }}" tabindex="-1" target="{{ linkType }}" onclick="{{ onclick }}" href="{{ url }}"{{#if title}} title="{{title}}"{{/if}}>{{ text }}</a> {{/if}} {{#unless external}} <a {{#each dataAttributes}} data-{{ name }}="{{ value }}" {{/each}} class="dropdown-item {{#if multi-select}}multi-select-button{{/if}} {{#if class}}{{ class }}{{else}}XiboFormButton{{/if}} {{ id }}" href="{{ url }}"{{#if title}} title="{{title}}"{{/if}} tabindex="-1" href="#"> {{ text }} </a> {{/unless}} {{/if}} {{/each}} </div> </div> </script> <script type="text/x-handlebars-template" id="multiselect-button-template"> <div class="btn-group dropup mr-2"> <button class="btn btn-primary select-all" data-toggle="selectAll"> {{ selectAll }} </button> <button class="btn btn-white dropdown-toggle" data-toggle="dropdown"> {{ withSelected }} </button> <div class="dropdown-menu"> {{#each buttons}} {{#if divider}} <div class="dropdown-divider"></div> {{else}} <a class="dropdown-item XiboMultiSelectFormButton" data-custom-handler="{{ customHandler }}" data-custom-handler-url="{{ customHandlerUrl }}" data-button-id="{{ id }}" data-grid-id="{{ gridId }}" data-content-type="{{ contentType }}" data-content-id-name="{{ contentIdName }}" tabindex="-1" href="#">{{ text }}</a> {{/if}} {{/each}} </div> </div> </script> <script type="text/x-handlebars-template" id="command-input-main-template"> <input type="checkbox" class="show-command-preview pull-right" id="showCommandPreview{{ unique }}" name="showCommandPreview{{ unique }}" title="{% endverbatim %}{% trans "Show command preview!" %}{% verbatim %}"> <label for="showCommandPreview{{ unique }}" class="pull-right show-command-preview-label">{% endverbatim %}{% trans "Show command preview!" %}{% verbatim %}</label> <select class="command-type form-control form-control-inline"> {{#each types}} <option value="{{ @key }}" {{#eq @key ../type}}selected="selected"{{/eq}}>{{ this }}</option> {{/each}} </select> <div class="command-inputs panel panel-default"></div> <pre class="command-preview" data-invalid-message="{% endverbatim %}{% trans 'Invalid command!' %}{% verbatim %}"> <code> <!-- your code here --> </code> </pre> </script> <script type="text/x-handlebars-template" id="command-input-freetext-template"> <input class="free-text form-control form-control-inline" value="{{ initVal }}"> </script> <script type="text/x-handlebars-template" id="command-input-tpv_led-template"> <select name="tpv_ledCommand{{ unique }}" id="tpv_ledCommand{{ unique }}" class="tpv-led-command form-control form-control-inline" style="width:100%"> <option value="off" {{#eq value "off"}}selected="selected"{{/eq}}>{% endverbatim %}{% trans "Off" %}{% verbatim %}</option> <option value="red" {{#eq value "red"}}selected="selected"{{/eq}}>{% endverbatim %}{% trans "Red" %}{% verbatim %}</option> <option value="green" {{#eq value "green"}}selected="selected"{{/eq}}>{% endverbatim %}{% trans "Green" %}{% verbatim %}</option> <option value="blue" {{#eq value "blue"}}selected="selected"{{/eq}}>{% endverbatim %}{% trans "Blue" %}{% verbatim %}</option> <option value="white" {{#eq value "white"}}selected="selected"{{/eq}}>{% endverbatim %}{% trans "White" %}{% verbatim %}</option> </select> </script> <script type="text/x-handlebars-template" id="command-input-rs232-template"> <div class="form-group-command form-group-rs232"> <input class="form-control form-control-inline rs232-text-input rs232-device-name" placeholder="{% endverbatim %}{% trans "Device Name/COM" %}{% verbatim %}" value="{{ value.cs.deviceName }}"> <input class="form-control form-control-inline rs232-text-input rs232-baud-rate" placeholder="{% endverbatim %}{% trans "Baud Rate" %}{% verbatim %}" value="{{ value.cs.baudRate }}"> <input class="form-control form-control-inline rs232-text-input rs232-data-bits" placeholder="{% endverbatim %}{% trans "Data Bits" %}{% verbatim %}" value="{{ value.cs.dataBits }}"> </div> <div class="form-group-command form-group-rs232"> <div class="col-12 col-sm-6"> <label for="rs232Parity{{ unique }}">{% endverbatim %}{% trans "Parity:" %}{% verbatim %}</label> <select name="rs232Parity{{ unique }}" id="rs232Parity{{ unique }}" class="rs232-parity form-control"> <option value="None" {{#eq value.cs.parity "None"}}selected="selected"{{/eq}}>None</option> <option value="Odd" {{#eq value.cs.parity "Odd"}}selected="selected"{{/eq}}>Odd</option> <option value="Even" {{#eq value.cs.parity "Even"}}selected="selected"{{/eq}}>Even</option> <option value="Mark" {{#eq value.cs.parity "Mark"}}selected="selected"{{/eq}}>Mark</option> <option value="Space" {{#eq value.cs.parity "Space"}}selected="selected"{{/eq}}>Space</option> </select> </div> <div class="col-12 col-sm-6"> <label for="rs232StopBits{{ unique }}">{% endverbatim %}{% trans "Stop Bits:" %}{% verbatim %}</label> <select name="rs232StopBits{{ unique }}" id="rs232StopBits{{ unique }}" class="rs232-stop-bits form-control"> <option value="None" {{#eq value.cs.stopBits "None"}}selected="selected"{{/eq}}>None</option> <option value="One" {{#eq value.cs.stopBits "One"}}selected="selected"{{/eq}}>One</option> <option value="Two" {{#eq value.cs.stopBits "Two"}}selected="selected"{{/eq}}>Two</option> <option value="OnePointFive" {{#eq value.cs.stopBits "OnePointFive"}}selected="selected"{{/eq}}>OnePointFive</option> </select> </div> <div class="col-12 col-sm-6"> <label for="rs232Handshake{{ unique }}">{% endverbatim %}{% trans "Handshake:" %}{% verbatim %}</label> <select name="rs232Handshake{{ unique }}" id="rs232Handshake{{ unique }}" class="rs232-handshake form-control"> <option value="None" {{#eq value.cs.handshake "None"}}selected="selected"{{/eq}}>None</option> <option value="XOnXOff" {{#eq value.cs.handshake "XOnXOff"}}selected="selected"{{/eq}}>XOnXOff</option> <option value="RequestToSend" {{#eq value.cs.handshake "RequestToSend"}}selected="selected"{{/eq}}>RequestToSend</option> <option value="RequestToSendXOnXOff" {{#eq value.cs.handshake "RequestToSendXOnXOff"}}selected="selected"{{/eq}}>RequestToSendXOnXOff</option> </select> </div> <div class="col-12 col-sm-6"> <label for="rs232HexSupport{{ unique }}">{% endverbatim %}{% trans "HexSupport:" %}{% verbatim %}</label> <select name="rs232HexSupport{{ unique }}" id="rs232HexSupport{{ unique }}" class="rs232-hex-support form-control"> <option value="0" {{#eq value.cs.hexSupport "0"}}selected="selected"{{/eq}}>0</option> <option value="1" {{#eq value.cs.hexSupport "1"}}selected="selected"{{/eq}}>1</option> <option value="default 0" {{#eq value.cs.hexSupport "default 0"}}selected="selected"{{/eq}}>default 0</option> </select> </div> </div> <div class="form-group-command form-group-rs232 command-group"> <input class="form-control rs232-command" placeholder="{% endverbatim %}{% trans "Command" %}{% verbatim %}" value="{{ value.command }}"> </div> </script> <script type="text/x-handlebars-template" id="command-input-intent-template"> <div class="form-group-command"> <label for="intentType{{ unique }}">{% endverbatim %}{% trans "Type:" %}{% verbatim %}</label> <select name="intentType{{ unique }}" id="intentType{{ unique }}" class="intent-type form-control form-control-inline"> <option value="activity" {{#eq value.type "activity"}}selected="selected"{{/eq}}>activity</option> <option value="service" {{#eq value.type "service"}}selected="selected"{{/eq}}>service</option> <option value="broadcast" {{#eq value.type "broadcast"}}selected="selected"{{/eq}}>broadcast</option> </select> </div> <input name="intentName{{ unique }}" id="intentName{{ unique }}" class="intent-name form-control form-control-inline" placeholder="{% endverbatim %}{% trans "Intent" %}{% verbatim %}" value="{{ value.name }}"> <div class="form-group-command"> <label for="intentExtraContainer{{ unique }}" class="intent-extra-container-label">{% endverbatim %}{% trans "Extra:" %}{% verbatim %}</label> <button class="intent-add-extra btn btn-info btn-sm pull-right" type="button"> <i class="fa fa-plus"></i> </button> <div id="intentExtraContainer{{ unique }}" class="intent-extra-container"></div> </div> </script> <script type="text/x-handlebars-template" id="command-input-intent-extra-template"> <div class="intent-extra-element"> <input class="form-control form-control-inline extra-name" placeholder="{% endverbatim %}{% trans "Name" %}{% verbatim %}" value="{{ name }}"> <select class="form-control form-control-inline extra-type"> <option value="string" {{#eq type "string"}}selected="selected"{{/eq}}>string</option> <option value="int" {{#eq type "int"}}selected="selected"{{/eq}}>int</option> <option value="bool" {{#eq type "bool"}}selected="selected"{{/eq}}>bool</option> <option value="intArray" {{#eq type "intArray"}}selected="selected"{{/eq}}>intArray</option </select> <input class="form-control form-control-inline extra-value" placeholder="{% endverbatim %}{% trans "Value" %}{% verbatim %}" value="{{ value }}"> <button type="button" class="btn btn-sm btn-warning pull-right intent-remove-extra"><i class="fa fa-minus fa-plus"></i></button> </div> </script> {% endverbatim %} <script type="text/x-handlebars-template" id="multiselect-tag-edit-form-template"> <form id="multiselectTagEditForm" data-gettag="{{ url_for("tag.getByName") }}"> <input type="hidden" id="requestURL" name="requestURL" value="{{ url_for('tag.editMultiple', {type: '[type]'}) }}"> <div class="form-group tags-with-value tags-input-wide row"> <label class="col-sm-2 control-label" for="tagsToAdd">{% trans "New tags" %}</label> <div class="col-sm-10"> <input class="form-control" name="tagsToAdd" type="email" id="tagsToAdd" data-role="tagsInputForm" data-auto-complete-url="{{ url_for('tag.search') }}" /> <span class="help-block">{% trans "A comma separated list of tags to add to the selected elements." %}</span> </div> </div> <p id="loadingValues" style="margin-left: 17%"></p> <div class="form-group row"> <label class="col-sm-2 control-label" for="tagValue" title="" accesskey="">{% trans "Tag value" %}</label> <div class="col-sm-10"> <select class="form-control" name="tagValue" id="tagValue"></select> </div> </div> <div id="tagValueContainer" style="display: none;"> <div class="form-group row"> <label class="col-sm-2 control-label" for="tagValueInput" accesskey="">{% trans "Tag value" %}</label> <div class="col-sm-10"> <input class="form-control" name="tagValueInput" type="text" id="tagValueInput" value=""> <span class="help-block">{% trans "Provide an optional Value for this Tag. If no Value is required, this field can be left blank." %}</span> </div> </div> </div> <div id="tagValueRequired" class="alert alert-info d-none"> <p>{% trans "This tag requires a set value, please select one from the Tag value dropdown or provide Tag value in the dedicated field." %}</p> </div> <div id="tagsToRemoveContainer" class="form-group tags-with-value tags-input-wide row"> <label class="col-sm-2 control-label" for="tagsToRemove">{% trans "Existing tags" %}</label> <div class="col-sm-10"> <input class="form-control" name="tagsToRemove" type="email" id="tagsToRemove" data-role="tagsInputForm" data-auto-complete-url="{{ url_for('tag.search') }}" /> <span class="help-block">{% trans "Remove tags from the list to remove them from elements that contain them." %}</span> </div> </div> </form> </script> <script type="text/x-handlebars-template" id="display-status-window-template"> <div style="margin-top:5px; max-height: 400px; overflow-y: auto;"> {% verbatim %} {{#if data}} {% endverbatim %} {% trans "Player Status Window"%}: {% verbatim %} {{#eq type "android"}} <div class="card p-3 mb-3 bg-light"> <span>{{{data}}}</span> </div> {{/eq}} {{#neq type "android"}} <div class="card p-3 mb-3 bg-light"> <ul> {{#each data as |value key|}} <li>{{key}}: {{value}}</li> {{/each}} </ul> </div> {{/neq}} {{/if}} {% endverbatim %} </div> </script> <script type="text/x-handlebars-template" id="auto-submit-field-template"> <div class="checkbox"> <label for="autoSubmit" accesskey="a" title="{% trans "When enabled, this form will automatically submit in future. Reset this in your User Profile." %}"> <input type="checkbox" id="autoSubmit" name="autoSubmit"> {% trans "Automatically submit this form?" %} </label> </div> </script> <script type="text/x-handlebars-template" id="folder-tree-template"> <!-- Modal --> {% verbatim %} <div id="{{ modal }}" class="modal fade inner-modal" role="dialog"> {% endverbatim %} <div class="modal-dialog modal-sm" style="width:450px;"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">{% trans "Select Folder" %}</h4> <button type="button" class="close btnCloseInnerModal">×</button> </div> <div class="modal-body"> <div class="form-group card p-3 mb-3 bg-light"> {% verbatim %} <div id="{{ container }}"></div> {% endverbatim %} </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-white btnCloseInnerModal">{% trans "Done" %}</button> </div> </div> </div> </div> </script> <script type="text/x-handlebars-template" id="mini-player-template"> <div id="miniLayoutPreview" class="mini-layout-preview"> <div id="playBtn" class="fa fa-play preview-button" title="{% trans "Play Preview" %}"></div> <div id="closeBtn" class="fa fa-close preview-button" title="{% trans "Close Preview" %}"></div> <div id="sizeBtn" class="fa fa-plus-square preview-button" title="{% trans "Change window size" %}"></div> <div id="newTabBtn" class="fa fa-external-link-square preview-button" title="{% trans "Preview in new window" %}"></div> <div id="content"></div> </div> </script> <script type="text/javascript"> function moveFolderMultiSelectFormOpen(dialog) { // make bootstrap happy. if ($('#folder-tree-form-modal').length != 0) { $('#folder-tree-form-modal').remove(); } var folderContainer = '<div class="card p-3 mb-3 bg-light" id="container-folder-form-tree"></div>'; var $hiddenInput = $('<input name="folderId" type="hidden" id="formFolderId">'); $hiddenInput.on('change', function() { dialog.data().commitData = {folderId: $(this).val()}; }); $(dialog).find('.modal-body').append(folderContainer); $(dialog).find('.modal-body').append($hiddenInput); initJsTreeAjax('#container-folder-form-tree', "multi-select-folder", true, 600000); } function triggerWebhookMultiSelectFormOpen(dialog) { var $triggerCode = $( '<div class="form-group row">' + '<label class="col-sm-2 control-label" for="triggerCode" accesskey="">{% trans "Trigger Code" %}</label>' + '<div class="col-sm-10">' + '<input class="form-control" name="triggerCode" type="text" id="triggerCode" value="">' + '<span class="help-block">{% trans "Enter the code associated with the web hook you wish to trigger. Please note that for this action to work, the webhook trigger code has to be added to Interactive Actions in scheduled content for this Player."%}</span>' + '</div>' + '</div>' ); $(dialog).find('.modal-body').append($triggerCode); $('#triggerCode').on('change', function() { dialog.data().commitData = { triggerCode: $('#triggerCode').val() }; }); } </script> {# File upload templates and scripts #} {% include "include-file-upload.twig" %} {% endblock %}