* adjust for extension page.

This commit is contained in:
wangyidong
2018-04-23 15:04:13 +08:00
parent cfad69d670
commit 41a1985f4d
14 changed files with 399 additions and 358 deletions

View File

@@ -11,23 +11,27 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
</h2>
</div>
<?php if(isset($error) and $error):?>
<div class='text-center'>
<div class='text-danger'><?php $error;?></div>
</div>
<?php else:?>
<div class='text-center with-padding'>
<div class='content'>
<h3 class='text-success'><?php echo $title;?></h3>
<hr>
<p class='text-center'><?php echo html::commonButton($lang->extension->viewInstalled, 'onclick=parent.location.href="' . inlink('browse', 'type=installed') . '"');?></p>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php if(isset($error) and $error):?>
<div class='text-center'>
<div class='text-danger'><?php $error;?></div>
</div>
<?php else:?>
<div class='text-center with-padding'>
<div class='content'>
<h3 class='text-success'><?php echo $title;?></h3>
<hr>
<p class='text-center'><?php echo html::commonButton($lang->extension->viewInstalled, 'onclick=parent.location.href="' . inlink('browse', 'type=installed') . '"');?></p>
</div>
</div>
<?php endif;?>
</body>
</html>

View File

@@ -11,53 +11,57 @@
*/
?>
<?php include 'header.html.php';?>
<div class='cards pd-0'>
<?php foreach($extensions as $extension):?>
<div class='col-xs-12'><div class='card'>
<div class='card-heading'><strong><?php echo $extension->name;?></strong></div>
<div class='card-content text-muted'><?php echo $extension->desc;?></div>
<div class='card-actions'>
<div class='pull-right'>
<div class='btn-group'>
<?php
$structureCode = html::a(inlink('structure', "extension=$extension->code"), $lang->extension->structure, '', "class='btn iframe'");
$deactivateCode = html::a(inlink('deactivate', "extension=$extension->code"), $lang->extension->deactivate, '', "class='btn iframe'");
$activateCode = html::a(inlink('activate', "extension=$extension->code"), $lang->extension->activate, '', "class='btn iframe'");
$uninstallCode = html::a(inlink('uninstall', "extension=$extension->code"), $lang->extension->uninstall, '', "class='btn iframe'");
$installCode = html::a(inlink('install', "extension=$extension->code"), $lang->extension->install, '', "class='btn iframe'");
$eraseCode = html::a(inlink('erase', "extension=$extension->code"), $lang->extension->erase, '', "class='btn iframe'");
if(isset($extension->viewLink))
{
echo html::a($extension->viewLink, $lang->extension->view, '', "class='btn extension'");
}
if($extension->status == 'installed')
{
echo $structureCode;
}
if($extension->status == 'installed' and !empty($extension->upgradeLink))
{
echo html::a($extension->upgradeLink, $lang->extension->upgrade, '', "class='btn iframe'");
}
if($extension->type != 'patch')
{
if($extension->status == 'installed') echo $deactivateCode . $uninstallCode;
if($extension->status == 'deactivated') echo $activateCode . $uninstallCode;
if($extension->status == 'available') echo $installCode . $eraseCode;
}
echo html::a($extension->site, $lang->extension->site, '_blank', 'class=btn');
?>
<div id='mainContent' class='main-content'>
<div class='cards pd-0'>
<?php foreach($extensions as $extension):?>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><strong><?php echo $extension->name;?></strong></div>
<div class='detail-content'><?php echo $extension->desc;?></div>
<div class='detail-actions'>
<div class='pull-right'>
<div class='btn-group'>
<?php
$structureCode = html::a(inlink('structure', "extension=$extension->code"), $lang->extension->structure, '', "class='btn iframe'");
$deactivateCode = html::a(inlink('deactivate', "extension=$extension->code"), $lang->extension->deactivate, '', "class='btn iframe'");
$activateCode = html::a(inlink('activate', "extension=$extension->code"), $lang->extension->activate, '', "class='btn iframe'");
$uninstallCode = html::a(inlink('uninstall', "extension=$extension->code"), $lang->extension->uninstall, '', "class='btn iframe'");
$installCode = html::a(inlink('install', "extension=$extension->code"), $lang->extension->install, '', "class='btn iframe'");
$eraseCode = html::a(inlink('erase', "extension=$extension->code"), $lang->extension->erase, '', "class='btn iframe'");
if(isset($extension->viewLink))
{
echo html::a($extension->viewLink, $lang->extension->view, '', "class='btn extension'");
}
if($extension->status == 'installed')
{
echo $structureCode;
}
if($extension->status == 'installed' and !empty($extension->upgradeLink))
{
echo html::a($extension->upgradeLink, $lang->extension->upgrade, '', "class='btn iframe'");
}
if($extension->type != 'patch')
{
if($extension->status == 'installed') echo $deactivateCode . $uninstallCode;
if($extension->status == 'deactivated') echo $activateCode . $uninstallCode;
if($extension->status == 'available') echo $installCode . $eraseCode;
}
echo html::a($extension->site, $lang->extension->site, '_blank', 'class=btn');
?>
</div>
</div>
<?php
echo "{$lang->extension->version}: <i>{$extension->version}</i> ";
echo "{$lang->extension->author}: <i>{$extension->author}</i> ";
$expireDate = $this->extension->getExpireDate($extension);
if(!empty($expireDate)) echo "{$lang->extension->expireDate}: <i>{$expireDate}</i>";
?>
</div>
</div>
</div>
<?php
echo "{$lang->extension->version}: <i>{$extension->version}</i> ";
echo "{$lang->extension->author}: <i>{$extension->author}</i> ";
$expireDate = $this->extension->getExpireDate($extension);
if(!empty($expireDate)) echo "{$lang->extension->expireDate}: <i>{$expireDate}</i>";
?>
<?php endforeach;?>
</div>
</div></div>
<?php endforeach;?>
</div>
<?php include '../../common/view/footer.html.php';?>

