mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
new task menutask in op/op.Ajax.php which calls menuTask()
This commit is contained in:
parent
6b2f528624
commit
3583962085
|
@ -424,6 +424,20 @@ switch($command) {
|
|||
case 'menuclipboard':
|
||||
$content = $view->menuClipboard($session->getClipboard());
|
||||
break;
|
||||
case 'menutasks':
|
||||
$resArr = $dms->getDocumentList('AppRevByMe', $user);
|
||||
if($resArr) {
|
||||
$reviews = array();
|
||||
$approvals = array();
|
||||
foreach ($resArr as $res) {
|
||||
if($res["status"]==S_DRAFT_REV)
|
||||
$reviews[] = $res['id'];
|
||||
if($res["status"]==S_DRAFT_APP)
|
||||
$approvals[] = $res['id'];
|
||||
}
|
||||
}
|
||||
$content = $view->menuTasks(array('review'=>$reviews, 'approval'=>$approvals));
|
||||
break;
|
||||
case 'mainclipboard':
|
||||
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $settings->_previewWidthList);
|
||||
$previewer->setConverters($settings->_converters['preview']);
|
||||
|
|
|
@ -239,6 +239,39 @@ $(document).ready(function () {
|
|||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Returns the html needed for the clipboard list in the menu
|
||||
*
|
||||
* This function renders the clipboard in a way suitable to be
|
||||
* used as a menu
|
||||
*
|
||||
* @param array $clipboard clipboard containing two arrays for both
|
||||
* documents and folders.
|
||||
* @return string html code
|
||||
*/
|
||||
function menuTasks($tasks) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$content = '';
|
||||
// $content .= " <ul id=\"main-menu-tasks\" class=\"nav pull-right\">\n";
|
||||
// $content .= " <li class=\"dropdown\">\n";
|
||||
$content .= " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText('tasks')." (".count($tasks['review'])."/".count($tasks['approval']).") <i class=\"icon-caret-down\"></i></a>\n";
|
||||
$content .= " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
foreach($tasks['review'] as $t) {
|
||||
$doc = $dms->getDocument($t);
|
||||
$content .= " <li><a href=\"../out/out.ViewDocument.php?documentid=".$doc->getID()."¤ttab=revapp\">".$doc->getName()."</a></li>";
|
||||
}
|
||||
foreach($tasks['approval'] as $t) {
|
||||
$doc = $dms->getDocument($t);
|
||||
$content .= " <li><a href=\"../out/out.ViewDocument.php?documentid=".$doc->getID()."¤ttab=revapp\">".$doc->getName()."</a></li>";
|
||||
}
|
||||
$content .= " <li class=\"divider\"></li>\n";
|
||||
$content .= " <li><a href=\"../out/out.MyDocuments.php?inProcess=1\">".getMLText("my_documents")."</a></li>\n";
|
||||
$content .= " </ul>\n";
|
||||
// $content .= " </li>\n";
|
||||
// $content .= " </ul>\n";
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
function globalNavigation($folder=null) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
echo "<div class=\"navbar navbar-inverse navbar-fixed-top\">\n";
|
||||
|
@ -303,6 +336,14 @@ $(document).ready(function () {
|
|||
echo " </li>\n";
|
||||
echo " </ul>\n";
|
||||
|
||||
echo " <div id=\"menu-tasks\">";
|
||||
echo " <ul id=\"main-menu-tasks\" class=\"nav pull-right\">\n";
|
||||
echo " <li class=\"dropdown\">\n";
|
||||
echo $this->menuTasks(array('review'=>array(), 'approval'=>array()));
|
||||
echo " </li>\n";
|
||||
echo " </ul>\n";
|
||||
echo " </div>";
|
||||
|
||||
if($this->params['enableclipboard']) {
|
||||
echo " <div id=\"menu-clipboard\">";
|
||||
echo $this->menuClipboard($this->params['session']->getClipboard());
|
||||
|
|
Loading…
Reference in New Issue
Block a user