mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
use sam layout as for managing categories
This commit is contained in:
parent
e490c1a0f2
commit
34e934fb8f
|
@ -117,6 +117,23 @@ $(document).ready( function() {
|
|||
<?php
|
||||
} /* }}} */
|
||||
|
||||
function actionmenu() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$selcategoryid = $this->params['selcategoryid'];
|
||||
|
||||
if($selcategoryid && $selcategoryid > 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="action" value="removecategory">
|
||||
<button class="btn" type="submit"><i class="icon-remove"></i> <?php echo getMLText("rm_default_keyword_category")?></button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function form() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
@ -129,30 +146,27 @@ $(document).ready( function() {
|
|||
if(!$category) {
|
||||
?>
|
||||
|
||||
<form class="form-inline" action="../op/op.DefaultKeywords.php" method="post" id="form">
|
||||
<form class="form-horizontal" action="../op/op.DefaultKeywords.php" method="post" id="form">
|
||||
<?php echo createHiddenFieldWithKey('addcategory'); ?>
|
||||
<input type="hidden" name="action" value="addcategory">
|
||||
<?php printMLText("name");?>: <input type="text" class="name" name="name">
|
||||
<input type="submit" class="btn" value="<?php printMLText("new_default_keyword_category"); ?>">
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText("name"),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'text',
|
||||
'name'=>'name',
|
||||
'value'=>''
|
||||
)
|
||||
);
|
||||
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('new_default_keyword_category'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
$owner = $category->getOwner();
|
||||
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return;
|
||||
?>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<form action="../op/op.DefaultKeywords.php" method="post">
|
||||
<?php echo createHiddenFieldWithKey('removecategory'); ?>
|
||||
<input type="Hidden" name="action" value="removecategory">
|
||||
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
|
||||
<button type="submit" class="btn" title="<?php echo getMLText("delete")?>"><i class="icon-remove"></i> <?php printMLText("rm_default_keyword_category");?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label"><?php echo getMLText("name")?>:</label>
|
||||
<div class="controls">
|
||||
|
@ -229,14 +243,10 @@ $(document).ready( function() {
|
|||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
|
||||
<div class="controls">
|
||||
<select id="selector" class="input-xlarge">
|
||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
||||
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
|
||||
<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;
|
||||
|
@ -252,10 +262,8 @@ $(document).ready( function() {
|
|||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php $this->contentContainerEnd(); ?>
|
||||
<div class="ajax" style="margin-bottom: 15px;" data-view="DefaultKeywords" data-action="actionmenu" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
|
||||
</div>
|
||||
|
||||
<div class="span8">
|
||||
|
|
Loading…
Reference in New Issue
Block a user