Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2021-05-04 12:12:15 +02:00
commit efd46b7a1d
8 changed files with 88 additions and 108 deletions

View File

@ -707,6 +707,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo $content; echo $content;
} /* }}} */ } /* }}} */
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" role="tab">'.$title.'</a></li>'."\n";
} /* }}} */
protected function showStartPaneContent($name, $isactive) { /* {{{ */
echo '<div class="tab-pane'.($isactive ? ' active' : '').'" id="'.$name.'" role="tabpanel">';
} /* }}} */
protected function showEndPaneContent($name, $currentab) { /* {{{ */
echo '</div>';
} /* }}} */
private function folderNavigationBar($folder) { /* {{{ */ private function folderNavigationBar($folder) { /* {{{ */
$dms = $this->params['dms']; $dms = $this->params['dms'];
$accessobject = $this->params['accessobject']; $accessobject = $this->params['accessobject'];
@ -1369,7 +1381,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
foreach($config['attributes'] as $attrname=>$attrval) foreach($config['attributes'] as $attrname=>$attrval)
$content .= ' '.$attrname.'="'.$attrval.'"'; $content .= ' '.$attrname.'="'.$attrval.'"';
} }
$content .= ">".$config['title']."</a>\n"; $content .= ">".$config['title']."</a>\n";
return $content; return $content;
} /* }}} */ } /* }}} */
@ -1384,7 +1396,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
*/ */
function getModalBox($config) { /* {{{ */ function getModalBox($config) { /* {{{ */
$content = ' $content = '
<div class="modal hide" id="'.$config['id'].'" tabindex="-1" role="dialog" aria-labelledby="'.$config['id'].'Label" aria-hidden="true"> <div class="modal modal-wide hide" id="'.$config['id'].'" tabindex="-1" role="dialog" aria-labelledby="'.$config['id'].'Label" aria-hidden="true">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="'.$config['id'].'Label">'.$config['title'].'</h3> <h3 id="'.$config['id'].'Label">'.$config['title'].'</h3>
@ -1559,7 +1571,7 @@ $(document).ready(function() {
array( array(
'target' => 'docChooser'.$formid, 'target' => 'docChooser'.$formid,
'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree, 'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree,
'title' => getMLText('document') 'title' => getMLText('document').'…'
)); ));
$content .= "</div>\n"; $content .= "</div>\n";
if(!$skiptree) if(!$skiptree)
@ -1623,7 +1635,7 @@ function folderSelected<?php echo $formid ?>(id, name) {
array( array(
'target' => 'folderChooser'.$formid, 'target' => 'folderChooser'.$formid,
'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude, 'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude,
'title' => getMLText('folder') 'title' => getMLText('folder').'…'
)); ));
} }
$content .= "</div>\n"; $content .= "</div>\n";
@ -1695,7 +1707,7 @@ $(document).ready(function() {
array( array(
'target' => 'keywordChooser', 'target' => 'keywordChooser',
'remote' => "../out/out.KeywordChooser.php?target=".$formName, 'remote' => "../out/out.KeywordChooser.php?target=".$formName,
'title' => getMLText('keywords') 'title' => getMLText('keywords').'…'
)); ));
$content .= ' $content .= '
</div> </div>
@ -1946,7 +1958,7 @@ $(document).ready(function() {
array( array(
'target' => 'dropfolderChooser', 'target' => 'dropfolderChooser',
'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders, 'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders,
'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")) 'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")).'…'
)); ));
$content .= "</div>\n"; $content .= "</div>\n";
$content .= $this->getModalBox( $content .= $this->getModalBox(

View File

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

View File

@ -101,12 +101,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
$extname = $this->params['extname']; $extname = $this->params['extname'];
$extconf = $extmgr->getExtensionConfiguration(); $extconf = $extmgr->getExtensionConfiguration();
echo "<table class=\"table _table-condensed\">\n"; echo "<table class=\"table\">\n";
print "<thead>\n<tr>\n"; print "<thead>\n<tr>\n";
print "<th></th>\n"; print "<th></th>\n";
print "<th>".getMLText('name')."</th>\n"; print "<th>".getMLText('name')."</th>\n";
print "<th>".getMLText('version')."</th>\n"; print "<th>".getMLText('version')."</th>\n";
print "<th>".getMLText('author')."</th>\n";
print "<th></th>\n"; print "<th></th>\n";
print "</tr></thead><tbody>\n"; print "</tr></thead><tbody>\n";
$list = $extmgr->getExtensionListByName($extname); $list = $extmgr->getExtensionListByName($extname);
@ -124,11 +123,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
echo ">"; echo ">";
echo "<td width=\"32\">".($re['icon-data'] ? '<img width="32" height="32" alt="'.$re['name'].'" title="'.$re['name'].'" src="'.$re['icon-data'].'">' : '')."</td>"; echo "<td width=\"32\">".($re['icon-data'] ? '<img width="32" height="32" alt="'.$re['name'].'" title="'.$re['name'].'" src="'.$re['icon-data'].'">' : '')."</td>";
echo "<td>".$re['title']."<br /><small>".$re['description']."</small>"; echo "<td>".$re['title']."<br /><small>".$re['description']."</small>";
echo "<br /><small>".getMLText('author').": ".$re['author']['name'].", ".$re['author']['company']."</small>";
if($checkmsgs) if($checkmsgs)
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>"; echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>";
echo "</td>"; echo "</td>";
echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>"; echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>";
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
echo "<td nowrap>"; echo "<td nowrap>";
echo "<div class=\"list-action\">"; echo "<div class=\"list-action\">";
if(!$checkmsgs && $extmgr->isWritableExtDir()) if(!$checkmsgs && $extmgr->isWritableExtDir())
@ -178,12 +177,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
$extdir = $this->params['extdir']; $extdir = $this->params['extdir'];
$extconf = $extmgr->getExtensionConfiguration(); $extconf = $extmgr->getExtensionConfiguration();
echo "<table id=\"extensionlist\" class=\"table _table-condensed\">\n"; echo "<table id=\"extensionlist\" class=\"table\">\n";
print "<thead>\n<tr>\n"; print "<thead>\n<tr>\n";
print "<th></th>\n"; print "<th></th>\n";
print "<th>".getMLText('name')."</th>\n"; print "<th>".getMLText('name')."</th>\n";
print "<th>".getMLText('version')."</th>\n"; print "<th>".getMLText('version')."</th>\n";
print "<th>".getMLText('author')."</th>\n";
print "<th></th>\n"; print "<th></th>\n";
print "</tr></thead><tbody>\n"; print "</tr></thead><tbody>\n";
$errmsgs = array(); $errmsgs = array();
@ -206,17 +204,17 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
echo "</td>"; echo "</td>";
echo "<td>".$extconf['title']; echo "<td>".$extconf['title'];
echo "<br /><small>".$extconf['description']."</small>"; echo "<br /><small>".$extconf['description']."</small>";
echo "<br /><small>".getMLText('author').": <a href=\"mailto:".htmlspecialchars($extconf['author']['email'])."\">".$extconf['author']['name']."</a>, ".$extconf['author']['company']."</small>";
if($errmsgs) if($errmsgs)
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $errmsgs)."</div>"; echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $errmsgs)."</div>";
echo "</td>"; echo "</td>";
echo "<td nowrap>".$extconf['version']; echo "<td nowrap>".$extconf['version'];
echo "<br /><small>".$extconf['releasedate']."</small>"; echo "<br /><small>".$extconf['releasedate']."</small>";
echo "</td>"; echo "</td>";
echo "<td nowrap><a href=\"mailto:".htmlspecialchars($extconf['author']['email'])."\">".$extconf['author']['name']."</a><br /><small>".$extconf['author']['company']."</small></td>";
echo "<td nowrap>"; echo "<td nowrap>";
echo "<div class=\"list-action\">"; echo "<div class=\"list-action\">";
if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) { if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) {
echo "<a data-target=\"#extensionChangelog\" href=\"../out/out.ExtensionMgr.php?action=changelog&extensionname=".$extname."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_changelog')."\"><i class=\"fa fa-reorder\"></i></a>\n"; echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=changelog&extensionname='.$extname, 'class'=>'', 'title'=>'<i class="fa fa-reorder"></i>'));
} }
if($extconf['config']) if($extconf['config'])
echo "<a href=\"../out/out.Settings.php?currenttab=extensions#".$extname."\" title=\"".getMLText('configure_extension')."\"><i class=\"fa fa-cogs\"></i></a>"; echo "<a href=\"../out/out.Settings.php?currenttab=extensions#".$extname."\" title=\"".getMLText('configure_extension')."\"><i class=\"fa fa-cogs\"></i></a>";
@ -271,12 +269,12 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
$this->columnEnd(); $this->columnEnd();
$this->columnStart(8); $this->columnStart(8);
?> ?>
<ul class="nav nav-tabs" id="extensionstab"> <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"><?= getMLText('extension_mgr_installed'); ?></a></li> <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"><?= getMLText('extension_mgr_repository'); ?></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> </ul>
<div class="tab-content"> <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"> <input id="extensionfilter" type="text">
<div class="ajax" data-view="ExtensionMgr" data-action="installedList"></div> <div class="ajax" data-view="ExtensionMgr" data-action="installedList"></div>
<?php <?php
@ -289,15 +287,14 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
</form> </form>
</div> </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 <?php
if($extmgr->getRepositoryUrl()) { if($extmgr->getRepositoryUrl()) {
echo "<table class=\"table _table-condensed\">\n"; echo "<table class=\"table\">\n";
print "<thead>\n<tr>\n"; print "<thead>\n<tr>\n";
print "<th></th>\n"; print "<th></th>\n";
print "<th>".getMLText('name')."</th>\n"; print "<th>".getMLText('name')."</th>\n";
print "<th>".getMLText('version')."</th>\n"; print "<th>".getMLText('version')."</th>\n";
print "<th>".getMLText('author')."</th>\n";
print "<th></th>\n"; print "<th></th>\n";
print "</tr></thead><tbody>\n"; print "</tr></thead><tbody>\n";
$list = $extmgr->getExtensionList(); $list = $extmgr->getExtensionList();
@ -318,15 +315,15 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
echo "<td width=\"32\">".($re['icon-data'] ? '<img width="32" height="32" alt="'.$re['name'].'" title="'.$re['name'].'" src="'.$re['icon-data'].'">' : '')."</td>"; echo "<td width=\"32\">".($re['icon-data'] ? '<img width="32" height="32" alt="'.$re['name'].'" title="'.$re['name'].'" src="'.$re['icon-data'].'">' : '')."</td>";
echo "<td>".$re['title']; echo "<td>".$re['title'];
echo "<br /><small>".$re['description']."</small>"; echo "<br /><small>".$re['description']."</small>";
echo "<br /><small>".getMLText('author').": ".$re['author']['name'].", ".$re['author']['company']."</small>";
if($checkmsgs) if($checkmsgs)
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>"; echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>";
echo "</td>"; echo "</td>";
echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>"; echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>";
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
echo "<td nowrap>"; echo "<td nowrap>";
echo "<div class=\"list-action\">"; echo "<div class=\"list-action\">";
echo "<a data-target=\"#extensionInfo\" href=\"../out/out.ExtensionMgr.php?action=info_versions&extensionname=".$re['name']."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_version_list')."\"><i class=\"fa fa-list-ol\"></i></a>\n"; echo $this->getModalBoxLink(array('target'=>'extensionInfo', 'remote'=>'out.ExtensionMgr.php?action=info_versions&extensionname='.$re['name'], 'class'=>'', 'title'=>'<i class="fa fa-list-ol"></i>'));
echo "<a data-target=\"#extensionChangelog\" href=\"../out/out.ExtensionMgr.php?action=info_changelog&extensionname=".$re['name']."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_changelog')."\"><i class=\"fa fa-reorder\"></i></a>\n"; echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=info_changelog&extensionname='.$re['name'], 'class'=>'', 'title'=>'<i class="fa fa-reorder"></i>'));
if(!$checkmsgs && $extmgr->isWritableExtDir()) if(!$checkmsgs && $extmgr->isWritableExtDir())
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$re['name']."-import\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"import\" /><input type=\"hidden\" name=\"currenttab\" value=\"repository\" /><input type=\"hidden\" name=\"url\" value=\"".$re['filename']."\" /><a class=\"import\" data-extname=\"".$re['name']."\" title=\"".getMLText('import_extension')."\"><i class=\"fa fa-download\"></i></a></form>"; echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$re['name']."-import\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"import\" /><input type=\"hidden\" name=\"currenttab\" value=\"repository\" /><input type=\"hidden\" name=\"url\" value=\"".$re['filename']."\" /><a class=\"import\" data-extname=\"".$re['name']."\" title=\"".getMLText('import_extension')."\"><i class=\"fa fa-download\"></i></a></form>";
echo "</div>"; echo "</div>";
@ -352,33 +349,8 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
<?php <?php
$this->columnEnd(); $this->columnEnd();
$this->rowEnd(); $this->rowEnd();
?> echo $this->getModalBox(array('id'=>'extensionInfo', 'title'=>getMLText('extension_version_list'), 'content'=>'<p>'.getMLText('extension_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')))));
<div class="modal modal-wide hide" id="extensionInfo" tabindex="-1" role="dialog" aria-labelledby="extensionInfoLabel" aria-hidden="true"> echo $this->getModalBox(array('id'=>'extensionChangelog', 'title'=>getMLText('extension_changelog'), 'content'=>'<p>'.getMLText('changelog_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')))));
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="extensionInfoLabel"><?= getMLText("extension_version_list") ?></h3>
</div>
<div class="modal-body">
<p><?php printMLText('extension_loading') ?></p>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php printMLText("close") ?></button>
</div>
</div>
<div class="modal modal-wide hide" id="extensionChangelog" tabindex="-1" role="dialog" aria-labelledby="extensionChangelogLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="extensionChangelogLabel"><?= getMLText("extension_changelog") ?></h3>
</div>
<div class="modal-body">
<p><?php printMLText('changelog_loading') ?></p>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php printMLText("close") ?></button>
</div>
</div>
<?php
$this->contentEnd(); $this->contentEnd();
$this->htmlEndPage(); $this->htmlEndPage();
} /* }}} */ } /* }}} */

