mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 14:41:39 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
0acfb9a265
|
@ -37,15 +37,15 @@ if (!$accessop->check_view_access($view, $_GET)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['categoryid']))
|
if(isset($_GET['categoryid']))
|
||||||
$selcategoryid = $_GET['categoryid'];
|
$selcategory = $dms->getKeywordCategory($_GET['categoryid']);
|
||||||
else
|
else
|
||||||
$selcategoryid = 0;
|
$selcategory = null;
|
||||||
|
|
||||||
$categories = $dms->getAllUserKeywordCategories($user->getID());
|
$categories = $dms->getAllUserKeywordCategories($user->getID());
|
||||||
|
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('categories', $categories);
|
$view->setParam('categories', $categories);
|
||||||
$view->setParam('selcategoryid', $selcategoryid);
|
$view->setParam('selcategory', $selcategory);
|
||||||
$view->setParam('accessobject', $accessop);
|
$view->setParam('accessobject', $accessop);
|
||||||
$view($_GET);
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -323,8 +323,6 @@ $(document).ready( function() {
|
||||||
$selattrdef = $this->params['selattrdef'];
|
$selattrdef = $this->params['selattrdef'];
|
||||||
$accessop = $this->params['accessobject'];
|
$accessop = $this->params['accessobject'];
|
||||||
|
|
||||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
$this->contentStart();
|
$this->contentStart();
|
||||||
|
@ -334,7 +332,7 @@ $(document).ready( function() {
|
||||||
$this->columnStart(6);
|
$this->columnStart(6);
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
<select class="chzn-select" id="selector" class="input-xlarge">
|
<select class="form-control chzn-select" id="selector" class="input-xlarge">
|
||||||
<option value="-1"><?php echo getMLText("choose_attrdef")?></option>
|
<option value="-1"><?php echo getMLText("choose_attrdef")?></option>
|
||||||
<option value="0"><?php echo getMLText("new_attrdef")?></option>
|
<option value="0"><?php echo getMLText("new_attrdef")?></option>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1223,6 +1223,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
(!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : '').
|
(!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : '').
|
||||||
(!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '')."</textarea>";
|
(!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '')."</textarea>";
|
||||||
break;
|
break;
|
||||||
|
case 'plain':
|
||||||
|
echo $value['value'];
|
||||||
|
break;
|
||||||
case 'input':
|
case 'input':
|
||||||
default:
|
default:
|
||||||
switch($value['type']) {
|
switch($value['type']) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ $(document).ready( function() {
|
||||||
if($selcat) {
|
if($selcat) {
|
||||||
$this->contentHeading(getMLText("category_info"));
|
$this->contentHeading(getMLText("category_info"));
|
||||||
$c = $selcat->countDocumentsByCategory();
|
$c = $selcat->countDocumentsByCategory();
|
||||||
echo "<table class=\"table table-condensed\">\n";
|
echo "<table class=\"table table-condensed table-sm\">\n";
|
||||||
echo "<tr><td>".getMLText('document_count')."</td><td>".($c)."</td></tr>\n";
|
echo "<tr><td>".getMLText('document_count')."</td><td>".($c)."</td></tr>\n";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
|
@ -145,8 +145,6 @@ $(document).ready( function() {
|
||||||
$categories = $this->params['categories'];
|
$categories = $this->params['categories'];
|
||||||
$selcat = $this->params['selcategory'];
|
$selcat = $this->params['selcategory'];
|
||||||
|
|
||||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
$this->contentStart();
|
$this->contentStart();
|
||||||
|
@ -157,15 +155,24 @@ $(document).ready( function() {
|
||||||
$this->columnStart(6);
|
$this->columnStart(6);
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
<select class="chzn-select" id="selector" class="input-xlarge">
|
|
||||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
|
||||||
<option value="0"><?php echo getMLText("new_document_category")?>
|
|
||||||
<?php
|
<?php
|
||||||
foreach ($categories as $category) {
|
$options = array();
|
||||||
print "<option value=\"".$category->getID()."\" ".($selcat && $category->getID()==$selcat->getID() ? 'selected' : '').">" . htmlspecialchars($category->getName());
|
$options[] = array("-1", getMLText("choose_category"));
|
||||||
}
|
$options[] = array("0", getMLText("new_document_category"));
|
||||||
|
foreach ($categories as $category) {
|
||||||
|
$options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID());
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
null, //getMLText("selection"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'id'=>'selector',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'options'=>$options,
|
||||||
|
'placeholder'=>getMLText('choose_category'),
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
</select>
|
|
||||||
</form>
|
</form>
|
||||||
<div class="ajax" style="margin-bottom: 15px;" data-view="Categories" data-action="actionmenu" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
|
<div class="ajax" style="margin-bottom: 15px;" data-view="Categories" data-action="actionmenu" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
|
||||||
<div class="ajax" data-view="Categories" data-action="info" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
|
<div class="ajax" data-view="Categories" data-action="info" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
|
||||||
|
|
|
@ -120,13 +120,13 @@ $(document).ready( function() {
|
||||||
function actionmenu() { /* {{{ */
|
function actionmenu() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$selcategoryid = $this->params['selcategoryid'];
|
$selcategory = $this->params['selcategory'];
|
||||||
|
|
||||||
if($selcategoryid && $selcategoryid > 0) {
|
if($selcategory && $selcategory->getId() > 0) {
|
||||||
?>
|
?>
|
||||||
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
|
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
|
||||||
<?php echo createHiddenFieldWithKey('removecategory'); ?>
|
<?php echo createHiddenFieldWithKey('removecategory'); ?>
|
||||||
<input type="hidden" name="categoryid" value="<?php echo $selcategoryid?>">
|
<input type="hidden" name="categoryid" value="<?php echo $selcategory->getId(); ?>">
|
||||||
<input type="hidden" name="action" value="removecategory">
|
<input type="hidden" name="action" value="removecategory">
|
||||||
<button class="btn btn-danger" type="submit"><i class="fa fa-remove"></i> <?php echo getMLText("rm_default_keyword_category")?></button>
|
<button class="btn btn-danger" type="submit"><i class="fa fa-remove"></i> <?php echo getMLText("rm_default_keyword_category")?></button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -137,7 +137,7 @@ $(document).ready( function() {
|
||||||
function form() { /* {{{ */
|
function form() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$category = $dms->getKeywordCategory($this->params['selcategoryid']);
|
$category = $this->params['selcategory'];
|
||||||
|
|
||||||
$this->showKeywordForm($category, $user);
|
$this->showKeywordForm($category, $user);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -240,7 +240,7 @@ $(document).ready( function() {
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$categories = $this->params['categories'];
|
$categories = $this->params['categories'];
|
||||||
$selcategoryid = $this->params['selcategoryid'];
|
$selcategory = $this->params['selcategory'];
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
|
@ -252,31 +252,33 @@ $(document).ready( function() {
|
||||||
$this->columnStart(4);
|
$this->columnStart(4);
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
<select class="chzn-select" id="selector" class="input-xlarge">
|
|
||||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
|
||||||
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
|
|
||||||
<?php
|
<?php
|
||||||
|
$options = array();
|
||||||
$selected=0;
|
$options[] = array("-1", getMLText("choose_category"));
|
||||||
$count=2;
|
$options[] = array("0", getMLText("new_default_keyword_category"));
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
|
|
||||||
$owner = $category->getOwner();
|
$owner = $category->getOwner();
|
||||||
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue;
|
if ($user->isAdmin() || ($owner->getID() == $user->getID()))
|
||||||
|
$options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcategory && $category->getID()==$selcategory->getID());
|
||||||
if ($selcategoryid && $category->getID()==$selcategoryid) $selected=$count;
|
|
||||||
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
|
|
||||||
$count++;
|
|
||||||
}
|
}
|
||||||
|
$this->formField(
|
||||||
|
null, //getMLText("selection"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'id'=>'selector',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'options'=>$options,
|
||||||
|
'placeholder'=>getMLText('choose_category'),
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
</select>
|
|
||||||
</form>
|
</form>
|
||||||
<div class="ajax" style="margin-bottom: 15px;" data-view="DefaultKeywords" data-action="actionmenu" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
|
<div class="ajax" style="margin-bottom: 15px;" data-view="DefaultKeywords" data-action="actionmenu" <?php echo ($selcategory ? "data-query=\"categoryid=".$selcategory->getId()."\"" : "") ?>></div>
|
||||||
<?php
|
<?php
|
||||||
$this->columnEnd();
|
$this->columnEnd();
|
||||||
$this->columnStart(8);
|
$this->columnStart(8);
|
||||||
?>
|
?>
|
||||||
<div class="ajax" data-view="DefaultKeywords" data-action="form" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
|
<div class="ajax" data-view="DefaultKeywords" data-action="form" <?php echo ($selcategory ? "data-query=\"categoryid=".$selcategory->getId()."\"" : "") ?>></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$this->columnEnd();
|
$this->columnEnd();
|
||||||
|
|
|
@ -115,99 +115,90 @@ myTA.focus();
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
?>
|
$this->formField(
|
||||||
|
getMLText("keywords"),
|
||||||
<table>
|
array(
|
||||||
|
'element'=>'textarea',
|
||||||
<tr>
|
'id'=>'keywordta',
|
||||||
<td valign="top" class="inputDescription"><?php echo getMLText("keywords")?>:</td>
|
'rows'=>4,
|
||||||
<td><textarea id="keywordta" rows="5" cols="30"></textarea></td>
|
)
|
||||||
</tr>
|
);
|
||||||
|
$options = array();
|
||||||
<tr>
|
$options[] = array('-1', getMLText('choose_category'));
|
||||||
<td class="inputDescription"><?php echo getMLText("global_default_keywords")?>:</td>
|
|
||||||
<td>
|
|
||||||
<select _onchange="showKeywords(0)" id="categories0">
|
|
||||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
|
||||||
<?php
|
|
||||||
foreach ($categories as $category) {
|
|
||||||
$owner = $category->getOwner();
|
|
||||||
if (!$owner->isAdmin())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
foreach ($categories as $category) {
|
|
||||||
$owner = $category->getOwner();
|
|
||||||
if (!$owner->isAdmin())
|
|
||||||
continue;
|
|
||||||
?>
|
|
||||||
<tr id="keywords<?php echo $category->getID()?>" style="display : none;">
|
|
||||||
<td valign="top" class="inputDescription"><?php echo getMLText("default_keywords")?>:</td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
$lists = $category->getKeywordLists();
|
|
||||||
|
|
||||||
if (count($lists) == 0) print getMLText("no_default_keywords");
|
|
||||||
else {
|
|
||||||
print "<ul>";
|
|
||||||
foreach ($lists as $list) {
|
|
||||||
print "<li><a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\">".htmlspecialchars($list["keywords"])."</a></li>";
|
|
||||||
}
|
|
||||||
print "</ul>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
<tr>
|
|
||||||
<td class="inputDescription"><?php echo getMLText("personal_default_keywords")?>:</td>
|
|
||||||
<td>
|
|
||||||
<select _onchange="showKeywords(1)" id="categories1">
|
|
||||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
|
||||||
<?php
|
|
||||||
foreach ($categories as $category) {
|
|
||||||
$owner = $category->getOwner();
|
|
||||||
if ($owner->isAdmin())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
$owner = $category->getOwner();
|
$owner = $category->getOwner();
|
||||||
if ($owner->isAdmin())
|
if($owner->isAdmin())
|
||||||
continue;
|
$options[] = array(''.$category->getID(), htmlspecialchars($category->getName()));
|
||||||
?>
|
}
|
||||||
<tr id="keywords<?php echo $category->getID()?>" style="display : none;">
|
$this->formField(
|
||||||
<td valign="top" class="inputDescription"><?php echo getMLText("default_keywords")?>:</td>
|
getMLText("global_default_keywords"),
|
||||||
<td class="standardText">
|
array(
|
||||||
<?php
|
'element'=>'select',
|
||||||
$lists = $category->getKeywordLists();
|
'id'=>'categories0',
|
||||||
if (count($lists) == 0) print getMLText("no_default_keywords");
|
'options'=>$options,
|
||||||
else {
|
)
|
||||||
print "<ul>";
|
);
|
||||||
foreach ($lists as $list) {
|
foreach ($categories as $category) {
|
||||||
print "<li><a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\">".htmlspecialchars($list["keywords"])."</a></li>";
|
$owner = $category->getOwner();
|
||||||
}
|
if($owner->isAdmin()) {
|
||||||
print "</ul>";
|
$lists = $category->getKeywordLists();
|
||||||
|
if(count($lists) == 0) print getMLText("no_default_keywords");
|
||||||
|
else {
|
||||||
|
$kw = array();
|
||||||
|
foreach ($lists as $list) {
|
||||||
|
$kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>";
|
||||||
}
|
}
|
||||||
?>
|
echo '<div id="keywords'.$category->getId().'" style="display: none;">';
|
||||||
</td>
|
$this->formField(
|
||||||
</tr>
|
getMLText("default_keywords"),
|
||||||
<?php } ?>
|
array(
|
||||||
</table>
|
'element'=>'plain',
|
||||||
|
'name'=>'categories0',
|
||||||
<?php
|
'value'=>implode(' ', $kw),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$options = array();
|
||||||
|
$options[] = array('-1', getMLText('choose_category'));
|
||||||
|
foreach ($categories as $category) {
|
||||||
|
$owner = $category->getOwner();
|
||||||
|
if(!$owner->isAdmin())
|
||||||
|
$options[] = array(''.$category->getID(), htmlspecialchars($category->getName()));
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
getMLText("personal_default_keywords"),
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'id'=>'categories1',
|
||||||
|
'options'=>$options,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
foreach ($categories as $category) {
|
||||||
|
$owner = $category->getOwner();
|
||||||
|
if(!$owner->isAdmin()) {
|
||||||
|
$lists = $category->getKeywordLists();
|
||||||
|
if(count($lists) == 0) print getMLText("no_default_keywords");
|
||||||
|
else {
|
||||||
|
$kw = array();
|
||||||
|
foreach ($lists as $list) {
|
||||||
|
$kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>";
|
||||||
|
}
|
||||||
|
echo '<div id="keywords'.$category->getId().'" style="display: none;">';
|
||||||
|
$this->formField(
|
||||||
|
getMLText("default_keywords"),
|
||||||
|
array(
|
||||||
|
'element'=>'plain',
|
||||||
|
'name'=>'categories0',
|
||||||
|
'value'=>implode(', ', $kw),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
echo '<script src="../out/out.KeywordChooser.php?action=js&'.$_SERVER['QUERY_STRING'].'"></script>'."\n";
|
echo '<script src="../out/out.KeywordChooser.php?action=js&'.$_SERVER['QUERY_STRING'].'"></script>'."\n";
|
||||||
// $this->htmlEndPage();
|
// $this->htmlEndPage();
|
||||||
|
|
|
@ -1121,6 +1121,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
(!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : '').
|
(!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : '').
|
||||||
(!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '')."</textarea>";
|
(!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '')."</textarea>";
|
||||||
break;
|
break;
|
||||||
|
case 'plain':
|
||||||
|
echo $value['value'];
|
||||||
|
break;
|
||||||
case 'input':
|
case 'input':
|
||||||
default:
|
default:
|
||||||
switch($value['type']) {
|
switch($value['type']) {
|
||||||
|
@ -3601,8 +3604,8 @@ $("body").on("click", "span.openpopupbox", function(e) {
|
||||||
$id = substr(md5(uniqid()), 0, 4);
|
$id = substr(md5(uniqid()), 0, 4);
|
||||||
?>
|
?>
|
||||||
<div class="accordion" id="accordion<?php echo $id; ?>">
|
<div class="accordion" id="accordion<?php echo $id; ?>">
|
||||||
<div class="accordion-group">
|
<div class="card">
|
||||||
<div class="accordion-heading">
|
<div class="card-header">
|
||||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" href="#collapse<?php echo $id; ?>">
|
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" href="#collapse<?php echo $id; ?>">
|
||||||
<?php echo $title; ?>
|
<?php echo $title; ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user