View File

@@ -11,22 +11,24 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
</h2>
</div>
<?php if(isset($error) and $error):?>
<div class='alert alert-success with-icon'>
<i class='icon-ok-sign'></i>
<div class='content'>
<h3><?php echo $lang->extension->needSorce;?></h3>
<p><?php echo $error;?></p>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php if(isset($error) and $error):?>
<div class='alert alert-success with-icon'>
<i class='icon-ok-sign'></i>
<div class='content'>
<h3><?php echo $lang->extension->needSorce;?></h3>
<p><?php echo $error;?></p>
</div>
</div>
<?php endif;?>
</body>
</html>
</body>
</html>

View File

@@ -11,21 +11,25 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
</div>
</div>
<div class='with-padding'>
<h3 class='mgb-20 text-center'><?php echo $title;?></h3>
<?php if($removeCommands):?>
<div class='container mw-500px'>
<p><strong><?php echo $lang->extension->unremovedFiles;?></strong></p>
<code><?php echo join($removeCommands, '<br />');?></code>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
</h2>
</div>
<?php endif;?>
<hr>
<p><?php echo html::commonButton($lang->extension->viewDeactivated, 'onclick=parent.location.href="' . inlink('browse', 'type=deactivated') . '"');?></p>
<div class='with-padding'>
<h3 class='mgb-20 text-center'><?php echo $title;?></h3>
<?php if($removeCommands):?>
<div class='container mw-500px'>
<p><strong><?php echo $lang->extension->unremovedFiles;?></strong></p>
<code><?php echo join($removeCommands, '<br />');?></code>
</div>
<?php endif;?>
<hr>
<p><?php echo html::commonButton($lang->extension->viewDeactivated, 'onclick=parent.location.href="' . inlink('browse', 'type=deactivated') . '"');?></p>
</div>
</div>
</div>
</body>
</html>

View File

@@ -11,22 +11,26 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
<small class='text-danger'><?php echo $lang->extension->erase;?> <?php echo html::icon('trash');?></small>
</div>
</div>
<div class='alert alert-success with-icon'>
<i class='icon-ok-sign'></i>
<div class='content'>
<h3><?php echo $title;?></h3>
<?php if($removeCommands):?>
<p><strong><?php echo $lang->extension->unremovedFiles;?></strong></p>
<p><?php echo join($removeCommands, '<br />');?></p>
<?php endif;?>
<p class='text-center'><?php echo html::commonButton($lang->extension->viewAvailable, 'onclick=parent.location.href="' . inlink('browse', 'type=available') . '"');?></p>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
<small class='text-danger'><?php echo $lang->extension->erase;?> <?php echo html::icon('trash');?></small>
</h2>
</div>
<div class='alert alert-success with-icon'>
<i class='icon-ok-sign'></i>
<div class='content'>
<h3><?php echo $title;?></h3>
<?php if($removeCommands):?>
<p><strong><?php echo $lang->extension->unremovedFiles;?></strong></p>
<p><?php echo join($removeCommands, '<br />');?></p>
<?php endif;?>
<p class='text-center'><?php echo html::commonButton($lang->extension->viewAvailable, 'onclick=parent.location.href="' . inlink('browse', 'type=available') . '"');?></p>
</div>
</div>
</div>
</div>
</body>

