use nav-pills instead of nav-tabs, set attribute role

This commit is contained in:
Uwe Steinmann 2021-05-04 09:57:23 +02:00
parent 196b19d42a
commit b4b0258fbd
5 changed files with 33 additions and 33 deletions

View File

@ -96,18 +96,18 @@ $(document).ready(function() {
$document = $this->params['document'];
$version = $this->params['version'];
?>
<ul class="nav nav-tabs" id="preview-tab">
<li class="active"><a data-target="#preview_markdown" data-toggle="tab"><?php printMLText('preview_markdown'); ?></a></li>
<li><a data-target="#preview_plain" data-toggle="tab"><?php printMLText('preview_plain'); ?></a></li>
<ul class="nav nav-pills" id="preview-tab" role="tablist">
<li class="active"><a data-target="#preview_markdown" data-toggle="tab" role="tab"><?php printMLText('preview_markdown'); ?></a></li>
<li><a data-target="#preview_plain" data-toggle="tab" role="tab"><?php printMLText('preview_plain'); ?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="preview_markdown">
<div class="tab-pane active" id="preview_markdown" role="tabpanel">
<?php
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($dms->contentDir . $version->getPath()));
?>
</div>
<div class="tab-pane" id="preview_plain">
<div class="tab-pane" id="preview_plain" role="tabpanel">
<?php
echo "<pre>".htmlspecialchars(file_get_contents($dms->contentDir . $version->getPath()), ENT_SUBSTITUTE)."</pre>";
?>

View File

@ -272,12 +272,12 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
$this->columnEnd();
$this->columnStart(8);
?>
<ul class="nav nav-tabs" id="extensionstab">
<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"><?= getMLText('extension_mgr_installed'); ?></a></li>
<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"><?= getMLText('extension_mgr_repository'); ?></a></li>
<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="tab"><?= getMLText('extension_mgr_installed'); ?></a></li>
<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="tab"><?= getMLText('extension_mgr_repository'); ?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" id="installed">
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" id="installed" role="tabpanel">
<input id="extensionfilter" type="text">
<div class="ajax" data-view="ExtensionMgr" data-action="installedList"></div>
<?php
@ -290,7 +290,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
</form>
</div>
<div class="tab-pane <?php if($currenttab == 'repository') echo 'active'; ?>" id="repository">
<div class="tab-pane <?php if($currenttab == 'repository') echo 'active'; ?>" id="repository" role="tabpanel">
<?php
echo "<table class=\"table _table-condensed\">\n";
print "<thead>\n<tr>\n";

View File

@ -120,19 +120,19 @@ $(document).ready( function() {
$wentries = array_reverse($wentries);
}
?>
<ul class="nav nav-tabs" id="logtab">
<li <?php echo ($mode == 'web') ? 'class="active"' : ''; ?>><a data-target="#web" data-toggle="tab">web</a></li>
<li <?php echo ($mode == 'webdav') ? 'class="active"' : ''; ?>><a data-target="#webdav" data-toggle="tab">webdav</a></li>
<ul class="nav nav-pills" id="logtab" role="tablist">
<li <?php echo ($mode == 'web') ? 'class="active"' : ''; ?>><a data-target="#web" data-toggle="tab" role="tab">web</a></li>
<li <?php echo ($mode == 'webdav') ? 'class="active"' : ''; ?>><a data-target="#webdav" data-toggle="tab" role="tab">webdav</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane <?php echo ($mode == 'web') ? 'active' : ''; ?>" id="web">
<div class="tab-pane <?php echo ($mode == 'web') ? 'active' : ''; ?>" id="web" role="tabpanel">
<?php
$this->contentContainerStart();
$this->filelist($entries, 'web');
$this->contentContainerEnd();
?>
</div>
<div class="tab-pane <?php echo ($mode == 'webdav') ? 'active' : ''; ?>" id="webdav">
<div class="tab-pane <?php echo ($mode == 'webdav') ? 'active' : ''; ?>" id="webdav" role="tabpanel">
<?php
$this->contentContainerStart();
$this->filelist($wentries, 'webdav');

View File

@ -32,11 +32,11 @@
class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
protected function showPaneHeader($name, $title, $isactive) { /* {{{ */
echo '<li class="nav-item '.($isactive ? 'active' : '').'"><a class="nav-link '.($isactive ? 'active' : '').'" data-target="#'.$name.'" data-toggle="tab">'.$title.'</a></li>'."\n";
echo '<li class="nav-item '.($isactive ? 'active' : '').'"><a class="nav-link '.($isactive ? 'active' : '').'" data-target="#'.$name.'" data-toggle="tab" role="tab">'.$title.'</a></li>'."\n";
} /* }}} */
protected function showStartPaneContent($name, $isactive) { /* {{{ */
echo '<div class="tab-pane'.($isactive ? ' active' : '').'" id="'.$name.'">';
echo '<div class="tab-pane'.($isactive ? ' active' : '').'" id="'.$name.'" role="tabpanel">';
$this->contentContainerStart();
echo '<table class="table-condensed table-sm" style="table-layout: fixed;">';
echo '<tr><td width="20%"></td><td width="80%"></td></tr>';
@ -265,7 +265,7 @@ if(!is_writeable($settings->_configFilePath)) {
}
?>
<ul class="nav nav-tabs" id="settingstab">
<ul class="nav nav-pills" id="settingstab" role="tablist">
<?php $this->showPaneHeader('site', getMLText('settings_Site'), (!$currenttab || $currenttab == 'site')); ?>
<?php $this->showPaneHeader('system', getMLText('settings_System'), ($currenttab == 'system')); ?>
<?php $this->showPaneHeader('advanced', getMLText('settings_Advanced'), ($currenttab == 'advanced')); ?>

View File

@ -544,40 +544,40 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
if(is_string($txt))
echo $txt;
?>
<ul class="nav nav-tabs" id="docinfotab">
<li class="nav-item <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>"><a class="nav-link <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" data-target="#docinfo" data-toggle="tab"><?php printMLText('current_version'); ?></a></li>
<ul class="nav nav-pills" id="docinfotab" role="tablist">
<li class="nav-item <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>"><a class="nav-link <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" data-target="#docinfo" data-toggle="tab" role="tab"><?php printMLText('current_version'); ?></a></li>
<?php if (count($versions)>1) { ?>
<li class="nav-item <?php if($currenttab == 'previous') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'previous') echo 'active'; ?>" data-target="#previous" data-toggle="tab"><?php printMLText('previous_versions'); ?></a></li>
<li class="nav-item <?php if($currenttab == 'previous') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'previous') echo 'active'; ?>" data-target="#previous" data-toggle="tab" role="tab"><?php printMLText('previous_versions'); ?></a></li>
<?php
}
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
?>
<li class="nav-item <?php if($currenttab == 'revapp') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'revapp') echo 'active'; ?>" data-target="#revapp" data-toggle="tab"><?php if($workflowmode == 'traditional') echo getMLText('reviewers')."/"; echo getMLText('approvers'); ?></a></li>
<li class="nav-item <?php if($currenttab == 'revapp') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'revapp') echo 'active'; ?>" data-target="#revapp" data-toggle="tab" role="tab"><?php if($workflowmode == 'traditional') echo getMLText('reviewers')."/"; echo getMLText('approvers'); ?></a></li>
<?php
}
} elseif($workflowmode == 'advanced') {
if($workflow) {
?>
<li class="nav-item <?php if($currenttab == 'workflow') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'workflow') echo 'active'; ?>" data-target="#workflow" data-toggle="tab"><?php echo getMLText('workflow'); ?></a></li>
<li class="nav-item <?php if($currenttab == 'workflow') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'workflow') echo 'active'; ?>" data-target="#workflow" data-toggle="tab" role="tab"><?php echo getMLText('workflow'); ?></a></li>
<?php
}
}
?>
<li class="nav-item <?php if($currenttab == 'attachments') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'attachments') echo 'active'; ?>" data-target="#attachments" data-toggle="tab"><?php printMLText('linked_files'); echo (count($files)) ? " (".count($files).")" : ""; ?></a></li>
<li class="nav-item <?php if($currenttab == 'links') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'links') echo 'active'; ?>" data-target="#links" data-toggle="tab"><?php printMLText('linked_documents'); echo (count($links) || count($reverselinks)) ? " (".count($links)."/".count($reverselinks).")" : ""; ?></a></li>
<li class="nav-item <?php if($currenttab == 'attachments') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'attachments') echo 'active'; ?>" data-target="#attachments" data-toggle="tab" role="tab"><?php printMLText('linked_files'); echo (count($files)) ? " (".count($files).")" : ""; ?></a></li>
<li class="nav-item <?php if($currenttab == 'links') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'links') echo 'active'; ?>" data-target="#links" data-toggle="tab" role="tab"><?php printMLText('linked_documents'); echo (count($links) || count($reverselinks)) ? " (".count($links)."/".count($reverselinks).")" : ""; ?></a></li>
<?php
$tabs = $this->callHook('extraTabs', $document);
if($tabs) {
foreach($tabs as $tabid=>$tab) {
echo '<li class="nav-item '.($currenttab == $tabid ? 'active' : '').'"><a class="nav-link '.($currenttab == $tabid ? 'active' : '').'" data-target="#'.$tabid.'" data-toggle="tab">'.$tab['title'].'</a></li>';
echo '<li class="nav-item '.($currenttab == $tabid ? 'active' : '').'"><a class="nav-link '.($currenttab == $tabid ? 'active' : '').'" data-target="#'.$tabid.'" data-toggle="tab" role="tab">'.$tab['title'].'</a></li>';
}
}
?>
</ul>
<div class="tab-content">
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" id="docinfo">
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" id="docinfo" role="tabpanel">
<?php
if(!$latestContent) {
$this->contentContainerStart();
@ -777,7 +777,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
?>
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp">
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp" role="tabpanel">
<?php
$this->rowStart();
/* Just check fo an exting reviewStatus, even workflow mode is set
@ -1023,7 +1023,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
}
}
?>
<div class="tab-pane <?php if($currenttab == 'workflow') echo 'active'; ?>" id="workflow">
<div class="tab-pane <?php if($currenttab == 'workflow') echo 'active'; ?>" id="workflow" role="tabpanel">
<?php
$this->rowStart();
if($user_is_involved || $user->isAdmin())
@ -1229,7 +1229,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
}
if (count($versions)>1) {
?>
<div class="tab-pane <?php if($currenttab == 'previous') echo 'active'; ?>" id="previous">
<div class="tab-pane <?php if($currenttab == 'previous') echo 'active'; ?>" id="previous" role="tabpanel">
<?php
$txt = $this->callHook('prePreviousVersionsTab', $versions);
if(is_string($txt))
@ -1342,7 +1342,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
<?php
}
?>
<div class="tab-pane <?php if($currenttab == 'attachments') echo 'active'; ?>" id="attachments">
<div class="tab-pane <?php if($currenttab == 'attachments') echo 'active'; ?>" id="attachments" role="tabpanel">
<?php
if (count($files) > 0) {
@ -1427,7 +1427,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
}
?>
</div>
<div class="tab-pane <?php if($currenttab == 'links') echo 'active'; ?>" id="links">
<div class="tab-pane <?php if($currenttab == 'links') echo 'active'; ?>" id="links" role="tabpanel">
<?php
if (count($links) > 0) {
@ -1535,7 +1535,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
<?php
if($tabs) {
foreach($tabs as $tabid=>$tab) {
echo '<div class="tab-pane '.($currenttab == $tabid ? 'active' : '').'" id="'.$tabid.'">';
echo '<div class="tab-pane '.($currenttab == $tabid ? 'active' : '').'" id="'.$tabid.'" role="tabpanel">';
echo $tab['content'];
echo "</div>\n";
}