mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +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']))
|
||||
$selcategoryid = $_GET['categoryid'];
|
||||
$selcategory = $dms->getKeywordCategory($_GET['categoryid']);
|
||||
else
|
||||
$selcategoryid = 0;
|
||||
$selcategory = null;
|
||||
|
||||
$categories = $dms->getAllUserKeywordCategories($user->getID());
|
||||
|
||||
if($view) {
|
||||
$view->setParam('categories', $categories);
|
||||
$view->setParam('selcategoryid', $selcategoryid);
|
||||
$view->setParam('selcategory', $selcategory);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
|
|
|
@ -323,8 +323,6 @@ $(document).ready( function() {
|
|||
$selattrdef = $this->params['selattrdef'];
|
||||
$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->globalNavigation();
|
||||
$this->contentStart();
|
||||
|
@ -334,7 +332,7 @@ $(document).ready( function() {
|
|||
$this->columnStart(6);
|
||||
?>
|
||||
<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="0"><?php echo getMLText("new_attrdef")?></option>
|
||||
<?php
|
||||
|
|
|
@ -1223,6 +1223,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
(!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : '').
|
||||
(!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '')."</textarea>";
|
||||
break;
|
||||
case 'plain':
|
||||
echo $value['value'];
|
||||
break;
|
||||
case 'input':
|
||||
default:
|
||||
switch($value['type']) {
|
||||
|
|
|
@ -64,7 +64,7 @@ $(document).ready( function() {
|
|||
if($selcat) {
|
||||
$this->contentHeading(getMLText("category_info"));
|
||||
$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 "</table>";
|
||||
|
||||
|
@ -145,8 +145,6 @@ $(document).ready( function() {
|
|||
$categories = $this->params['categories'];
|
||||
$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->globalNavigation();
|
||||
$this->contentStart();
|
||||
|
@ -157,15 +155,24 @@ $(document).ready( function() {
|
|||
$this->columnStart(6);
|
||||
?>
|
||||
<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
|
||||
foreach ($categories as $category) {
|
||||
print "<option value=\"".$category->getID()."\" ".($selcat && $category->getID()==$selcat->getID() ? 'selected' : '').">" . htmlspecialchars($category->getName());
|
||||
}
|
||||
$options = array();
|
||||
$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>
|
||||
<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>
|
||||
|
|
|
@ -120,13 +120,13 @@ $(document).ready( function() {
|
|||
function actionmenu() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$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" >
|
||||
<?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">
|
||||
<button class="btn btn-danger" type="submit"><i class="fa fa-remove"></i> <?php echo getMLText("rm_default_keyword_category")?></button>
|
||||
</form>
|
||||
|
@ -137,7 +137,7 @@ $(document).ready( function() {
|
|||
function form() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$category = $dms->getKeywordCategory($this->params['selcategoryid']);
|
||||
$category = $this->params['selcategory'];
|
||||
|
||||
$this->showKeywordForm($category, $user);
|
||||
} /* }}} */
|
||||
|
@ -240,7 +240,7 @@ $(document).ready( function() {
|
|||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$categories = $this->params['categories'];
|
||||
$selcategoryid = $this->params['selcategoryid'];
|
||||
$selcategory = $this->params['selcategory'];
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
|
@ -252,31 +252,33 @@ $(document).ready( function() {
|
|||
$this->columnStart(4);
|
||||
?>
|
||||
<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
|
||||
|
||||
$selected=0;
|
||||
$count=2;
|
||||
$options = array();
|
||||
$options[] = array("-1", getMLText("choose_category"));
|
||||
$options[] = array("0", getMLText("new_default_keyword_category"));
|
||||
foreach ($categories as $category) {
|
||||
|
||||
$owner = $category->getOwner();
|
||||
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue;
|
||||
|
||||
if ($selcategoryid && $category->getID()==$selcategoryid) $selected=$count;
|
||||
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
|
||||
$count++;
|
||||
if ($user->isAdmin() || ($owner->getID() == $user->getID()))
|
||||
$options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcategory && $category->getID()==$selcategory->getID());
|
||||
}
|
||||
$this->formField(
|
||||
null, //getMLText("selection"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'selector',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options,
|
||||
'placeholder'=>getMLText('choose_category'),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</select>
|
||||
</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
|
||||
$this->columnEnd();
|
||||
$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>
|
||||
<?php
|
||||
$this->columnEnd();
|
||||
|
|
|
@ -115,99 +115,90 @@ myTA.focus();
|
|||
<div>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="inputDescription"><?php echo getMLText("keywords")?>:</td>
|
||||
<td><textarea id="keywordta" rows="5" cols="30"></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<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
|
||||
$this->formField(
|
||||
getMLText("keywords"),
|
||||
array(
|
||||
'element'=>'textarea',
|
||||
'id'=>'keywordta',
|
||||
'rows'=>4,
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
$options[] = array('-1', getMLText('choose_category'));
|
||||
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 class="standardText">
|
||||
<?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>";
|
||||
if($owner->isAdmin())
|
||||
$options[] = array(''.$category->getID(), htmlspecialchars($category->getName()));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("global_default_keywords"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'categories0',
|
||||
'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>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
echo '<div id="keywords'.$category->getId().'" style="display: none;">';
|
||||
$this->formField(
|
||||
getMLText("default_keywords"),
|
||||
array(
|
||||
'element'=>'plain',
|
||||
'name'=>'categories0',
|
||||
'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();
|
||||
echo '<script src="../out/out.KeywordChooser.php?action=js&'.$_SERVER['QUERY_STRING'].'"></script>'."\n";
|
||||
// $this->htmlEndPage();
|
||||
|
|
|
@ -1121,6 +1121,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
(!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : '').
|
||||
(!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '')."</textarea>";
|
||||
break;
|
||||
case 'plain':
|
||||
echo $value['value'];
|
||||
break;
|
||||
case 'input':
|
||||
default:
|
||||
switch($value['type']) {
|
||||
|
@ -3601,8 +3604,8 @@ $("body").on("click", "span.openpopupbox", function(e) {
|
|||
$id = substr(md5(uniqid()), 0, 4);
|
||||
?>
|
||||
<div class="accordion" id="accordion<?php echo $id; ?>">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" href="#collapse<?php echo $id; ?>">
|
||||
<?php echo $title; ?>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue
Block a user