View File

@@ -11,55 +11,59 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon('cog');?></span>
<strong><?php echo $title;?></strong>
<small>
<?php
if(isset($license) and $upgrade == 'yes') printf($lang->extension->upgradeVersion, $this->post->installedVersion, $this->post->upgradeVersion);
?>
</small>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix'><?php echo html::icon('cog');?></span>
<strong><?php echo $title;?></strong>
<small>
<?php
if(isset($license) and $upgrade == 'yes') printf($lang->extension->upgradeVersion, $this->post->installedVersion, $this->post->upgradeVersion);
?>
</small>
</h2>
</div>
<?php if($error):?>
<div class='text-left'>
<div class='container mw-500px'>
<h5 class='text-danger'><?php printf($lang->extension->installFailed, $installType);?></h5>
<p class='text-danger'><?php echo $error;?></p>
</div>
<hr>
<?php echo html::commonButton($lang->extension->refreshPage, 'onclick=location.href=location.href');?>
</div>
<?php elseif(isset($license)):?>
<div class='text-left'>
<div class='content text-center'>
<h5><?php echo $lang->extension->license;?></h5>
<p><?php echo html::textarea('license', $license, "class='form-control' rows='15'");?></p>
<?php echo html::a($agreeLink, $lang->extension->agreeLicense, '', "class='btn btn-primary'");?>
</div>
</div>
<?php else:?>
<div class='text-left'>
<h5 class='text-center mgb-20'><?php echo sprintf($lang->extension->installFinished, $installType);?></h5>
<div class='text-center'>
<?php echo html::commonButton($lang->extension->viewInstalled, 'onclick=parent.location.href="' . inlink('browse') . '" class="btn btn-success"');?>
</div>
<hr>
<div class='alert'>
<?php
echo "<h5 class='success'>{$lang->extension->successDownloadedPackage}</h5>";
echo "<h5 class='success'>{$lang->extension->successCopiedFiles}</h5>";
echo '<ul>';
foreach($files as $fileName => $md5)
{
echo "<li>$fileName</li>";
}
echo '</ul>';
echo "<h5 class='success'>{$lang->extension->successInstallDB}</h5>";
?>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php if($error):?>
<div class='panel panel-body text-left'>
<div class='container mw-500px'>
<h5 class='text-danger'><?php sprintf($lang->extension->installFailed, $installType);?></h5>
<p class='text-danger'><?php echo $error;?></p>
</div>
<hr>
<?php echo html::commonButton($lang->extension->refreshPage, 'onclick=location.href=location.href');?>
</div>
<?php elseif(isset($license)):?>
<div class='panel panel-body '>
<div class='content text-center'>
<h5><?php echo $lang->extension->license;?></h5>
<p><?php echo html::textarea('license', $license, "class='form-control' rows='15'");?></p>
<?php echo html::a($agreeLink, $lang->extension->agreeLicense, '', "class='btn btn-primary'");?>
</div>
</div>
<?php else:?>
<div class='panel panel-body'>
<h5 class='text-center mgb-20'><?php echo sprintf($lang->extension->installFinished, $installType);?></h5>
<div class='text-center'>
<?php echo html::commonButton($lang->extension->viewInstalled, 'onclick=parent.location.href="' . inlink('browse') . '" class="btn btn-success"');?>
</div>
<hr>
<div class='alert'>
<?php
echo "<h5 class='success'>{$lang->extension->successDownloadedPackage}</h5>";
echo "<h5 class='success'>{$lang->extension->successCopiedFiles}</h5>";
echo '<ul>';
foreach($files as $fileName => $md5)
{
echo "<li>$fileName</li>";
}
echo '</ul>';
echo "<h5 class='success'>{$lang->extension->successInstallDB}</h5>";
?>
</div>
</div>
<?php endif;?>
</body>
</html>

