first commit
This commit is contained in:
55
apps/update/modules/stInstallerWeb/templates/_menu_home.php
Normal file
55
apps/update/modules/stInstallerWeb/templates/_menu_home.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php use_helper('Javascript');?>
|
||||
|
||||
<div id="st_update_main_menu">
|
||||
<?php if (stLockUpdate::isLocked()):?>
|
||||
<a class="item<?php if ($selected=='rescue'): ?> selected<?php endif ?>" href="<?php echo url_for('stInstallerWeb/rescue') ?>">
|
||||
<span class="image"><?php echo image_tag('/images/update/red/modules/svg/rescue.svg?v1') ?></span>
|
||||
<span class="label"><?php echo __('Naprawa aktualizacji', null, 'stInstallerWeb') ?></span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<a id="item_download" class="item<?php if ($selected=='upgradeList'): ?> selected<?php endif ?>" href="<?php echo url_for('stInstallerWeb/upgradeList') ?>">
|
||||
<span class="image"><?php echo image_tag('/images/update/red/modules/svg/download.svg?v1') ?></span>
|
||||
<span class="label preloader">
|
||||
<?php echo __('Pobierz', null, 'stInstallerWeb') ?>
|
||||
</span>
|
||||
</a>
|
||||
<a id="item_install" class="item<?php if ($selected=='syncList'): ?> selected<?php endif ?>" href="<?php echo url_for('stInstallerWeb/syncList') ?>">
|
||||
<span class="image"><?php echo image_tag('/images/update/red/modules/svg/install.svg?v1') ?></span>
|
||||
<span class="label preloader"><?php echo __('Instaluj', null, 'stInstallerWeb') ?></span>
|
||||
</a>
|
||||
<?php if (!stConfig::getInstance('stRegister')->get('demo')): ?>
|
||||
<a class="item<?php if ($selected=='upload'): ?> selected<?php endif ?>" href="<?php echo url_for('stInstallerWeb/upload') ?>">
|
||||
<span class="image"><?php echo image_tag('/images/update/red/modules/svg/upload.svg?v1') ?></span>
|
||||
<span class="label"><?php echo __('Dodaj', null, 'stInstallerWeb') ?></span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<a class="item" href="https://www.sote.pl/category/webstore" target="_blank">
|
||||
<span class="image"><?php echo image_tag('/images/update/red/modules/svg/webstore.svg?v1') ?></span>
|
||||
<span class="label"><?php echo __('Webstore', null, 'stInstallerWeb') ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
$.get('<?php echo url_for('stInstallerWeb/AjaxCheckPackageStatus') ?>', function(response) {
|
||||
let itemInstall = $('#item_install .label');
|
||||
let itemDownload = $('#item_download .label');
|
||||
|
||||
itemInstall.removeClass('preloader');
|
||||
itemDownload.removeClass('preloader');
|
||||
|
||||
console.log(response);
|
||||
|
||||
if (response.packagesToInstall > 0)
|
||||
{
|
||||
itemInstall.attr('data-count', response.packagesToInstall);
|
||||
console.log(response.packagesToInstall);
|
||||
}
|
||||
|
||||
if (response.packagesToUpgrade > 0)
|
||||
{
|
||||
itemDownload.attr('data-count', response.packagesToUpgrade);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user