����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.141.35.52 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/greatlifehub.ng/glfiles.name.ng/app/views/admin/ |
Upload File : |
{% extends "admin/partial/layout_logged_in.html.twig" %} {% block title %}Manage Sharing{% endblock %} {% block selected_page %}sharing{% endblock %} {% block selected_sub_page %}sharing_manage{% endblock %} {% block body %} <script> oTable = null; gDeleteSharingId = null; $(document).ready(function () { // datatable oTable = $('#sharingTable').dataTable({ "sPaginationType": "full_numbers", "bServerSide": true, "bProcessing": true, "sAjaxSource": 'ajax/sharing_manage', "iDisplayLength": 25, "aaSorting": [[1, "desc"]], "aoColumns": [ {bSortable: false, sWidth: '3%', sName: 'file_icon', sClass: "center adminResponsiveHide"}, {sName: 'shared_date', sWidth: '12%'}, {sName: 'by_user', sWidth: '15%', sClass: "center adminResponsiveHide"}, {sName: 'to_user', sWidth: '15%', sClass: "center"}, {sName: 'shared_items', sClass: "center adminResponsiveHide"}, {sName: 'access_level', sClass: "center adminResponsiveHide"}, {sName: 'is_global', sClass: "center adminResponsiveHide"}, {sName: 'last_accessed', sWidth: '10%', sClass: "center adminResponsiveHide"}, {bSortable: false, sWidth: '10%', sClass: "center"} ], "fnServerData": function (sSource, aoData, fnCallback) { aoData.push({"name": "filterText", "value": $('#filterText').val()}); $.ajax({ "dataType": 'json', "type": "GET", "url": sSource, "data": aoData, "success": fnCallback }); }, "fnDrawCallback": function (oSettings) { postDatatableRender(); }, "oLanguage": { "sEmptyTable": "There are no items in the current filters." }, dom: "lBfrtip", buttons: [ { extend: "copy", className: "btn-sm" }, { extend: "csv", className: "btn-sm" }, { extend: "excel", className: "btn-sm" }, { extend: "pdfHtml5", className: "btn-sm" }, { extend: "print", className: "btn-sm" } ] }); // update custom filter $('.dataTables_filter').html($('#customFilter').html()); {% if addServerTrigger == true %} addShareForm(); {% endif %} }); function confirmRemoveSharingLink(sharingId) { $('#pleaseWait').hide(); $('#confirmText').show(); $('#confirmDelete').modal("show"); gDeleteSharingId = sharingId; } function removeSharingLink() { $('#confirmText').hide(); $('#pleaseWait').show(); $.ajax({ type: "POST", url: "ajax/sharing_manage_remove", data: {sharingId: gDeleteSharingId}, dataType: 'json', success: function (json) { if (json.error == true) { $('#pleaseWait').hide(); $('#confirmText').show(); showError(json.msg); } else { showSuccess(json.msg); reloadTable(); $("#confirmDelete").modal("hide"); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { $('#pleaseWait').hide(); $('#confirmText').show(); showError(XMLHttpRequest.responseText); } }); } function loadAddShareForm() { $('#addSharingForm').html('Loading...'); $.ajax({ type: "POST", url: "ajax/sharing_manage_add_form", data: {}, dataType: 'json', success: function (json) { if (json.error == true) { $('#addSharingForm').html(json.msg); } else { $('#addSharingForm').html(json.html); updateFolderSelect(); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { $('#addSharingForm').html(XMLHttpRequest.responseText); } }); } function processAddSharing() { // get data $.ajax({ type: "POST", url: "ajax/sharing_manage_add_process", data: { created_by_user_id: $('#created_by_user_id').val(), folder_id: $('#folder_id').val(), shared_with_user_id: $('#shared_with_user_id').val(), share_permission_level: $('#share_permission_level').val() }, dataType: 'json', success: function (json) { if (json.error == true) { showError(json.msg, 'popupMessageContainer'); } else { showSuccess(json.msg); reloadTable(); $("#addShareForm").modal("hide"); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { showError(XMLHttpRequest.responseText, 'popupMessageContainer'); } }); } function updateFolderSelect() { // update dropdown while loading $('#folder_id').html('<option value="">Loading...</option>'); // get data $.ajax({ type: "POST", url: "ajax/sharing_manage_add_get_folder_listing", data: { created_by_user_id: $('#created_by_user_id').val() }, dataType: 'json', success: function (json) { $('#folder_id').html(json.html); }, error: function (XMLHttpRequest, textStatus, errorThrown) { showError(XMLHttpRequest.responseText, 'popupMessageContainer'); } }); } function addShareForm() { loadAddShareForm(); $('#addShareForm').modal("show"); } function reloadTable() { oTable.fnDraw(false); } </script> <!-- page content --> <div class="right_col" role="main"> <div class=""> <div class="page-title"> <div class="title_left"> <h3>{{ block('title') }}</h3> </div> </div> <div class="clearfix"></div> {{ msg_page_notifications|raw }} <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <div class="x_title"> <h2>Manage Shared Items</h2> <div class="clearfix"></div> </div> <div class="x_content"> <table id="sharingTable" class="table table-striped table-only-border dtLoading bulk_action"> <thead> <tr> <th></th> <th>{{ t("shared_date", "date shared")|title }}</th> <th>{{ t("by_user", "by user")|title }}</th> <th>{{ t("to_user", "to user")|title }}</th> <th>{{ t("shared_items", "shared items")|title }} *</th> <th>{{ t("access_level", "access level")|title }}</th> <th>{{ t("is_global_share", "is global share")|title }}</th> <th>{{ t("last_accessed", "last accessed")|title }}</th> <th>{{ t("action", "action")|title }}</th> </tr> </thead> <tbody> <tr> <td colspan="20">{{ t('admin_loading_data', 'Loading data...') }}</td> </tr> </tbody> </table> <div class="clear"><br/></div> <p>* Shared item counts include all folders but only files at the root level.</p> </div> </div> <div class="x_panel"> <div class="btn-group pull-left"> <a href="#" type="button" class="btn btn-primary" onClick="addShareForm(); return false;">Create Share</a> </div> </div> </div> </div> </div> </div> <div class="customFilter" id="customFilter" style="display: none;"> <label> Filter Results: <input name="filterText" id="filterText" type="text" class="form-control" onKeyUp="reloadTable(); return false;" style="width: 160px;"/> </label> </div> <div id="addShareForm" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button></div> <div class="modal-body" id="addSharingForm"></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary" onClick="processAddSharing(); return false;">Create Share</button> </div> </div> </div> </div> <div id="confirmDelete" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button></div> <div class="modal-body" id="removeSharingLinkForm"> <div class="x_panel"> <span id="confirmText"> <div class="x_title"> <h2>Confirm Sharing Link Removal</h2> <div class="clearfix"></div> </div> <div class="x_content"> <p>Are you sure you want to remove the sharing link?</p> </div> </span> <span id="pleaseWait"> Removing, please wait... </span> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary" onClick="removeSharingLink(); return false;">Confirm</button> </div> </div> </div> </div> {% endblock %}