33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-18 02:55:10 +00:00
jedchecker/administrator/components/com_jedchecker/views/uploads/tmpl/default.php

155 lines
6.4 KiB
PHP
Raw Normal View History

<?php
/**
2019-03-09 19:44:14 +00:00
* @package Joomla.JEDChecker
*
2022-01-19 16:41:46 +00:00
* @copyright Copyright (C) 2017 - 2022 Open Source Matters, Inc. All rights reserved.
2019-03-10 16:09:42 +00:00
* Copyright (C) 2008 - 2016 compojoom.com . All rights reserved.
2019-03-10 08:49:52 +00:00
* @author Daniel Dimitrov <daniel@compojoom.com>
*
2019-03-09 19:44:14 +00:00
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die('Restricted access');
2021-02-23 20:03:19 +00:00
// Load Bootstrap
if (version_compare(JVERSION, '4.0', '>='))
{
JHtml::_('bootstrap.collapse');
JHtml::_('bootstrap.tab');
2021-02-13 20:01:07 +00:00
2022-01-15 15:35:19 +00:00
// Tooltips are used by JAMSS reports
2021-04-04 08:58:16 +00:00
JHtml::_('bootstrap.tooltip');
2021-02-23 20:03:19 +00:00
}
else
{
2022-01-19 16:41:46 +00:00
JHtml::_('behavior.core');
2022-01-15 15:35:19 +00:00
JHtml::_('stylesheet', 'com_jedchecker/j4-style.css', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'com_jedchecker/bootstrap.bundle.min.js', array('version' => 'auto', 'relative' => true), array('defer' => true));
2021-02-23 20:03:19 +00:00
}
2019-03-09 19:44:14 +00:00
2022-01-15 15:35:19 +00:00
JHtml::_('stylesheet', 'com_jedchecker/style.css', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'com_jedchecker/script.js', array('version' => 'auto', 'relative' => true), array('defer' => true));
2021-02-23 20:03:19 +00:00
?>
2022-01-15 14:56:04 +00:00
<script id="jed-rules-json" type="application/json"><?php echo json_encode($this->jsOptions); ?></script>
2021-02-23 20:03:19 +00:00
<div id="jedchecker">
<div class="row g-3">
<div class="col-12 col-md-8">
<div class="card bg-light">
2021-06-16 13:30:16 +00:00
<div class="card-header" data-bs-toggle="collapse" data-bs-target="#jedchecker-welcome" role="button">
2021-02-23 20:03:19 +00:00
<?php echo JText::_('COM_JEDCHECKER'); ?>
</div>
<div class="card-body show" id="jedchecker-welcome">
<p class="card-text">
<?php echo JText::sprintf('COM_JEDCHECKER_CONGRATS', 'https://extensions.joomla.org/community/terms-of-service/'); ?>
</p>
<p class="card-text">
<?php echo JText::sprintf('COM_JEDCHECKER_CODE_STANDARDS', 'https://developer.joomla.org/coding-standards.html'); ?>
</p>
<p class="card-text">
<?php echo JText::_('COM_JEDCHECKER_HOW_TO_USE'); ?>
</p>
<ol class="card-text">
<li><?php echo JText::_('COM_JEDCHECKER_STEP1'); ?></li>
<li><?php echo JText::_('COM_JEDCHECKER_STEP2'); ?></li>
</ol>
<form action="<?php echo JRoute::_('index.php?option=com_jedchecker&view=uploads'); ?>"
method="post" class="needs-validation" name="adminForm" id="adminForm" enctype="multipart/form-data">
<div class="input-group">
<input type="file" class="form-control" name="extension" id="extension" required
accept=".bz2,.bzip2,.gz,.gzip,.tar,.tbz2,.tgz,.zip"
2021-02-23 20:03:19 +00:00
aria-describedby="extension-upload" aria-label="<?php echo JText::_('COM_JEDCHECKER_UPLOAD_FILE'); ?>">
2022-01-15 15:35:19 +00:00
<button class="btn btn-success" type="button" id="extension-upload">
2021-02-23 20:03:19 +00:00
<span class="icon-upload "></span> <?php echo JText::_('JSUBMIT'); ?>
</button>
<div class="invalid-feedback"><?php echo JText::_('COM_JEDCHECKER_EMPTY_UPLOAD_FIELD'); ?></div>
2019-03-09 19:44:14 +00:00
</div>
2021-02-25 08:38:13 +00:00
<div id="jed_uploading_spinner" class="text-center text-info mt-3 hidden"><span class="spinner spinner-border"></span></div>
2021-02-23 20:03:19 +00:00
<input type="hidden" name="task" value=""/>
<?php echo JHtml::_('form.token'); ?>
</form>
2019-03-09 19:44:14 +00:00
</div>
2021-02-23 20:03:19 +00:00
</div>
2016-03-11 23:03:09 +00:00
</div>
2019-03-09 19:44:14 +00:00
2021-02-23 20:03:19 +00:00
<div class="col-6 col-md-4">
2021-06-16 13:30:16 +00:00
<div class="card bg-info">
<div class="card-header text-white bg-info" data-bs-toggle="collapse" data-bs-target="#jedchecker-contributors" role="button">
2021-02-23 20:03:19 +00:00
<?php echo JText::_('COM_JEDCHECKER_WALL_OF_HONOR'); ?>
</div>
<div class="card-body show" id="jedchecker-contributors">
2021-06-16 13:30:16 +00:00
<h5 class="card-title text-white"><?php echo JText::_('COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT'); ?></h5>
2019-03-09 19:44:14 +00:00
<p class="card-text">
2021-02-23 20:03:19 +00:00
<a href="https://github.com/joomla-extensions/jedchecker/graphs/contributors" target="_blank" class="btn btn-light">
2019-03-09 19:44:14 +00:00
<?php echo JText::_('COM_JEDCHECKER_CONTRIBUTORS'); ?></a>
</p>
</div>
2016-03-11 23:03:09 +00:00
</div>
2012-12-13 10:08:35 +00:00
</div>
2019-03-09 19:44:14 +00:00
2021-02-23 20:03:19 +00:00
<div class="col-12 col-md-3 jedchecker-results hidden">
<div class="card bg-light">
<div class="card-header"><?php echo JText::_('COM_JEDCHECKER_RESULTS'); ?></div>
<div role="tablist" class="list-group list-group-flush">
<?php
foreach ($this->jsOptions['rules'] as $i => $rulename)
{
$class = 'jedcheckerRules' . ucfirst($rulename);
$rule = new $class;
?>
<a role="tab" id="jed-<?php echo $rulename; ?>" data-bs-toggle="tab" href="#jedtab-<?php echo $rulename; ?>"
class="list-group-item list-group-item-action d-flex justify-content-between<?php echo $i === 0 ? ' active' : ''; ?>">
<?php echo JText::_($rule->get('title')); ?>
<span class="text-nowrap ps-1">
<span class="badge bg-danger rounded-pill border-error"></span>
<span class="badge bg-warning rounded-pill"></span>
<span class="badge bg-secondary rounded-pill"></span>
<span class="badge bg-info rounded-pill"></span>
<span class="badge bg-success rounded-pill hidden">&#x2713;</span>
<span class="text-info spinner-border spinner-border-sm"></span>
</span>
</a>
<?php
}
?>
2019-03-09 19:44:14 +00:00
</div>
2021-02-23 20:03:19 +00:00
<div class="card-text" id="police-check-result"></div>
<div class="card-footer">
<small class="text-muted">
<?php echo JText::sprintf('COM_JEDCHECKER_LEAVE_A_REVIEW_JED', 'https://extensions.joomla.org/extensions/tools/development-tools/21336'); ?>
<?php echo JText::sprintf('COM_JEDCHECKER_DEVELOPED_BY', 'https://github.com/joomla-extensions/jedchecker'); ?> :)
</small>
2019-03-09 19:44:14 +00:00
</div>
</div>
2021-02-23 20:03:19 +00:00
</div>
2019-03-09 19:44:14 +00:00
2021-02-23 20:03:19 +00:00
<div class="col-12 col-md-9 jedchecker-results hidden">
<div class="tab-content">
<?php
foreach ($this->jsOptions['rules'] as $i => $rulename)
{
$class = 'jedcheckerRules' . ucfirst($rulename);
$rule = new $class;
?>
<div role="tabpanel" class="tab-pane fade<?php echo $i === 0 ? ' show active' : ''; ?>" id="jedtab-<?php echo $rulename; ?>">
2021-02-25 08:38:39 +00:00
<div class="card bg-light">
2021-02-23 20:03:19 +00:00
<div class="card-header" id="heading<?php echo $rule->get('id'); ?>">
<?php echo JText::_($rule->get('title')); ?>
</div>
2019-03-09 19:44:14 +00:00
<div class="card-body">
<p class="card-text">
2021-02-23 20:03:19 +00:00
<?php echo JText::_($rule->get('description')); ?>
2019-03-09 19:44:14 +00:00
</p>
2021-02-23 20:03:19 +00:00
<div class="card-text police-check-result" id="police-check-result-<?php echo $rulename; ?>">
<div class="text-center text-info"><span class="spinner-border"></span></div>
</div>
2019-03-09 19:44:14 +00:00
</div>
</div>
2021-02-23 20:03:19 +00:00
</div>
<?php
}
?>
2019-03-09 19:44:14 +00:00
</div>
</div>
2019-03-10 08:49:52 +00:00
</div>
2021-02-23 20:03:19 +00:00
</div>