mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
use layout like categories, attributes
This commit is contained in:
parent
a52a46bf46
commit
8aa750c035
|
@ -46,9 +46,12 @@ if (!is_object($workflow)) {
|
|||
}
|
||||
|
||||
if($workflow->remove()) {
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_workflow')));
|
||||
} else {
|
||||
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('error_rm_workflow')));
|
||||
}
|
||||
|
||||
add_log_line("");
|
||||
add_log_line("?workflowid=".$_POST["workflowid"]);
|
||||
|
||||
header("Location:../out/out.WorkflowMgr.php");
|
||||
?>
|
||||
|
|
|
@ -32,23 +32,26 @@ if (!$user->isAdmin()) {
|
|||
}
|
||||
|
||||
/* Check if the form data comes from a trusted request */
|
||||
if(!checkFormKey('removeworkflowaction')) {
|
||||
if(!checkFormKey('removeworkflowaction', 'GET')) {
|
||||
UI::exitError(getMLText("workflow_editor"), getMLText("invalid_request_token"));
|
||||
}
|
||||
|
||||
if (!isset($_POST["workflowactionid"]) || !is_numeric($_POST["workflowactionid"]) || intval($_POST["workflowactionid"])<1) {
|
||||
if (!isset($_GET["workflowactionid"]) || !is_numeric($_GET["workflowactionid"]) || intval($_GET["workflowactionid"])<1) {
|
||||
UI::exitError(getMLText("workflow_editor"), getMLText("invalid_version"));
|
||||
}
|
||||
|
||||
$workflowaction = $dms->getWorkflowAction($_POST["workflowactionid"]);
|
||||
$workflowaction = $dms->getWorkflowAction($_GET["workflowactionid"]);
|
||||
if (!is_object($workflowaction)) {
|
||||
UI::exitError(getMLText("workflow_editor"), getMLText("invalid_workflow_action"));
|
||||
}
|
||||
|
||||
if($workflowaction->remove()) {
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_workflow_action')));
|
||||
} else {
|
||||
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('error_rm_workflow_action')));
|
||||
}
|
||||
|
||||
add_log_line("?workflowactionid=".$_POST["workflowactionid"]);
|
||||
add_log_line("?workflowactionid=".$_GET["workflowactionid"]);
|
||||
|
||||
header("Location:../out/out.WorkflowActionsMgr.php");
|
||||
?>
|
||||
|
|
|
@ -32,23 +32,25 @@ if (!$user->isAdmin()) {
|
|||
}
|
||||
|
||||
/* Check if the form data comes from a trusted request */
|
||||
if(!checkFormKey('removeworkflowstate')) {
|
||||
if(!checkFormKey('removeworkflowstate', 'GET')) {
|
||||
UI::exitError(getMLText("workflow_editor"), getMLText("invalid_request_token"));
|
||||
}
|
||||
|
||||
if (!isset($_POST["workflowstateid"]) || !is_numeric($_POST["workflowstateid"]) || intval($_POST["workflowstateid"])<1) {
|
||||
if (!isset($_GET["workflowstateid"]) || !is_numeric($_GET["workflowstateid"]) || intval($_GET["workflowstateid"])<1) {
|
||||
UI::exitError(getMLText("workflow_editor"), getMLText("invalid_version"));
|
||||
}
|
||||
|
||||
$workflowstate = $dms->getWorkflowState($_POST["workflowstateid"]);
|
||||
$workflowstate = $dms->getWorkflowState($_GET["workflowstateid"]);
|
||||
if (!is_object($workflowstate)) {
|
||||
UI::exitError(getMLText("workflow_editor"), getMLText("invalid_workflow_state"));
|
||||
}
|
||||
|
||||
if($workflowstate->remove()) {
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_workflow_state')));
|
||||
} else {
|
||||
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('error_rm_workflow_state')));
|
||||
}
|
||||
|
||||
add_log_line("?workflowstateid=".$_POST["workflowstateid"]);
|
||||
add_log_line("?workflowstateid=".$_GET["workflowstateid"]);
|
||||
|
||||
header("Location:../out/out.WorkflowStatesMgr.php");
|
||||
?>
|
||||
|
|
|
@ -100,18 +100,34 @@ $(document).ready( function() {
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
function actionmenu() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$selworkflowaction = $this->params['selworkflowaction'];
|
||||
|
||||
if($selworkflowaction && !$selworkflowaction->isUsed()) {
|
||||
?>
|
||||
<div class="btn-group">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo getMLText('action'); ?>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
if(!$selworkflowaction->isUsed()) {
|
||||
echo '<li><a href="../op/op.RemoveWorkflowAction.php?workflowactionid='.$selworkflowaction->getID().'&formtoken='.createFormKey('removeworkflowaction').'"><i class="icon-remove"></i> '.getMLText("rm_workflow_action").'</a><li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function showWorkflowActionForm($action) { /* {{{ */
|
||||
if($action) {
|
||||
if($action->isUsed()) {
|
||||
$this->infoMsg(getMLText('workflow_action_in_use'));
|
||||
} else {
|
||||
?>
|
||||
<form class="form-inline" action="../op/op.RemoveWorkflowAction.php" method="post">
|
||||
<?php echo createHiddenFieldWithKey('removeworkflowaction'); ?>
|
||||
<input type="hidden" name="workflowactionid" value="<?php print $action->getID();?>">
|
||||
<button type="submit" class="btn"><i class="icon-remove"></i> <?php printMLText("rm_workflow_action");?></button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -169,8 +185,7 @@ $(document).ready( function() {
|
|||
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
<form class="form-horizontal">
|
||||
<form class="form-horizontal">
|
||||
<?php
|
||||
$options = array();
|
||||
$options[] = array('-1', getMLText("choose_workflow_action"));
|
||||
|
@ -179,16 +194,17 @@ $(document).ready( function() {
|
|||
$options[] = array($currWorkflowAction->getID(), htmlspecialchars($currWorkflowAction->getName()), $selworkflowaction && $currWorkflowAction->getID()==$selworkflowaction->getID());
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("selection"),
|
||||
null, //getMLText("selection"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'selector',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
?>
|
||||
</form>
|
||||
<?php $this->contentContainerEnd(); ?>
|
||||
</form>
|
||||
<div class="ajax" style="margin-bottom: 15px;" data-view="WorkflowActionsMgr" data-action="actionmenu" <?php echo ($selworkflowaction ? "data-query=\"workflowactionid=".$selworkflowaction->getID()."\"" : "") ?>></div>
|
||||
<div class="ajax" data-view="WorkflowActionsMgr" data-action="info" <?php echo ($selworkflowaction ? "data-query=\"workflowactionid=".$selworkflowaction->getID()."\"" : "") ?>></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -73,13 +73,39 @@ $(document).ready(function() {
|
|||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$selworkflow = $this->params['selworkflow'];
|
||||
if($selworkflow) { ?>
|
||||
if($selworkflow && $selworkflow->getTransitions()) { ?>
|
||||
<div id="workflowgraph">
|
||||
<iframe src="out.WorkflowGraph.php?workflow=<?php echo $selworkflow->getID(); ?>" width="100%" height="661" style="border: 1px solid #e3e3e3; border-radius: 4px; margin: -1px;"></iframe>
|
||||
</div>
|
||||
<?php }
|
||||
} /* }}} */
|
||||
|
||||
function actionmenu() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$selworkflow = $this->params['selworkflow'];
|
||||
$workflows = $this->params['allworkflows'];
|
||||
$workflowstates = $this->params['allworkflowstates'];
|
||||
|
||||
if($selworkflow && !$selworkflow->isUsed()) {
|
||||
?>
|
||||
<div class="btn-group">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo getMLText('action'); ?>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
if(!$selworkflow->isUsed()) {
|
||||
echo '<li><a href="../out/out.RemoveWorkflow.php?workflowid='.$selworkflow->getID().'"><i class="icon-remove"></i> '.getMLText("rm_workflow").'</a><li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function showWorkflowForm($workflow) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
@ -137,26 +163,16 @@ $(document).ready(function() {
|
|||
<?php $this->contentContainerStart(); ?>
|
||||
<form class="form-horizontal" action="../op/op.WorkflowMgr.php" method="post" enctype="multipart/form-data">
|
||||
<?php
|
||||
if($workflow) {
|
||||
echo createHiddenFieldWithKey('editworkflow');
|
||||
if($workflow) {
|
||||
echo createHiddenFieldWithKey('editworkflow');
|
||||
?>
|
||||
<input type="hidden" name="workflowid" value="<?php print $workflow->getID();?>">
|
||||
<input type="hidden" name="action" value="editworkflow">
|
||||
<?php
|
||||
} else {
|
||||
echo createHiddenFieldWithKey('addworkflow');
|
||||
} else {
|
||||
echo createHiddenFieldWithKey('addworkflow');
|
||||
?>
|
||||
<input type="hidden" name="action" value="addworkflow">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($workflow && !$workflow->isUsed()) {
|
||||
?>
|
||||
<div class="controls">
|
||||
<a class="standardText btn" href="../out/out.RemoveWorkflow.php?workflowid=<?php print $workflow->getID();?>"><i class="icon-remove"></i> <?php printMLText("rm_workflow");?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
$this->formField(
|
||||
|
@ -318,8 +334,7 @@ $(document).ready(function() {
|
|||
|
||||
<div class="row-fluid">
|
||||
<div class="span5">
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
<form class="form-horizontal">
|
||||
<form class="form-horizontal">
|
||||
<?php
|
||||
$options = array();
|
||||
$options[] = array("-1", getMLText("choose_workflow"));
|
||||
|
@ -328,17 +343,18 @@ $(document).ready(function() {
|
|||
$options[] = array($currWorkflow->getID(), htmlspecialchars($currWorkflow->getName()),$selworkflow && $currWorkflow->getID()==$selworkflow->getID());
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("selection"),
|
||||
null, //getMLText("selection"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'selector',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
?>
|
||||
</form>
|
||||
<?php $this->contentContainerEnd(); ?>
|
||||
<div class="ajax" data-view="WorkflowMgr" data-action="info" <?php echo ($selworkflow ? "data-query=\"workflowid=".$selworkflow->getID()."\"" : "") ?>></div>
|
||||
</form>
|
||||
<div class="ajax" style="margin-bottom: 15px;" data-view="WorkflowMgr" data-action="actionmenu" <?php echo ($selworkflow ? "data-query=\"workflowid=".$selworkflow->getID()."\"" : "") ?>></div>
|
||||
<div class="ajax" data-view="WorkflowMgr" data-action="info" <?php echo ($selworkflow ? "data-query=\"workflowid=".$selworkflow->getID()."\"" : "") ?>></div>
|
||||
</div>
|
||||
|
||||
<div class="span7">
|
||||
|
|
|
@ -101,18 +101,34 @@ $(document).ready(function() {
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
function actionmenu() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$selworkflowstate = $this->params['selworkflowstate'];
|
||||
|
||||
if($selworkflowstate && !$selworkflowstate->isUsed()) {
|
||||
?>
|
||||
<div class="btn-group">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo getMLText('action'); ?>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
if(!$selworkflowstate->isUsed()) {
|
||||
echo '<li><a href="../op/op.RemoveWorkflowState.php?workflowstateid='.$selworkflowstate->getID().'&formtoken='.createFormKey('removeworkflowstate').'"><i class="icon-remove"></i> '.getMLText("rm_workflow_state").'</a><li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function showWorkflowStateForm($state) { /* {{{ */
|
||||
if($state) {
|
||||
if($state->isUsed()) {
|
||||
$this->infoMsg(getMLText('workflow_state_in_use'));
|
||||
} else {
|
||||
?>
|
||||
<form class="form-inline" action="../op/op.RemoveWorkflowState.php" method="post">
|
||||
<?php echo createHiddenFieldWithKey('removeworkflowstate'); ?>
|
||||
<input type="hidden" name="workflowstateid" value="<?php print $state->getID();?>">
|
||||
<button type="submit" class="btn"><i class="icon-remove"></i> <?php printMLText("rm_workflow_state");?></button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -182,8 +198,7 @@ $(document).ready(function() {
|
|||
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
<form class="form-horizontal">
|
||||
<form class="form-horizontal">
|
||||
<?php
|
||||
$options = array();
|
||||
$options[] = array("-1", getMLText("choose_workflow_state"));
|
||||
|
@ -192,16 +207,17 @@ $(document).ready(function() {
|
|||
$options[] = array($currWorkflowState->getID(), htmlspecialchars($currWorkflowState->getName()), $selworkflowstate && $currWorkflowState->getID()==$selworkflowstate->getID());
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("selection"),
|
||||
null, //getMLText("selection"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'selector',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
?>
|
||||
</form>
|
||||
<?php $this->contentContainerEnd(); ?>
|
||||
</form>
|
||||
<div class="ajax" style="margin-bottom: 15px;" data-view="WorkflowStatesMgr" data-action="actionmenu" <?php echo ($selworkflowstate ? "data-query=\"workflowstateid=".$selworkflowstate->getID()."\"" : "") ?>></div>
|
||||
<div class="ajax" data-view="WorkflowStatesMgr" data-action="info" <?php echo ($selworkflowstate ? "data-query=\"workflowstateid=".$selworkflowstate->getID()."\"" : "") ?>></div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user