first commit
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
@php
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
@endphp
|
||||
|
||||
{{-- Allow tooltips, used in grid headers --}}
|
||||
@if (version_compare(JVERSION, '3.999.999', 'le'))
|
||||
{{-- @jhtml('behavior.tooltip') --}}
|
||||
@endif
|
||||
{{-- Allow SHIFT+click to select multiple rows --}}
|
||||
{{-- @jhtml('behavior.multiselect') --}}
|
||||
|
||||
@section('navigation')
|
||||
{{-- Navigation --}}
|
||||
@stop
|
||||
|
||||
@section('browse-filters')
|
||||
{{-- Filters above the table. --}}
|
||||
@stop
|
||||
|
||||
@section('browse-table-header')
|
||||
{{-- Table header. Column headers and optional filters displayed above the column headers. --}}
|
||||
@stop
|
||||
|
||||
@section('browse-norecords')
|
||||
{{-- Table body shown when no records are present. --}}
|
||||
@php echo JText::_( 'COM_JCHOPTIMIZE_NO_RECORDS' ) @endphp
|
||||
@stop
|
||||
|
||||
@section('browse-table-body-withrecords')
|
||||
{{-- Table body shown when records are present. --}}
|
||||
@php $i = 0; @endphp
|
||||
@foreach($items as $row)
|
||||
<tr>
|
||||
{{-- You need to implement me! --}}
|
||||
</tr>
|
||||
@endforeach
|
||||
@stop
|
||||
|
||||
@section('browse-table-footer')
|
||||
{{-- Table footer. The default is showing the pagination footer. --}}
|
||||
<tr>
|
||||
<td colspan="99" class="center">
|
||||
{{-- $this->pagination->getListFooter() --}}
|
||||
</td>
|
||||
</tr>
|
||||
@stop
|
||||
|
||||
@section('browse-hidden-fields')
|
||||
{{-- Put your additional hidden fields in this section --}}
|
||||
@stop
|
||||
|
||||
@yield('browse-page-top')
|
||||
|
||||
@yield('navigation')
|
||||
{{-- Administrator form for browse views --}}
|
||||
<form action="index.php" method="post" name="adminForm" id="adminForm">
|
||||
<div id="j-main-container" class="j-main-container">
|
||||
{{-- Filters and ordering --}}
|
||||
@yield('browse-filters')
|
||||
|
||||
@unless(count($items))
|
||||
@yield('browse-norecords')
|
||||
@else
|
||||
<div style="overflow-x:auto">
|
||||
<table class="@yield('table_class')" id="itemsList">
|
||||
<thead>
|
||||
@yield('browse-table-header')
|
||||
</thead>
|
||||
<tfoot>
|
||||
@yield('browse-table-footer')
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@yield('browse-table-body-withrecords')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endunless
|
||||
|
||||
{{-- Hidden form fields --}}
|
||||
<div>
|
||||
@section('browse-default-hidden-fields')
|
||||
<input type="hidden" name="boxchecked" id="boxchecked" value="0"/>
|
||||
@show
|
||||
@yield('browse-hidden-fields')
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,56 @@
|
||||
@php
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use JchOptimize\Core\SystemUri;use Joomla\CMS\Language\Text;
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
$options = [
|
||||
'task' => 'importsettings'
|
||||
];
|
||||
$data = json_encode($options);
|
||||
$maxFileSize = ini_get('upload_max_filesize');
|
||||
$confirmDelete = Text::_('COM_JCHOPTIMIZE_CONFIRM_DELETE_SETTINGS');
|
||||
|
||||
use function _JchOptimizeVendor\e;
|
||||
|
||||
@endphp
|
||||
<form id="bulk-settings-form" action="{{SystemUri::basePath()}}index.php" name="bulk-settings-form"
|
||||
method="post"
|
||||
enctype="multipart/form-data">
|
||||
<p class="alert alert-warning">{{Text::_('COM_JCHOPTIMIZE_BULK_SETTINGS_WARNING')}}</p>
|
||||
<p class="text-center">
|
||||
<button id="export-settings-file-button" type="submit" class="btn btn-secondary" name="task"
|
||||
value="exportsettings">
|
||||
<span class="icon-download"></span>
|
||||
{{Text::_('COM_JCHOPTIMIZE_EXPORT_SETTINGS')}}
|
||||
</button>
|
||||
<button id="reset-settings-button" type="submit" class="btn btn-warning"
|
||||
name="task" value="setdefaultsettings" onclick="return confirm('{{$confirmDelete}}')">
|
||||
<span class="icon-redo-2"></span>
|
||||
{{Text::_('COM_JCHOPTIMIZE_RESET_DEFAULT_SETTINGS')}}
|
||||
</button>
|
||||
<button id="import-settings-file-button" type="button" class="btn btn-primary"
|
||||
onclick="getSettingsFileUpload()" name="task" value="importsettings">
|
||||
<span class="icon-upload"></span>
|
||||
{{Text::_('COM_JCHOPTIMIZE_IMPORT_SETTINGS')}}
|
||||
</button>
|
||||
<div class="hidden">
|
||||
<!-- <input type="hidden" name="MAX_FILE_SIZE" value="4000"> -->
|
||||
<input id="bulk-settings-file-input" type="file" name="file" accept="application/json">
|
||||
</div>
|
||||
</p>
|
||||
<input type="hidden" name="option" value="com_jchoptimize">
|
||||
<input type="hidden" name="view" value="Utility">
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
@php
|
||||
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use JchOptimize\Core\Admin\Icons;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
/** @var Icons $icons */
|
||||
$aToggleIcons = $icons->compileToggleFeaturesIcons( $icons->getToggleSettings() );
|
||||
$aAdvancedToggleIcons = $icons->compileToggleFeaturesIcons( $icons->getAdvancedToggleSettings() );
|
||||
|
||||
use function _JchOptimizeVendor\e;
|
||||
|
||||
@endphp
|
||||
|
||||
@if (version_compare(JVERSION, '3.999.999', 'le'))
|
||||
@include('navigation')
|
||||
@endif
|
||||
|
||||
<div class="grid mt-3" style="grid-template-rows: auto;">
|
||||
<div class="g-col-12 g-col-lg-8" style="grid-row-end: span 2;">
|
||||
<div id="combine-files-block" class="admin-panel-block">
|
||||
<h4>{{Text::_('COM_JCHOPTIMIZE_COMBINE_FILES_AUTO_SETTINGS')}}</h4>
|
||||
<p class="alert alert-info">{{Text::_('COM_JCHOPTIMIZE_COMBINE_FILES_DESC')}}</p>
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($icons->compileToggleFeaturesIcons($icons->getCombineFilesEnableSetting())) !!}
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($icons->compileAutoSettingsIcons($icons->getAutoSettingsArray())) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="g-col-12 g-col-lg-4" style="grid-row-end: span 3;">
|
||||
<div id="utility-settings-block" class="admin-panel-block">
|
||||
<h4>{{Text::_('COM_JCHOPTIMIZE_UTILITY_SETTINGS')}}</h4>
|
||||
<p class="alert alert-info">{{Text::_('COM_JCHOPTIMIZE_UTILITY_DESC')}}</p>
|
||||
<div>
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($icons->compileUtilityIcons($icons->getUtilityArray(['browsercaching', 'orderplugins', 'keycache', 'recache', 'bulksettings']))) !!}
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($icons->compileUtilityIcons($icons->getUtilityArray(['cleancache']))) !!}
|
||||
<div>
|
||||
<br>
|
||||
<div>
|
||||
<em><span>{{Text::_( 'COM_JCHOPTIMIZE_FILES')}}</span>
|
||||
<span class="numFiles-container"><img src="{{Uri::root(true) . '/media/com_jchoptimize/core/images/loader.gif'}}"/></span>
|
||||
</em>
|
||||
</div>
|
||||
<div>
|
||||
<em>
|
||||
<span>{{Text::_( 'COM_JCHOPTIMIZE_SIZE')}}</span>
|
||||
<span class="fileSize-container"><img src="{{Uri::root(true) . '/media/com_jchoptimize/core/images/loader.gif'}}"/></span>
|
||||
</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="g-col-12 g-col-lg-8" style="grid-row-end: span 3;">
|
||||
<div id="toggle-settings-block" class="admin-panel-block">
|
||||
<h4>{{Text::_('COM_JCHOPTIMIZE_STANDARD_SETTINGS')}}</h4>
|
||||
<p class="alert alert-info">{{Text::_('COM_JCHOPTIMIZE_STANDARD_SETTINGS_DESC')}}</p>
|
||||
<div>
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($aToggleIcons) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="g-col-12 g-col-lg-4" style="grid-row-end: span 2;">
|
||||
<div id="advanced-settings-block" class="admin-panel-block">
|
||||
<h4>{{Text::_('COM_JCHOPTIMIZE_ADVANCED_SETTINGS')}}</h4>
|
||||
<p class="alert alert-info">{{Text::_('COM_JCHOPTIMIZE_ADVANCED_SETTINGS_DESC')}}</p>
|
||||
<div>
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($aAdvancedToggleIcons) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="g-col-12">
|
||||
<div id="copyright-block" class="admin-panel-block">
|
||||
<p><strong>JCH Optimize Pro {{JCH_VERSION}}</strong> Copyright 2022 © <a
|
||||
href="https://www.jch-optimize.net/">JCH Optimize</a>
|
||||
</p>
|
||||
@if( ! JCH_PRO )
|
||||
<p class="alert alert-success"><a
|
||||
href="https://www.jch-optimize.net/subscribes/subscribe-joomla/jmstarter/new/jmstarter.html?layout=default&coupon=JCHGOPRO20">Upgrade
|
||||
to the PRO version today</a> with 20% off using JCHGOPRO20</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(version_compare(JVERSION, '4', 'ge'))
|
||||
<div id="bulk-settings-modal-container" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{Text::_('COM_JCHOPTIMIZE_BULK_SETTINGS_OPERATIONS')}}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="close"></button>
|
||||
</div>
|
||||
<div class="modal-body p-4">
|
||||
@include('bulk_settings')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div id="bulk-settings-modal-container" class="modal hide fade" role="dialog" aria-labelledby="optimizeImageModalContainerLabel" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title">{{Text::_('COM_JCHOPTIMIZE_BULK_SETTINGS_OPERATIONS')}}</h5>
|
||||
</div>
|
||||
<div class="modal-body center">
|
||||
@include('bulk_settings')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -0,0 +1 @@
|
||||
<html><body style="background: #fff;"></body></html>
|
||||
@@ -0,0 +1,39 @@
|
||||
@php
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
use function _JchOptimizeVendor\e;
|
||||
|
||||
@endphp
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item @php echo $view == 'ControlPanel' ? 'active': '' @endphp">
|
||||
<a class="nav-link @php echo $view == 'ControlPanel' ? 'active': '' @endphp" href="index.php?option=com_jchoptimize">
|
||||
{{Text::_('COM_JCHOPTIMIZE_TOOLBAR_LABEL_CONTROLPANEL')}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item @php echo $view == 'OptimizeImages' ? 'active': '' @endphp">
|
||||
<a class="nav-link @php echo $view == 'OptimizeImages' ? 'active': '' @endphp" href="index.php?option=com_jchoptimize&view=OptimizeImages">
|
||||
{{Text::_('COM_JCHOPTIMIZE_TOOLBAR_LABEL_OPTIMIZEIMAGE')}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item @php echo $view == 'PageCache' ? 'active': '' @endphp">
|
||||
<a class="nav-link @php echo $view == 'PageCache' ? 'active' : '' @endphp" href="index.php?option=com_jchoptimize&view=PageCache">
|
||||
{{Text::_('COM_JCHOPTIMIZE_TOOLBAR_LABEL_PAGECACHE')}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
@php
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use JchOptimize\Core\Admin\Icons;
|
||||
use JchOptimize\Platform\Utility;
|
||||
use Joomla\CMS\Router\Route as JRoute;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
$page = JRoute::_( 'index.php?option=com_jchoptimize&view=OptimizeImage&task=optimizeimage', false, JRoute::TLS_IGNORE, true );
|
||||
|
||||
$aAutoOptimize = [
|
||||
[
|
||||
'link' => '',
|
||||
'icon' => 'auto_optimize.png',
|
||||
'name' => Utility::translate( 'Optimize Images' ),
|
||||
'script' => 'onclick="jchIOptimizeApi.optimizeImages(\'' . $page . '\', \'auto\'); return false;"',
|
||||
'id' => 'auto-optimize-images',
|
||||
'class' => '',
|
||||
'proonly' => true
|
||||
]
|
||||
];
|
||||
|
||||
$aManualOptimize = [
|
||||
[
|
||||
'link' => '',
|
||||
'icon' => 'manual_optimize.png',
|
||||
'name' => Utility::translate( 'Optimize Images' ),
|
||||
'script' => 'onclick="jchIOptimizeApi.optimizeImages(\'' . $page . '\', \'manual\'); return false;"',
|
||||
'id' => 'manual-optimize-images',
|
||||
'class' => '',
|
||||
'proonly' => true
|
||||
]
|
||||
];
|
||||
/** @var Icons $icons */
|
||||
use function _JchOptimizeVendor\e;
|
||||
|
||||
@endphp
|
||||
|
||||
@if (version_compare(JVERSION, '3.999.999', 'le'))
|
||||
@include('navigation')
|
||||
@endif
|
||||
|
||||
<div class="grid mt-3">
|
||||
<div class="g-col-12 g-col-lg-6">
|
||||
<div id="api2-utilities-block" class="admin-panel-block">
|
||||
<h4>{{ Text::_('COM_JCHOPTIMIZE_API2_UTILITY_SETTING') }}</h4>
|
||||
<p class="alert alert-info">{{ Text::_('COM_JCHOPTIMIZE_API2_UTILITY_SETTING_DESC') }}</p>
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($icons->compileUtilityIcons($icons->getApi2utilityArray())) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="g-col-12 g-col-lg-6">
|
||||
<div id="auto-optimize-block" class="admin-panel-block">
|
||||
<h4>{{ Text::_('COM_JCHOPTIMIZE_OPTIMIZE_IMAGES_BY_URLS') }}</h4>
|
||||
<p class="alert alert-info">{{ Text::_('COM_JCHOPTIMIZE_OPTIMIZE_IMAGES_BY_URLS_DESC') }}</p>
|
||||
<div class="icons-container">
|
||||
{!! $icons->printIconsHTML($aAutoOptimize) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="g-col-12">
|
||||
<div id="manual-optimize-block" class="admin-panel-block">
|
||||
<div id="optimize-images-container" class="">
|
||||
<h4>{{ Text::_('COM_JCHOPTIMIZE_OPTIMIZE_IMAGES_BY_FOLDER') }}</h4>
|
||||
<p class="alert alert-info">{{ Text::_('COM_JCHOPTIMIZE_OPTIMIZE_IMAGES_BY_FOLDER_DESC') }}</p>
|
||||
<div class="grid">
|
||||
<div class="g-col-12 g-col-lg-3 g-col-xl-4">
|
||||
<div id="file-tree-container" class=""></div>
|
||||
</div>
|
||||
<div class="g-col-12 g-col-lg-6 g-col-xl-6">
|
||||
<div id="files-container" class=""></div>
|
||||
</div>
|
||||
<div class="g-col-12 g-col-lg-3 g-col-xl-2">
|
||||
<div class="icons-container">
|
||||
<div class="">{!! $icons->printIconsHTML($aManualOptimize) !!}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(version_compare(JVERSION, '4', 'ge'))
|
||||
<div id="optimize-images-modal-container" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Optimizing Images</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div id="optimize-images-modal-container" class="modal hide fade" role="dialog" aria-labelledby="optimizeImageModalContainerLabel" tabindex="-1"
|
||||
aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Optimizing Images</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -0,0 +1,160 @@
|
||||
@php
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
$options = [
|
||||
'orderFieldSelector' => '#list_fullordering',
|
||||
'limitFieldSelector' => '#list_limit',
|
||||
'searchBtnSelector' => '.filter-search-bar__button',
|
||||
'filtersHidden' => $filtersHidden
|
||||
];
|
||||
|
||||
HTMLHelper::_( 'searchtools.form', '#adminForm', $options );
|
||||
|
||||
use function _JchOptimizeVendor\e;
|
||||
|
||||
@endphp
|
||||
|
||||
@if(!JCH_PRO)
|
||||
<script>
|
||||
document.querySelector('#toolbar-share button.button-share').disabled = true;
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@if (version_compare(JVERSION, '3.999.999', 'le'))
|
||||
@include('navigation')
|
||||
@endif
|
||||
|
||||
@extends('browse')
|
||||
|
||||
@if(version_compare(JVERSION, '4', 'lt'))
|
||||
@include('page_cache_j3')
|
||||
@else
|
||||
@include('page_cache_j4')
|
||||
@endif
|
||||
|
||||
@section('browse-table-body-withrecords')
|
||||
{{--Table body when records are present --}}
|
||||
@php $i = 0; @endphp
|
||||
@foreach($items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" id="cb{{$i++}}" name="cid[]" value="{{$item['id']}}"
|
||||
onclick="Joomla.isChecked(this.checked)" class="form-check-input">
|
||||
</td>
|
||||
<td>
|
||||
{{date('l, F d, Y h:i:s A', $item['mtime'])}} GMT
|
||||
</td>
|
||||
<td>
|
||||
<a title="{{$item['url']}}" href="{{$item['url']}}" class="page-cache-url" target="_blank">{{$item['url']}}</a>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
@if($item['device'] == 'Desktop')
|
||||
<span class="fa fa-desktop" data-bs-toggle="tooltip" title="{{$item['device']}}"></span>
|
||||
@else
|
||||
<span class="fa fa-mobile-alt" data-bs-toggle="tooltip" title="{{$item['device']}}"></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{$item['adapter']}}
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
@if($item['http-request'] == 'yes')
|
||||
<span class="fa fa-check-circle" style="color: green;"></span>
|
||||
@else
|
||||
<span class="fa fa-times-circle" style="color: firebrick;"></span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="hidden-phone hidden-tablet d-none d-sm-none d-md-none d-lg-none d-xl-none d-xxl-table-cell">
|
||||
<span class="page-cache-id">{{$item['id']}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@stop
|
||||
|
||||
@section('browse-table-footer')
|
||||
<tr>
|
||||
<td colspan="99">
|
||||
|
||||
@if($paginator->pageCount > 1 )
|
||||
<nav aria-label="pagination" class="pagination justify-content-center" style="text-align: center;">
|
||||
<ul class="pagination justify-content-center">
|
||||
{{--Previous and start page link --}}
|
||||
@if(isset($paginator->previous))
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$pageLink}}&list_page={{$paginator->first}}">Start</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link"
|
||||
href="{{$pageLink}}&list_page={{$paginator->previous}}">Previous</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">Start</a>
|
||||
</li>
|
||||
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">Previous</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Numbered page links --}}
|
||||
@foreach($paginator->pagesInRange as $page)
|
||||
@if($page != $paginator->current)
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$pageLink}}&list_page={{$page}}">{{$page}}</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item active" aria-current="page">
|
||||
<a class="page-link" href="{{$pageLink}}&list_page={{$page}}">{{$page}}</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next and last page link --}}
|
||||
@if(isset($paginator->next))
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$pageLink}}&list_page={{$paginator->next}}">Next</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link"
|
||||
href="{{$pageLink}}&list_page={{$paginator->last}}">End</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#">Next</a>
|
||||
</li>
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#">End</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@stop
|
||||
|
||||
@section('browse-hidden-fields')
|
||||
{{--Add these hidden fields to the default --}}
|
||||
<input type="hidden" name="option" id="option" value="com_jchoptimize"/>
|
||||
<input type="hidden" name="view" id="view" value="PageCache"/>
|
||||
<input type="hidden" name="task" id="task" value=""/>
|
||||
{!! HTMLHelper::_('form.token') !!}
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
@php
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
HTMLHelper::_('bootstrap.popover');
|
||||
|
||||
use function _JchOptimizeVendor\e;
|
||||
|
||||
@endphp
|
||||
|
||||
@section('table_class', 'table table-striped table-hover')
|
||||
|
||||
@section('browse-filters')
|
||||
<div class="js-stools clearfix">
|
||||
<div class="clearfix">
|
||||
<div class="js-stools-container-bar">
|
||||
|
||||
<label for="filter_search" class="element-invisible">
|
||||
Search </label>
|
||||
<div class="btn-wrapper input-append">
|
||||
{!! $searchInput !!}
|
||||
<button type="submit" class="btn hasTooltip" title="" aria-label="Search"
|
||||
data-original-title="Search">
|
||||
<span class="icon-search" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-wrapper hidden-phone">
|
||||
<button type="button" class="btn hasTooltip js-stools-btn-filter js-stools-btn-filter" title=""
|
||||
data-original-title="Filter the list items.">
|
||||
Search Tools <span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-wrapper">
|
||||
<button type="button" id="filter-search-clear-button" class="btn hasTooltip js-stools-btn-clear"
|
||||
title=""
|
||||
data-original-title="Clear">
|
||||
Clear
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-stools-container-list hidden-phone hidden-tablet shown" style="">
|
||||
<div class="ordering-select hidden-phone">
|
||||
<div class="js-stools-field-list">
|
||||
{!! $orderingSelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-list">
|
||||
{!! $limitList !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right" style="padding: 5px; margin-right:5px;">
|
||||
<i>Storage: <span class="badge badge-info">{{$adapter}}</span></i>
|
||||
<i class="ms-1">Http Request:
|
||||
@if($httpRequest)
|
||||
<span class="badge badge-success">On</span>
|
||||
@else
|
||||
<span class="badge badge-important">Off</span>
|
||||
@endif
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Filters div -->
|
||||
<div class="js-stools-container-filters clearfix {{ $filterVisible }}">
|
||||
<div class="js-stools-field-filter">
|
||||
{!! $time1SelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
{!! $time2SelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
{!! $deviceSelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
{!! $adapterSelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
{!! $httpRequestSelectList !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('browse-norecords')
|
||||
<div class="alert alert-no-items">
|
||||
@php echo Text::_( 'COM_JCHOPTIMIZE_NO_RECORDS' ) @endphp
|
||||
</div>
|
||||
@stop
|
||||
@section('browse-table-header')
|
||||
{{-- Header row --}}
|
||||
<tr>
|
||||
<th>
|
||||
<input type="checkbox" name="checkall-toggle" class="form-check-input" onclick="Joomla.checkAll(this)"
|
||||
data-bs-toggle="tooltip" title="Select all items">
|
||||
</th>
|
||||
<th>
|
||||
<a href="#" onclick="return false;" class="js-stools-column-order hasPopover"
|
||||
data-order="mtime" data-direction="ASC" data-name="Last modified time"
|
||||
title="Last modified time" data-content="Click to sort by this column" data-placement="top">
|
||||
{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_MTIME')}} {!! $mtimeSelected !!}
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#" onclick="return false;" class="js-stools-column-order hasPopover"
|
||||
data-order="url" data-direction="ASC" data-name="Page URL"
|
||||
title="Page URL" data-content="Click to sort by this column" data-placement="top">
|
||||
{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_URL')}} {!! $urlSelected !!}
|
||||
</a>
|
||||
</th>
|
||||
<th style="text-align: center;">
|
||||
<a href="#" onclick="return false;" class="js-stools-column-order hasPopover"
|
||||
data-order="device" data-direction="ASC" data-name="Device"
|
||||
title="Device" data-content="Click to sort by this column" data-placement="top">
|
||||
{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_DEVICE')}} {!! $deviceSelected !!}
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#" onclick="return false;" class="js-stools-column-order hasPopover"
|
||||
data-order="adapter" data-direction="ASC" data-name="Adapter"
|
||||
title="Adapter" data-content="Click to sort by this column" data-placement="top">
|
||||
{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_ADAPTER')}} {!! $adapterSelected !!}
|
||||
</a>
|
||||
</th>
|
||||
<th style="text-align: center;">
|
||||
<a href="#" onclick="return false;" class="js-stools-column-order hasPopover"
|
||||
data-order="http-request" data-direction="ASC" data-name="HTTP Request"
|
||||
title="HTTP Request" data-content="Click to sort by this column" data-placement="top">
|
||||
{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_HTTP_REQUEST')}} {!! $httpRequestSelected !!}
|
||||
</a>
|
||||
</th>
|
||||
<th class="hidden-phone hidden-tablet d-none d-sm-none d-md-none d-lg-table-cell">
|
||||
<a href="#" onclick="return false;" class="js-stools-column-order hasPopover"
|
||||
data-order="id" data-direction="ASC" data-name="Cache ID"
|
||||
title="Cache ID" data-content="Click to sort by this column" data-placement="top">
|
||||
{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_ID')}} {!! $idSelected !!}
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
@php
|
||||
|
||||
/**
|
||||
* JCH Optimize - Performs several front-end optimizations for fast downloads
|
||||
*
|
||||
* @package jchoptimize/joomla-platform
|
||||
* @author Samuel Marshall <samuel@jch-optimize.net>
|
||||
* @copyright Copyright (c) 2020 Samuel Marshall / JCH Optimize
|
||||
* @license GNU/GPLv3, or later. See LICENSE file
|
||||
*
|
||||
* If LICENSE file missing, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
defined( '_JEXEC' ) or die( 'Restricted Access' );
|
||||
|
||||
use function _JchOptimizeVendor\e;
|
||||
|
||||
@endphp
|
||||
|
||||
@section('table_class', 'table table-hover')
|
||||
|
||||
@section('browse-norecords')
|
||||
<div class="alert alert-info">
|
||||
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden">Info</span>
|
||||
@php echo Text::_( 'COM_JCHOPTIMIZE_NO_RECORDS' ) @endphp
|
||||
</div>
|
||||
@stop
|
||||
@section('browse-filters')
|
||||
<div class="js-stools" role="search">
|
||||
<div class="p-3">
|
||||
<i>Storage: <span class="badge bg-primary">{{$adapter}}</span> </i>
|
||||
<i class="ms-1">Http Request:
|
||||
@if($httpRequest)
|
||||
<span class="badge bg-success">On</span>
|
||||
@else
|
||||
<span class="badge bg-danger">Off</span>
|
||||
@endif
|
||||
</i>
|
||||
</div>
|
||||
<div class="js-stools-container-bar">
|
||||
<div class="btn-toolbar">
|
||||
<div class="filter-search-bar btn-group">
|
||||
<div class="input-group">
|
||||
{!! $searchInput !!}
|
||||
<div role="tooltip" id="filter_search-desc" class="filter-search-bar__description">
|
||||
Search for page cache items using the page URL
|
||||
</div>
|
||||
<span class="filter-search-bar__label visually-hidden">
|
||||
<label id="filter_search-lbl" for="filter_search">
|
||||
Search Tags</label>
|
||||
</span>
|
||||
<button type="submit" class="filter-search-bar__button btn btn-primary" aria-label="Search">
|
||||
<span class="filter-search-bar__button-icon icon-search" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-search-actions btn-group">
|
||||
<button type="button" class="filter-search-actions__button btn btn-primary js-stools-btn-filter">
|
||||
Filter Options <span class="icon-angle-down" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button type="button" id="filter-search-clear-button"
|
||||
class="filter-search-actions__button btn btn-primary js-stools-btn-clear">
|
||||
Clear
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="ordering-select">
|
||||
<div class="js-stools-field-list">
|
||||
<span class="visually-hidden">
|
||||
<label id="list_fullordering-lbl" for="list_fullordering"> Sort Table By:</label>
|
||||
</span>
|
||||
{!! $orderingSelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-list">
|
||||
<span class="visually-hidden">
|
||||
<label id="list_limit-lbl" for="list_limit"> Select number of items per page.</label>
|
||||
</span>
|
||||
{!! $limitList !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Filters div -->
|
||||
<div class="js-stools-container-filters clearfix {{ $filterVisible }}">
|
||||
<div class="js-stools-field-filter">
|
||||
<span class="visually-hidden"><label id="filter_published-lbl" for="filter_published">
|
||||
Time 1</label>
|
||||
</span>
|
||||
{!! $time1SelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
<span class="visually-hidden"><label id="filter_published-lbl" for="filter_published">
|
||||
Time 2</label>
|
||||
</span>
|
||||
{!! $time2SelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
<span class="visually-hidden"><label id="filter_published-lbl" for="filter_published">
|
||||
Device</label>
|
||||
</span>
|
||||
{!! $deviceSelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
<span class="visually-hidden"><label id="filter_published-lbl" for="filter_published">
|
||||
Adapter</label>
|
||||
</span>
|
||||
{!! $adapterSelectList !!}
|
||||
</div>
|
||||
<div class="js-stools-field-filter">
|
||||
<span class="visually-hidden"><label id="filter_published-lbl" for="filter_published">
|
||||
HTTP Request
|
||||
</label>
|
||||
</span>
|
||||
{!! $httpRequestSelectList !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@section('browse-table-header')
|
||||
{{-- Header row --}}
|
||||
<tr>
|
||||
<th>
|
||||
<input type="checkbox" name="checkall-toggle" class="form-check-input" onclick="Joomla.checkAll(this)"
|
||||
data-bs-toggle="tooltip" title="Select all items">
|
||||
</th>
|
||||
<th>
|
||||
<a href="" onclick="return false;"
|
||||
class="js-stools-column-order {{$mtimeSelected[1]}} js-stools-button-sort"
|
||||
data-order="mtime"
|
||||
data-direction="ASC"
|
||||
data-caption="" {!! $mtimeSelected[2] !!}
|
||||
>
|
||||
<span>{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_MTIME')}}</span>
|
||||
{!! $mtimeSelected[0] !!}
|
||||
<span class="visually-hidden">
|
||||
Sort Table By: Last modified time </span>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="" onclick="return false;" class="js-stools-column-order {{$urlSelected[1]}} js-stools-button-sort"
|
||||
data-order="url"
|
||||
data-direction="ASC"
|
||||
data-caption="" {!! $urlSelected[2] !!}
|
||||
>
|
||||
<span>{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_URL')}}</span>
|
||||
{!! $urlSelected[0] !!}
|
||||
<span class="visually-hidden">
|
||||
Sort Table By: URL </span>
|
||||
</a>
|
||||
</th>
|
||||
<th style="text-align: center;">
|
||||
<a href="" onclick="return false;"
|
||||
class="js-stools-column-order {{$deviceSelected[1]}} js-stools-button-sort"
|
||||
data-order="device"
|
||||
data-direction="ASC"
|
||||
data-caption="" {!! $deviceSelected[2] !!}
|
||||
>
|
||||
<span>{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_DEVICE')}}</span>
|
||||
{!! $deviceSelected[0] !!}
|
||||
<span class="visually-hidden">
|
||||
Sort Table By: Device </span>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="" onclick="return false;"
|
||||
class="js-stools-column-order {{$adapterSelected[1]}} js-stools-button-sort"
|
||||
data-order="adapter"
|
||||
data-direction="ASC"
|
||||
data-caption="" {!! $adapterSelected[2] !!}
|
||||
>
|
||||
<span>{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_ADAPTER')}}</span>
|
||||
{!! $adapterSelected[0] !!}
|
||||
<span class="visually-hidden">
|
||||
Sort Table By: URL </span>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="" onclick="return false;"
|
||||
class="js-stools-column-order {{$httpRequestSelected[1]}} js-stools-button-sort"
|
||||
data-order="http-request"
|
||||
data-direction="ASC"
|
||||
data-caption="" {!! $httpRequestSelected[2] !!}
|
||||
>
|
||||
<span>{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_HTTP_REQUEST')}}</span>
|
||||
{!! $httpRequestSelected[0] !!}
|
||||
<span class="visually-hidden">
|
||||
Sort Table By: URL </span>
|
||||
</a>
|
||||
</th>
|
||||
<th class="hidden-phone hidden-tablet d-none d-sm-none d-md-none d-lg-none d-xl-none d-xxl-table-cell">
|
||||
<a href="" onclick="return false;"
|
||||
class="js-stools-column-order {{$idSelected[1]}} js-stools-button-sort"
|
||||
data-order="id"
|
||||
data-direction="ASC"
|
||||
data-caption="" {!! $idSelected[2] !!}
|
||||
>
|
||||
<span>{{Text::_('COM_JCHOPTIMIZE_PAGECACHE_ID')}}</span>
|
||||
{!! $idSelected[0] !!}
|
||||
<span class="visually-hidden">Sort Table By: ID</span>
|
||||
</th>
|
||||
</tr>
|
||||
@stop
|
||||
|
||||
Reference in New Issue
Block a user