View File

@@ -11,136 +11,140 @@
*/
?>
<?php include 'header.html.php';?>
<div class='side'>
<form class='side-search mgb-20' method='post' action='<?php echo inlink('obtain', 'type=bySearch');?>'>
<div class="input-group">
<?php echo html::input('key', $this->post->key, "class='form-control' placeholder='{$lang->extension->bySearch}' autocomplete='off'");?>
<span class="input-group-btn">
<?php echo html::submitButton('<i class="icon-search"></i>', '', 'btn'); ?>
</span>
</div>
</form>
<div class='list-group'>
<?php
echo html::a(inlink('obtain', 'type=byUpdatedTime'), $lang->extension->byUpdatedTime, '', "class='list-group-item' id='byupdatedtime'");
echo html::a(inlink('obtain', 'type=byAddedTime'), $lang->extension->byAddedTime, '', "class='list-group-item' id='byaddedtime'");
echo html::a(inlink('obtain', 'type=byDownloads'), $lang->extension->byDownloads, '', "class='list-group-item' id='bydownloads'");
?>
</div>
<div class='panel panel-sm'>
<div class='panel-heading'><?php echo $lang->extension->byCategory;?></div>
<div class='panel-body'>
<?php $moduleTree ? print($moduleTree) : print($lang->extension->errorGetModules);?>
</div>
</div>
</div>
<div class='main'>
<?php if($extensions):?>
<div class='cards pd-0 mg-0'>
<?php foreach($extensions as $extension):?>
<?php
$currentRelease = $extension->currentRelease;
$latestRelease = isset($extension->latestRelease) ? $extension->latestRelease : '';
?>
<div class='card'>
<div class='card-heading'>
<small class='pull-right text-important'>
<?php
if($latestRelease and $latestRelease->releaseVersion != $currentRelease->releaseVersion)
{
printf($lang->extension->latest, $latestRelease->viewLink, $latestRelease->releaseVersion, $latestRelease->zentaoCompatible);
}?>
</small>
<h5 class='mg-0'>
<?php echo $extension->name . "($currentRelease->releaseVersion)";?>
<small class='label <?php echo $extension->offcial ? 'label-info' : 'label-warning';?>'><?php echo $lang->extension->obtainOfficial[$extension->offcial];?></small>
</h5>
</div>
<div class='card-content text-muted'>
<?php echo $extension->abstract;?>
</div>
<div class='card-actions'>
<div style='margin-bottom: 10px'>
<?php
echo "{$lang->extension->author}: {$extension->author} ";
echo "{$lang->extension->downloads}: {$extension->downloads} ";
echo "{$lang->extension->compatible}: {$lang->extension->compatibleList[$currentRelease->compatible]} ";
echo " {$lang->extension->depends}: ";
if(!empty($currentRelease->depends))
{
foreach(json_decode($currentRelease->depends, true) as $code => $limit)
{
echo $code;
if($limit != 'all')
{
echo '(';
if(!empty($limit['min'])) echo '>= v' . $limit['min'];
if(!empty($limit['max'])) echo '<= v' . $limit['min'];
echo ')';
}
echo ' ';
}
}
?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<div class='cell'>
<form class='side-search mgb-20' method='post' action='<?php echo inlink('obtain', 'type=bySearch');?>'>
<div class="input-group">
<?php echo html::input('key', $this->post->key, "class='form-control' placeholder='{$lang->extension->bySearch}' autocomplete='off'");?>
<span class="input-group-btn">
<?php echo html::submitButton('<i class="icon-search"></i>', '', 'btn'); ?>
</span>
</div>
<?php
echo "{$lang->extension->grade}: ", html::printStars($extension->stars);
?>
<div class='pull-right' style='margin-top: -15px'>
<div class='btn-group'>
</form>
<div class='list-group'>
<?php
$installLink = inlink('install', "extension=$extension->code&downLink=" . helper::safe64Encode($currentRelease->downLink) . "&md5={$currentRelease->md5}&type=$extension->type&overridePackage=no&ignoreCompitable=yes");
echo html::a($extension->viewLink, $lang->extension->view, '', 'class="btn extension"');
if($currentRelease->public)
{
if($extension->type != 'computer' and $extension->type != 'mobile')
echo html::a(inlink('obtain', 'type=byUpdatedTime'), $lang->extension->byUpdatedTime, '', "class='list-group-item' id='byupdatedtime'");
echo html::a(inlink('obtain', 'type=byAddedTime'), $lang->extension->byAddedTime, '', "class='list-group-item' id='byaddedtime'");
echo html::a(inlink('obtain', 'type=byDownloads'), $lang->extension->byDownloads, '', "class='list-group-item' id='bydownloads'");
?>
</div>
</div>
<div class='panel panel-sm'>
<div class='panel-heading'><?php echo $lang->extension->byCategory;?></div>
<div class='panel-body'>
<?php $moduleTree ? print($moduleTree) : print($lang->extension->errorGetModules);?>
</div>
</div>
</div>
<div class='main-col main-content'>
<div class='cell'>
<?php if($extensions):?>
<div class='cards pd-0 mg-0'>
<?php foreach($extensions as $extension):?>
<?php
$currentRelease = $extension->currentRelease;
$latestRelease = isset($extension->latestRelease) ? $extension->latestRelease : '';
?>
<div class='detail'>
<div class='detail-title'>
<small class='pull-right text-important'>
<?php
if($latestRelease and $latestRelease->releaseVersion != $currentRelease->releaseVersion)
{
if(isset($installeds[$extension->code]))
printf($lang->extension->latest, $latestRelease->viewLink, $latestRelease->releaseVersion, $latestRelease->zentaoCompatible);
}?>
</small>
<h5 class='mg-0'>
<?php echo $extension->name . "($currentRelease->releaseVersion)";?>
<small class='label <?php echo $extension->offcial ? 'label-info' : 'label-warning';?>'><?php echo $lang->extension->obtainOfficial[$extension->offcial];?></small>
</h5>
</div>
<div class='detail-content'><?php echo $extension->abstract;?></div>
<div class='detail-actions'>
<div style='margin-bottom: 10px'>
<?php
echo "{$lang->extension->author}: {$extension->author} ";
echo "{$lang->extension->downloads}: {$extension->downloads} ";
echo "{$lang->extension->compatible}: {$lang->extension->compatibleList[$currentRelease->compatible]} ";
echo " {$lang->extension->depends}: ";
if(!empty($currentRelease->depends))
{
foreach(json_decode($currentRelease->depends, true) as $code => $limit)
{
if($installeds[$extension->code]->version != $extension->latestRelease->releaseVersion and $this->extension->checkVersion($extension->latestRelease->zentaoCompatible))
echo $code;
if($limit != 'all')
{
$upgradeLink = inlink('upgrade', "extension=$extension->code&downLink=" . helper::safe64Encode($currentRelease->downLink) . "&md5=$currentRelease->md5&type=$extension->type");
echo html::a($upgradeLink, $lang->extension->upgrade, '', 'class="iframe btn"');
echo '(';
if(!empty($limit['min'])) echo '>= v' . $limit['min'];
if(!empty($limit['max'])) echo '<= v' . $limit['min'];
echo ')';
}
echo ' ';
}
}
?>
</div>
<?php
echo "{$lang->extension->grade}: ", html::printStars($extension->stars);
?>
<div class='pull-right'>
<div class='btn-group'>
<?php
$installLink = inlink('install', "extension=$extension->code&downLink=" . helper::safe64Encode($currentRelease->downLink) . "&md5={$currentRelease->md5}&type=$extension->type&overridePackage=no&ignoreCompitable=yes");
echo html::a($extension->viewLink, $lang->extension->view, '', 'class="btn extension"');
if($currentRelease->public)
{
if($extension->type != 'computer' and $extension->type != 'mobile')
{
if(isset($installeds[$extension->code]))
{
if($installeds[$extension->code]->version != $extension->latestRelease->releaseVersion and $this->extension->checkVersion($extension->latestRelease->zentaoCompatible))
{
$upgradeLink = inlink('upgrade', "extension=$extension->code&downLink=" . helper::safe64Encode($currentRelease->downLink) . "&md5=$currentRelease->md5&type=$extension->type");
echo html::a($upgradeLink, $lang->extension->upgrade, '', 'class="iframe btn"');
}
else
{
echo html::commonButton("<i class='icon-ok'></i> " . $lang->extension->installed, "disabled='disabled'", 'text-success');
}
}
else
{
echo html::commonButton("<i class='icon-ok'></i> " . $lang->extension->installed, "disabled='disabled'", 'text-success');
$label = $currentRelease->compatible ? $lang->extension->installAuto : $lang->extension->installForce;
echo html::a($installLink, $label, '', 'class="iframe btn"');
}
}
else
{
$label = $currentRelease->compatible ? $lang->extension->installAuto : $lang->extension->installForce;
echo html::a($installLink, $label, '', 'class="iframe btn"');
}
}
}
echo html::a($currentRelease->downLink, $lang->extension->downloadAB, '', 'class="manual btn"');
echo html::a($extension->site, $lang->extension->site, '_blank', 'class=btn');
?>
echo html::a($currentRelease->downLink, $lang->extension->downloadAB, '', 'class="manual btn"');
echo html::a($extension->site, $lang->extension->site, '_blank', 'class=btn');
?>
</div>
</div>
</div>
</div>
<?php endforeach;?>
</div>
</div>
<?php endforeach;?>
</div>
<?php if($pager):?>
<div class='clearfix'>
<?php $pager->show()?>
</div>
<?php endif; ?>
<?php else:?>
<div class='alert alert-danger'>
<i class='icon icon-remove-sign'></i>
<div class='content'>
<h4><?php echo $lang->extension->errorOccurs;?></h4>
<div><?php echo $lang->extension->errorGetExtensions;?></div>
<?php if($pager):?>
<div class='table-footer clearfix'>
<?php $pager->show('right', 'pagerjs')?>
</div>
<?php endif; ?>
<?php else:?>
<div class='alert alert-danger'>
<i class='icon icon-remove-sign'></i>
<div class='content'>
<h4><?php echo $lang->extension->errorOccurs;?></h4>
<div><?php echo $lang->extension->errorGetExtensions;?></div>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php endif;?>
</div>
<script>
$('#<?php echo $type;?>').addClass('active')
$('#<?php echo $type;?>').addClass('selected')
$('#module<?php echo $moduleID;?>').addClass('active')
</script>
<?php include '../../common/view/footer.html.php';?>

