0byt3m1n1
Path:
/
home
/
mgatv524
/
lot.mgaplay.com.br
/
views
/
[
Home
]
File: playersoftware-page.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 "authed.twig" %} {% import "inline.twig" as inline %} {% block actionMenu %} {% if currentUser.featureEnabled("playersoftware.add") %} <div class="widget-action-menu pull-right"> <button class="btn btn-success" href="#" id="playerSoftwareUploadForm" title="{% trans "Add a new media item to the player software library" %}"><i class="fa fa-plus-circle" aria-hidden="true"></i> {% trans "Add Version" %}</button> </div> {% endif %} {% endblock %} {% block pageContent %} <div class="widget"> <div class="widget-title">{% trans "Player Software" %}</div> <div class="widget-body"> <div class="XiboGrid" id="{{ random() }}" data-grid-name="playerSoftwareView"> <div class="XiboFilter card mb-3 bg-light"> <div class="FilterDiv card-body" id="Filter"> <form class="form-inline"> {% set title %}{% trans "Type" %}{% endset %} {% set android %}{% trans "Android" %}{% endset %} {% set windows %}{% trans "Windows" %}{% endset %} {% set webos %}{% trans "webOS" %}{% endset %} {% set sssp %}{% trans "Tizen" %}{% endset %} {% set options = [ { optionid: "", option: "" }, { optionid: "android", option: android}, { optionid: "windows", option: windows}, { optionid: "lg", option: webos}, { optionid: "sssp", option: sssp} ] %} {{ inline.dropdown("playerType", "single", title, "", options, "optionid", "option") }} {% set title %}{% trans "Version" %}{% endset %} {{ inline.dropdown("playerVersion", "single", title, "", [{"version": none, "version": none}]|merge(versions), "version", "version") }} {% set title %}{% trans "Code" %}{% endset %} {{ inline.input("playerCode", title) }} </form> </div> </div> <div class="XiboData card pt-3"> <table id="playerSoftwareItems" class="table table-striped" data-state-preference-name="playerSoftwareGrid"> <thead> <tr> <th>{% trans "Version ID" %}</th> <th>{% trans "Player Version Name" %}</th> <th>{% trans "Type" %}</th> <th>{% trans "Version" %}</th> <th>{% trans "Code" %}</th> <th>{% trans "Media ID" %}</th> <th>{% trans "Original File Name" %}</th> <th>{% trans "Sharing" %}</th> <th class="rowMenu"></th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> {% endblock %} {% block javaScript %} <script type="text/javascript"> var table; $(document).ready(function() { table = $("#playerSoftwareItems").DataTable({ "language": dataTablesLanguage, dom: dataTablesTemplate, serverSide: true, stateSave: true, stateDuration: 0, stateLoadCallback: dataTableStateLoadCallback, stateSaveCallback: dataTableStateSaveCallback, filter: false, searchDelay: 3000, "order": [[2, "asc"]], ajax: { "url": "{{ url_for("playersoftware.search") }}", "data": function (d) { $.extend(d, $("#playerSoftwareItems").closest(".XiboGrid").find(".FilterDiv form").serializeObject()); } }, "columns": [ {"data": "versionId"}, {"data": "playerShowVersion" }, {"data": "type"}, {"data": "version"}, {"data": "code"}, {"data": "mediaId"}, {"data": "originalFileName"}, { "data": "groupsWithPermissions", "render": dataTableCreatePermissions }, { "orderable": false, "data": dataTableButtonsColumn } ], createdRow: function (row, data, index) { if (data.version === "" || data.version === null || data.code === 0) { $(row).addClass('table-danger'); $(row).attr('Title', "{{ warningLabel }}"); } }, }); table.on('draw', dataTableDraw); table.on('processing.dt', dataTableProcessing); dataTableAddButtons(table, $('#playerSoftwareItems_wrapper').find('.dataTables_buttons')); }); $("#playerSoftwareUploadForm").click(function(e) { e.preventDefault(); openUploadForm({ url: "{{ url_for("library.add") }}", title: "{% trans "Upload Version" %}", videoImageCovers: false, buttons: { main: { label: "{% trans "Done" %}", className: "btn-primary btn-bb-main", callback: function () { table.ajax.reload(); XiboDialogClose(); } } }, templateOptions: { multi: false, trans: { addFiles: "{% trans "Add files" %}", startUpload: "{% trans "Start upload" %}", cancelUpload: "{% trans "Cancel upload" %}", processing: "{% trans "Processing..." %}" }, upload: { maxSize: {{ libraryUpload.maxSize }}, maxSizeMessage: "{{ libraryUpload.maxSizeMessage }}", validExt: "{{ validExt }}" }, updateInAllChecked: false, deleteOldRevisionsChecked: false, folderSelector: false } }); }); </script> {% endblock %}