use methods in style to create tabs

This commit is contained in:
Uwe Steinmann 2022-12-18 12:41:39 +01:00
parent ed036819e7
commit edabd515f1

View File

@ -307,11 +307,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
$this->columnStart(8); $this->columnStart(8);
?> ?>
<ul class="nav nav-pills" id="extensionstab" role="tablist"> <ul class="nav nav-pills" id="extensionstab" role="tablist">
<li class="nav-item <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>"><a class="nav-link <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" data-target="#installed" data-toggle="tab" role="button"><?= getMLText('extension_mgr_installed'); ?></a></li> <?php $this->showPaneHeader('installed', getMLText('extension_mgr_installed'), (!$currenttab || $currenttab == 'installed')); ?>
<li class="nav-item <?php if($currenttab == 'repository') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'repository') echo 'active'; ?>" data-target="#repository" data-toggle="tab" role="button"><?= getMLText('extension_mgr_repository'); ?></a></li> <?php $this->showPaneHeader('repository', getMLText('extension_mgr_repository'), ($currenttab == 'repository')); ?>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" id="installed" role="tabpanel"> <?php $this->showStartPaneContent('installed', (!$currenttab || $currenttab == 'installed')); ?>
<input id="extensionfilter" class="form-control" type="text" placeholder="<?= getMLText('type_to_filter'); ?>"> <input id="extensionfilter" class="form-control" type="text" placeholder="<?= getMLText('type_to_filter'); ?>">
<div class="ajax" data-view="ExtensionMgr" data-action="installedList" data-afterload="()=>{filterList();}"></div> <div class="ajax" data-view="ExtensionMgr" data-action="installedList" data-afterload="()=>{filterList();}"></div>
<?php <?php
@ -322,9 +322,9 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
<input type="hidden" name="action" value="refresh" /> <input type="hidden" name="action" value="refresh" />
<p><?php $this->formSubmit("<i class=\"fa fa-refresh\"></i> " . getMLText('refresh'));?></p> <p><?php $this->formSubmit("<i class=\"fa fa-refresh\"></i> " . getMLText('refresh'));?></p>
</form> </form>
</div> <?php $this->showEndPaneContent('installed', $currenttab); ?>
<div class="tab-pane <?php if($currenttab == 'repository') echo 'active'; ?>" id="repository" role="tabpanel"> <?php $this->showStartPaneContent('repository', ($currenttab == 'repository')); ?>
<?php <?php
echo "<table class=\"table\">\n"; echo "<table class=\"table\">\n";
print "<thead>\n<tr>\n"; print "<thead>\n<tr>\n";
@ -376,8 +376,8 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
<input type="hidden" name="forceupdate" value="1" /> <input type="hidden" name="forceupdate" value="1" />
<?php $this->formSubmit("<i class=\"fa fa-refresh\"></i> " . getMLText('force_update'));?> <?php $this->formSubmit("<i class=\"fa fa-refresh\"></i> " . getMLText('force_update'));?>
</form> </form>
</div>
</div> </div>
<?php $this->showEndPaneContent('repository', $currenttab); ?>
</div> </div>
<?php <?php
$this->columnEnd(); $this->columnEnd();