View File

@@ -11,17 +11,21 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $extension->name . '[' . $extension->code . '] ' .$lang->extension->structure . ':';?></strong>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $extension->name . '[' . $extension->code . '] ' .$lang->extension->structure . ':';?></strong>
</h2>
</div>
<div class='with-padding'>
<pre><?php
$appRoot = $this->app->getAppRoot();
$files = json_decode($extension->files);
foreach($files as $file => $md5) echo $appRoot . $file . "\n";
?></pre>
</div>
</div>
</div>
<div class='main with-padding'>
<pre><?php
$appRoot = $this->app->getAppRoot();
$files = json_decode($extension->files);
foreach($files as $file => $md5) echo $appRoot . $file . "\n";
?></pre>
</div>
<?php include '../../common/view/footer.lite.html.php';?>

View File

@@ -11,50 +11,54 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
<small class='text-danger'><?php echo html::icon('cog');?> <?php echo $lang->extension->uninstall;?></small>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
<small class='text-danger'><?php echo html::icon('cog');?> <?php echo $lang->extension->uninstall;?></small>
</h2>
</div>
<?php if(isset($confirm) and $confirm == 'no'):?>
<div class='alert alert-pure with-icon'>
<i class='icon-info-sign'></i>
<div class='content'>
<?php
echo "<p class='waring'>{$lang->extension->confirmUninstall}";
echo html::a(inlink('uninstall', "extension=$code&confirm=yes"), $lang->extension->uninstall, '', "class='btn'");
echo "</p>";
?>
</div>
</div>
<?php elseif(!empty($error)):?>
<div class='alert alert-pure with-icon'>
<i class='icon-info-sign'></i>
<div class='content'>
<?php
echo "<h3 class='error'>" . $lang->extension->uninstallFailed . "</h3>";
echo "<p>$error</p>";
?>
</div>
</div>
<?php else:?>
<div class='alert alert-pure with-icon'>
<i class='icon-ok-sign'></i>
<div class='content'>
<?php
echo "<h3>{$title}</h3>";
if(!empty($backupFile)) echo "<p>" . sprintf($lang->extension->backDBFile, $backupFile) . '</p>';
if($removeCommands)
{
echo "<p class='strong'>{$lang->extension->unremovedFiles}</p>";
echo join($removeCommands, '<br />');
}
echo "<p class='text-center'>" . html::commonButton($lang->extension->viewAvailable, 'onclick=parent.location.href="' . inlink('browse', 'type=available') . '"') . '</p>';
?>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php if(isset($confirm) and $confirm == 'no'):?>
<div class='alert alert-pure with-icon'>
<i class='icon-info-sign'></i>
<div class='content'>
<?php
echo "<p class='waring'>{$lang->extension->confirmUninstall}";
echo html::a(inlink('uninstall', "extension=$code&confirm=yes"), $lang->extension->uninstall, '', "class='btn'");
echo "</p>";
?>
</div>
</div>
<?php elseif(!empty($error)):?>
<div class='alert alert-pure with-icon'>
<i class='icon-info-sign'></i>
<div class='content'>
<?php
echo "<h3 class='error'>" . $lang->extension->uninstallFailed . "</h3>";
echo "<p>$error</p>";
?>
</div>
</div>
<?php else:?>
<div class='alert alert-pure with-icon'>
<i class='icon-ok-sign'></i>
<div class='content'>
<?php
echo "<h3>{$title}</h3>";
if(!empty($backupFile)) echo "<p>" . sprintf($lang->extension->backDBFile, $backupFile) . '</p>';
if($removeCommands)
{
echo "<p class='strong'>{$lang->extension->unremovedFiles}</p>";
echo join($removeCommands, '<br />');
}
echo "<p class='text-center'>" . html::commonButton($lang->extension->viewAvailable, 'onclick=parent.location.href="' . inlink('browse', 'type=available') . '"') . '</p>';
?>
</div>
</div>
<?php endif;?>
</body>
</html>

