mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
f4097c6831
|
@ -255,6 +255,8 @@
|
|||
Changes in version 5.1.31
|
||||
--------------------------------------------------------------------------------
|
||||
- rest api returns error msg and not just http status
|
||||
- comment of document, documentcontent and folder can be rendered as
|
||||
markdown
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.30
|
||||
|
|
|
@ -326,6 +326,8 @@ class Settings { /* {{{ */
|
|||
var $_maxItemsPerPage = 0;
|
||||
// number of documents/folders fetched when scrolling to bottom of ViewFolder page
|
||||
var $_incItemsPerPage = 0;
|
||||
// parse comments of folders and documents as markdown
|
||||
var $_markdownComments = false;
|
||||
// Show form to submit missing translations at end of page
|
||||
var $_showMissingTranslations = false;
|
||||
// Extra Path to additional software, will be added to include path
|
||||
|
@ -546,6 +548,7 @@ class Settings { /* {{{ */
|
|||
$this->_maxItemsPerPage = intval($tab["maxItemsPerPage"]);
|
||||
if(isset($tab["incItemsPerPage"]))
|
||||
$this->_incItemsPerPage = intval($tab["incItemsPerPage"]);
|
||||
$this->_markdownComments = Settings::boolVal($tab["markdownComments"]);
|
||||
|
||||
// XML Path: /configuration/site/edition
|
||||
$node = $xml->xpath('/configuration/site/edition');
|
||||
|
@ -948,6 +951,7 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "convertToPdf", $this->_convertToPdf);
|
||||
$this->setXMLAttributValue($node, "maxItemsPerPage", $this->_maxItemsPerPage);
|
||||
$this->setXMLAttributValue($node, "incItemsPerPage", $this->_incItemsPerPage);
|
||||
$this->setXMLAttributValue($node, "markdownComments", $this->_markdownComments);
|
||||
|
||||
// XML Path: /configuration/site/edition
|
||||
$node = $this->getXMLNode($xml, '/configuration/site', 'edition');
|
||||
|
|
|
@ -115,6 +115,7 @@ if ($action == "saveSettings")
|
|||
setBoolValue('convertToPdf');
|
||||
setIntValue('maxItemsPerPage');
|
||||
setIntValue('incItemsPerPage');
|
||||
setBoolValue('markdownComments');
|
||||
|
||||
// SETTINGS - SITE - EDITION
|
||||
setBoolValue('strictFormCheck');
|
||||
|
|
|
@ -100,7 +100,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
echo '<base href="'.$this->baseurl.'">'."\n";
|
||||
$sitename = trim(strip_tags($this->params['sitename']));
|
||||
if($this->params['session'])
|
||||
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "SeedDMS").'"/>'."\n";
|
||||
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "").'"/>'."\n";
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/css/bootstrap.css" rel="stylesheet"/>'."\n";
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"/>'."\n";
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>'."\n";
|
||||
|
@ -301,7 +301,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo " <div class=\"navbar-inner\">\n";
|
||||
echo " <div class=\"container-fluid\">\n";
|
||||
echo " <a href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'"/>' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg"/>')."</a>";
|
||||
echo " <a class=\"brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
|
||||
echo " <a class=\"brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "")."</a>\n";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo "</div>\n";
|
||||
|
@ -392,7 +392,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo " <span class=\"fa fa-sign-out\"></span>\n";
|
||||
echo " </a>\n";
|
||||
echo " <a href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'">' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg">')."</a>";
|
||||
echo " <a class=\"brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
||||
echo " <a class=\"brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "")."</span></a>\n";
|
||||
|
||||
/* user profile menu {{{ */
|
||||
if(isset($this->params['session']) && isset($this->params['user']) && $this->params['user']) {
|
||||
|
|
|
@ -345,6 +345,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
<?php $this->showConfigCheckbox('settings_convertToPdf', 'convertToPdf'); ?>
|
||||
<?php $this->showConfigText('settings_maxItemsPerPage', 'maxItemsPerPage'); ?>
|
||||
<?php $this->showConfigText('settings_incItemsPerPage', 'incItemsPerPage'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_markdownComments', 'markdownComments'); ?>
|
||||
|
||||
<!--
|
||||
-- SETTINGS - SITE - EDITION
|
||||
|
|
|
@ -396,6 +396,7 @@ $(document).ready( function() {
|
|||
function documentInfos() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$settings = $this->params['settings'];
|
||||
$document = $this->params['document'];
|
||||
$checkoutdir = $this->params['checkOutDir'];
|
||||
|
||||
|
@ -452,10 +453,16 @@ $(document).ready( function() {
|
|||
</tr>
|
||||
<?php
|
||||
if($document->getComment()) {
|
||||
if($settings->_markdownComments) {
|
||||
$Parsedown = new Parsedown();
|
||||
$comment = $Parsedown->text($document->getComment());
|
||||
} else {
|
||||
$comment = htmlspecialchars($document->getComment());
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php printMLText("comment");?>:</td>
|
||||
<td><?php print htmlspecialchars($document->getComment());?></td>
|
||||
<td><div class="document-comment"><?php print $comment;?></div></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -801,7 +808,14 @@ $(document).ready( function() {
|
|||
echo $txt;
|
||||
} else {
|
||||
if($latestContent->getComment())
|
||||
print "<p style=\"font-style: italic;\">".htmlspecialchars($latestContent->getComment())."</p>";
|
||||
if($settings->_markdownComments) {
|
||||
$Parsedown = new Parsedown();
|
||||
$comment = $Parsedown->text($latestContent->getComment());
|
||||
print "<div class=\"content-comment\">".$comment."</div>";
|
||||
} else {
|
||||
$comment = htmlspecialchars($latestContent->getComment());
|
||||
print "<p style=\"font-style: italic;\">".$comment."</p>";
|
||||
}
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">\n";
|
||||
$this->printVersionAttributes($folder, $latestContent);
|
||||
|
|
|
@ -248,6 +248,7 @@ $('body').on('click', '.order-btn', function(ev) {
|
|||
function folderInfos() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$settings = $this->params['settings'];
|
||||
$folder = $this->params['folder'];
|
||||
|
||||
$txt = $this->callHook('folderInfos', $folder);
|
||||
|
@ -275,9 +276,15 @@ $('body').on('click', '.order-btn', function(ev) {
|
|||
echo "<td>".getLongReadableDate($folder->getDate())."</td>";
|
||||
echo "</tr>";
|
||||
if($folder->getComment()) {
|
||||
if($settings->_markdownComments) {
|
||||
$Parsedown = new Parsedown();
|
||||
$comment = $Parsedown->text($folder->getComment());
|
||||
} else {
|
||||
$comment = htmlspecialchars($folder->getComment());
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td>".getMLText("comment").":</td>\n";
|
||||
echo "<td>".htmlspecialchars($folder->getComment())."</td>\n";
|
||||
echo "<td><div class=\"folder-comment\">".$content."</div></td>\n";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
echo '<base href="'.$this->baseurl.'">'."\n";
|
||||
$sitename = trim(strip_tags($this->params['sitename']));
|
||||
if($this->params['session'])
|
||||
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "SeedDMS").'"/>'."\n";
|
||||
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "").'"/>'."\n";
|
||||
$parenttheme = 'bootstrap';
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/seeddms.css" rel="stylesheet"/>'."\n";
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>'."\n";
|
||||
|
@ -314,7 +314,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
function globalBanner() { /* {{{ */
|
||||
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark fixed-top\">\n";
|
||||
echo " <a class=\"navbar-brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'"/>' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg"/>')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
||||
echo " <a class=\"navbar-brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'"/>' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg"/>')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "")."</span></a>\n";
|
||||
echo "</nav>\n";
|
||||
} /* }}} */
|
||||
|
||||
|
@ -322,7 +322,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$dms = $this->params['dms'];
|
||||
$accessobject = $this->params['accessobject'];
|
||||
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark border-bottom fixed-top\">\n";
|
||||
echo " <a class=\"navbar-brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'">' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
||||
echo " <a class=\"navbar-brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'">' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "")."</span></a>\n";
|
||||
|
||||
if(isset($this->params['user']) && $this->params['user']) {
|
||||
/* search form {{{ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user