View File

@ -38,7 +38,7 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style {
if ($print_header){ if ($print_header){
print "<form action=\"out.RemoveLog.php\" method=\"get\">\n"; print "<form action=\"out.RemoveLog.php\" method=\"get\">\n";
print "<table class=\"table-condensed\">\n"; print "<table class=\"table table-condensed table-sm\">\n";
print "<thead>\n<tr>\n"; print "<thead>\n<tr>\n";
print "<th></th>\n"; print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n"; print "<th>".getMLText("name")."</th>\n";
@ -65,13 +65,13 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style {
print "<a href=\"../op/op.Download.php?logname=".$entry."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText("download")."</a>"; print "<a href=\"../op/op.Download.php?logname=".$entry."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText("download")."</a>";
} }
print "&nbsp;"; print "&nbsp;";
print "<a data-target=\"#logViewer\" data-cache=\"false\" href=\"out.LogManagement.php?logname=".$entry."\" role=\"button\" class=\"btn btn-mini\" data-toggle=\"modal\"><i class=\"fa fa-eye-open\"></i> ".getMLText('view')." …</a>"; echo $this->getModalBoxLink(array('target'=>'logViewer', 'remote'=>'out.LogManagement.php?logname='.$entry, 'class'=>'btn btn-primary btn-mini btn-sm', 'title'=>'<i class="fa fa-eye"></i><span class="d-none d-lg-block"> '.getMLText('view').'</span>'));
print "</td>\n"; print "</td>\n";
print "</tr>\n"; print "</tr>\n";
} }
if ($print_header) printMLText("empty_list"); if ($print_header) printMLText("empty_list");
else print "<tr><td><i class=\"fa fa-arrow-up\"></i></td><td colspan=\"2\"><button type=\"submit\" class=\"btn\"><i class=\"fa fa-remove\"></i> ".getMLText('remove_marked_files')."</button></td></tr></table></form>\n"; else print "<tr><td><i class=\"fa fa-arrow-up\"></i></td><td colspan=\"2\"><button type=\"submit\" class=\"btn btn-danger\"><i class=\"fa fa-remove\"></i> ".getMLText('remove_marked_files')."</button></td></tr></table></form>\n";
} /* }}} */ } /* }}} */
function js() { /* {{{ */ function js() { /* {{{ */
@ -126,35 +126,23 @@ $(document).ready( function() {
$wentries = array_reverse($wentries); $wentries = array_reverse($wentries);
} }
?> ?>
<ul class="nav nav-tabs" id="logtab"> <ul class="nav nav-pills" id="logtab" role="tablist">
<li <?php echo ($mode == 'web') ? 'class="active"' : ''; ?>><a data-target="#web" data-toggle="tab">web</a></li> <?php $this->showPaneHeader('web', 'web', (!$mode || $mode == 'web')); ?>
<li <?php echo ($mode == 'webdav') ? 'class="active"' : ''; ?>><a data-target="#webdav" data-toggle="tab">webdav</a></li> <?php $this->showPaneHeader('webdav', 'webdav', (!$mode || $mode == 'webdav')); ?>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane <?php echo ($mode == 'web') ? 'active' : ''; ?>" id="web">
<?php <?php
$this->contentContainerStart(); $this->showStartPaneContent('web', (!$mode || $mode == 'web'));
$this->filelist($entries, 'web'); $this->filelist($entries, 'web');
$this->contentContainerEnd(); $this->showEndPaneContent('web', $mode);
?>
</div> $this->showStartPaneContent('webdav', (!$mode || $mode == 'webdav'));
<div class="tab-pane <?php echo ($mode == 'webdav') ? 'active' : ''; ?>" id="webdav">
<?php
$this->contentContainerStart();
$this->filelist($wentries, 'webdav'); $this->filelist($wentries, 'webdav');
$this->contentContainerEnd(); $this->showEndPaneContent('webdav', $mode);
?> ?>
</div> </div>
</div>
<div class="modal hide" style="width: 900px; margin-left: -450px;" id="logViewer" tabindex="-1" role="dialog" aria-labelledby="docChooserLabel" aria-hidden="true">
<div class="modal-body">
<p><?php printMLText('logfile_loading') ?></p>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php print getMLText("close"); ?></button>
</div>
</div>
<?php <?php
echo $this->getModalBox(array('id'=>'logViewer', 'title'=>getMLText('logfile'), 'buttons'=>array(array('title'=>getMLText('close')))));
$this->contentEnd(); $this->contentEnd();
$this->htmlEndPage(); $this->htmlEndPage();
} elseif(file_exists($this->logdir.$logname)){ } elseif(file_exists($this->logdir.$logname)){

View File

@ -31,12 +31,8 @@
*/ */
class SeedDMS_View_Settings extends SeedDMS_Theme_Style { 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";
} /* }}} */
protected function showStartPaneContent($name, $isactive) { /* {{{ */ protected function showStartPaneContent($name, $isactive) { /* {{{ */
echo '<div class="tab-pane'.($isactive ? ' active' : '').'" id="'.$name.'">'; self::parent($name, $isactive);
$this->contentContainerStart(); $this->contentContainerStart();
echo '<table class="table-condensed table-sm" style="table-layout: fixed;">'; echo '<table class="table-condensed table-sm" style="table-layout: fixed;">';
echo '<tr><td width="20%"></td><td width="80%"></td></tr>'; echo '<tr><td width="20%"></td><td width="80%"></td></tr>';
@ -45,7 +41,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
protected function showEndPaneContent($name, $currentab) { /* {{{ */ protected function showEndPaneContent($name, $currentab) { /* {{{ */
echo '</table>'; echo '</table>';
$this->contentContainerEnd(); $this->contentContainerEnd();
echo '</div>'; self::parent($name, $isactive);
} /* }}} */ } /* }}} */
protected function getTextField($name, $value, $type='', $placeholder='') { /* {{{ */ protected function getTextField($name, $value, $type='', $placeholder='') { /* {{{ */
@ -267,7 +263,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('site', getMLText('settings_Site'), (!$currenttab || $currenttab == 'site')); ?>
<?php $this->showPaneHeader('system', getMLText('settings_System'), ($currenttab == 'system')); ?> <?php $this->showPaneHeader('system', getMLText('settings_System'), ($currenttab == 'system')); ?>
<?php $this->showPaneHeader('advanced', getMLText('settings_Advanced'), ($currenttab == 'advanced')); ?> <?php $this->showPaneHeader('advanced', getMLText('settings_Advanced'), ($currenttab == 'advanced')); ?>

View File

@ -577,23 +577,23 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
?> ?>
<ul class="nav nav-tabs" id="docinfotab"> <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"><?php printMLText('current_version'); ?></a></li> <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) { ?> <?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 <?php
} }
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
if((is_array($reviewStatus) && count($reviewStatus)>0) || if((is_array($reviewStatus) && count($reviewStatus)>0) ||
(is_array($approvalStatus) && count($approvalStatus)>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 <?php
} }
} elseif($workflowmode == 'advanced') { } elseif($workflowmode == 'advanced') {
if($workflow) { 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 <?php
} }
} }
@ -608,19 +608,19 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
<?php <?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 == '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"><?php printMLText('linked_documents'); echo (count($links) || count($reverselinks)) ? " (".count($links)."/".count($reverselinks).")" : ""; ?></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 <?php
$tabs = $this->callHook('extraTabs', $document); $tabs = $this->callHook('extraTabs', $document);
if($tabs) { if($tabs) {
foreach($tabs as $tabid=>$tab) { 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> </ul>
<div class="tab-content"> <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 <?php
if(!$latestContent) { if(!$latestContent) {
$this->contentContainerStart(); $this->contentContainerStart();
@ -850,7 +850,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
if((is_array($reviewStatus) && count($reviewStatus)>0) || if((is_array($reviewStatus) && count($reviewStatus)>0) ||
(is_array($approvalStatus) && count($approvalStatus)>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 <?php
$this->rowStart(); $this->rowStart();
/* Just check fo an exting reviewStatus, even workflow mode is set /* Just check fo an exting reviewStatus, even workflow mode is set
@ -1100,7 +1100,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 <?php
$this->rowStart(); $this->rowStart();
if ($user_is_involved && $accessobject->check_view_access('WorkflowGraph')) if ($user_is_involved && $accessobject->check_view_access('WorkflowGraph'))
@ -1565,7 +1565,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
} }
if (count($versions)>1) { 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 <?php
$txt = $this->callHook('prePreviousVersionsTab', $versions); $txt = $this->callHook('prePreviousVersionsTab', $versions);
if(is_string($txt)) if(is_string($txt))
@ -1689,7 +1689,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
<?php <?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 <?php
if (count($files) > 0) { if (count($files) > 0) {
@ -1787,7 +1787,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
} }
?> ?>
</div> </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 <?php
if (count($links) > 0) { if (count($links) > 0) {
@ -1895,7 +1895,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
<?php <?php
if($tabs) { if($tabs) {
foreach($tabs as $tabid=>$tab) { 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 $tab['content'];
echo "</div>\n"; echo "</div>\n";
} }

View File

@ -626,6 +626,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo $content; echo $content;
} /* }}} */ } /* }}} */
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" role="tab">'.$title.'</a></li>'."\n";
} /* }}} */
protected function showStartPaneContent($name, $isactive) { /* {{{ */
echo '<div class="tab-pane'.($isactive ? ' active' : '').'" id="'.$name.'" role="tabpanel">';
} /* }}} */
protected function showEndPaneContent($name, $currentab) { /* {{{ */
echo '</div>';
} /* }}} */
private function folderNavigationBar($folder) { /* {{{ */ private function folderNavigationBar($folder) { /* {{{ */
$dms = $this->params['dms']; $dms = $this->params['dms'];
$accessobject = $this->params['accessobject']; $accessobject = $this->params['accessobject'];
@ -1285,7 +1297,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
foreach($config['attributes'] as $attrname=>$attrval) foreach($config['attributes'] as $attrname=>$attrval)
$content .= ' '.$attrname.'="'.$attrval.'"'; $content .= ' '.$attrname.'="'.$attrval.'"';
} }
$content .= ">".$config['title']."</a>\n"; $content .= ">".$config['title']."</a>\n";
return $content; return $content;
} /* }}} */ } /* }}} */
@ -1486,7 +1498,7 @@ $(document).ready(function() {
array( array(
'target' => 'docChooser'.$formid, 'target' => 'docChooser'.$formid,
'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree, 'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree,
'title' => getMLText('document') 'title' => getMLText('document').'…'
)); ));
$content .= "</div>\n"; $content .= "</div>\n";
$content .= "</div>\n"; $content .= "</div>\n";
@ -1552,7 +1564,7 @@ function folderSelected<?php echo $formid ?>(id, name) {
array( array(
'target' => 'folderChooser'.$formid, 'target' => 'folderChooser'.$formid,
'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude, 'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude,
'title' => getMLText('folder') 'title' => getMLText('folder').'…'
)); ));
} }
$content .= "</div>\n"; $content .= "</div>\n";
@ -1626,7 +1638,7 @@ $(document).ready(function() {
array( array(
'target' => 'keywordChooser', 'target' => 'keywordChooser',
'remote' => "../out/out.KeywordChooser.php?target=".$formName, 'remote' => "../out/out.KeywordChooser.php?target=".$formName,
'title' => getMLText('keywords') 'title' => getMLText('keywords').'…'
)); ));
$content .= ' $content .= '
</div> </div>
@ -1889,7 +1901,7 @@ $(document).ready(function() {
array( array(
'target' => 'dropfolderChooser', 'target' => 'dropfolderChooser',
'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders, 'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders,
'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")) 'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")).'…'
)); ));
$content .= "</div>\n"; $content .= "</div>\n";
$content .= "</div>\n"; $content .= "</div>\n";

View File

@ -34,13 +34,13 @@ body {
@media (max-width: 991px) { @media (max-width: 991px) {
body { body {
/* Margin bottom by footer height */ /* Margin bottom by footer height */
margin-bottom: 90px; margin-bottom: 110px;
} }
} }
@media (max-width: 767px) { @media (max-width: 767px) {
body { body {
/* Margin bottom by footer height */ /* Margin bottom by footer height */
margin-bottom: 110px; margin-bottom: 130px;
} }
} }
.footer { .footer {