View File

@@ -11,26 +11,27 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon('upload');?></span>
<strong><?php echo $lang->extension->upload;?></strong>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->extension->upload;?></h2>
</div>
<?php if(!empty($error)):?>
<div class='text-left'>
<div class='container mw-500px'>
<p class='text-danger'><?php echo $error;?></p>
</div>
<hr class='small'>
<?php echo html::commonButton($lang->extension->refreshPage, 'onclick=location.href=location.href');?>
</div>
<?php else:?>
<form method='post' target='hiddenwin' enctype='multipart/form-data' style='padding: 20px 20%'>
<div class='input-group'>
<input type='file' name='file' class='form-control' />
<span class='input-group-btn'><?php echo html::submitButton($lang->extension->install);?></span>
</div>
</form>
<?php endif;?>
</div>
</div>
<?php if(!empty($error)):?>
<div class='panel panel-body text-left'>
<div class='container mw-500px'>
<p class='text-danger'><?php echo $error;?></p>
</div>
<hr>
<?php echo html::commonButton($lang->extension->refreshPage, 'onclick=location.href=location.href');?>
</div>
<?php else:?>
<form method='post' target='hiddenwin' enctype='multipart/form-data' style='padding: 5% 20%'>
<div class='input-group'>
<input type='file' name='file' class='form-control' />
<span class='input-group-btn'><?php echo html::submitButton($lang->extension->install);?></span>
</div>
</form>
<?php endif;?>
<?php include '../../common/view/footer.lite.html.php';?>

View File

@@ -11,21 +11,25 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
<strong><?php echo $title;?></strong>
</h2>
</div>
<?php if($error):?>
<div class='alert alert-danger with-icon'>
<i class='icon-info-sign'></i>
<div class='content'>
<h3><?php echo $lang->extension->waringInstall;?></h3>
<p><?php echo $error;?></p>
<p class='text-center'><?php echo html::commonButton($lang->extension->refreshPage, 'onclick=location.href=location.href');?></p>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php if($error):?>
<div class='alert alert-danger with-icon'>
<i class='icon-info-sign'></i>
<div class='content'>
<h3><?php echo $lang->extension->waringInstall;?></h3>
<p><?php echo $error;?></p>
<p class='text-center'><?php echo html::commonButton($lang->extension->refreshPage, 'onclick=location.href=location.href');?></p>
</div>
</div>
<?php endif;?>
</body>
</html>