mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	add list of documents which need correction in menu
This commit is contained in:
		
							parent
							
								
									3514b0db89
								
							
						
					
					
						commit
						d40dc681dc
					
				|  | @ -297,6 +297,7 @@ if(!is_writeable($settings->_configFilePath)) { | ||||||
| 					  <option value="approval" <?php if (in_array('approval', $settings->_tasksInMenu)) echo "selected" ?>><?php printMLText("settings_tasksInMenu_approval");?></option>
 | 					  <option value="approval" <?php if (in_array('approval', $settings->_tasksInMenu)) echo "selected" ?>><?php printMLText("settings_tasksInMenu_approval");?></option>
 | ||||||
| 					  <option value="receipt" <?php if (in_array('receipt', $settings->_tasksInMenu)) echo "selected" ?>><?php printMLText("settings_tasksInMenu_receipt");?></option>
 | 					  <option value="receipt" <?php if (in_array('receipt', $settings->_tasksInMenu)) echo "selected" ?>><?php printMLText("settings_tasksInMenu_receipt");?></option>
 | ||||||
| 					  <option value="revision" <?php if (in_array('revision', $settings->_tasksInMenu)) echo "selected" ?>><?php printMLText("settings_tasksInMenu_revision");?></option>
 | 					  <option value="revision" <?php if (in_array('revision', $settings->_tasksInMenu)) echo "selected" ?>><?php printMLText("settings_tasksInMenu_revision");?></option>
 | ||||||
|  | 					  <option value="needscorrection" <?php if (in_array('needscorrection', $settings->_tasksInMenu)) echo "selected" ?>><?php printMLText("settings_tasksInMenu_needscorrection");?></option>
 | ||||||
| 					</select> | 					</select> | ||||||
| 				</td> | 				</td> | ||||||
|       </tr> |       </tr> | ||||||
|  |  | ||||||
|  | @ -88,6 +88,18 @@ class SeedDMS_View_Tasks extends SeedDMS_Bootstrap_Style { | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 		if(!$tasksinmenu || in_array('needscorrection', $tasksinmenu)) { | ||||||
|  | 			$tasks['needscorrection'] = array(); | ||||||
|  | 			$resArr = $dms->getDocumentList('NeedsCorrectionOwner', $user); | ||||||
|  | 			if($resArr) { | ||||||
|  | 				foreach ($resArr as $res) { | ||||||
|  | 					$document = $dms->getDocument($res["id"]); | ||||||
|  | 					if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { | ||||||
|  | 						$tasks['needscorrection'][] = array('id'=>$res['id'], 'name'=>$res['name']); | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| 		return $tasks; | 		return $tasks; | ||||||
| 	} /* }}} */ | 	} /* }}} */ | ||||||
| 
 | 
 | ||||||
|  | @ -160,9 +172,11 @@ class SeedDMS_View_Tasks extends SeedDMS_Bootstrap_Style { | ||||||
| 			$ct[] = count($tasks['receipt']); | 			$ct[] = count($tasks['receipt']); | ||||||
| 		if(isset($tasks['revision'])) | 		if(isset($tasks['revision'])) | ||||||
| 			$ct[] = count($tasks['revision']); | 			$ct[] = count($tasks['revision']); | ||||||
|  | 		if(isset($tasks['needscorrection'])) | ||||||
|  | 			$ct[] = count($tasks['needscorrection']); | ||||||
| 		$content .= implode('/', $ct); | 		$content .= implode('/', $ct); | ||||||
| 		$content .= ")"; | 		$content .= ")"; | ||||||
| 		if(!empty($tasks['review']) || !empty($tasks['approval']) || !empty($tasks['receipt']) || !empty($tasks['revision'])) { | 		if(!empty($tasks['review']) || !empty($tasks['approval']) || !empty($tasks['receipt']) || !empty($tasks['revision']) || !empty($tasks['needscorrection'])) { | ||||||
| 		$content .= " <i class=\"icon-caret-down\"></i></a>\n"; | 		$content .= " <i class=\"icon-caret-down\"></i></a>\n"; | ||||||
| 		$content .= "     <ul class=\"dropdown-menu\" role=\"menu\">\n"; | 		$content .= "     <ul class=\"dropdown-menu\" role=\"menu\">\n"; | ||||||
| 		if(!empty($tasks['review'])) { | 		if(!empty($tasks['review'])) { | ||||||
|  | @ -209,6 +223,17 @@ class SeedDMS_View_Tasks extends SeedDMS_Bootstrap_Style { | ||||||
| 		$content .= "       </ul>\n"; | 		$content .= "       </ul>\n"; | ||||||
| 		$content .= "      </li>\n"; | 		$content .= "      </li>\n"; | ||||||
| 		} | 		} | ||||||
|  | 		if(!empty($tasks['needscorrection'])) { | ||||||
|  | 		$content .= "      <li class=\"dropdown-submenu\">\n"; | ||||||
|  | 		$content .=	"       <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText("documents_to_correct")."</a>\n"; | ||||||
|  | 		$content .= "         <ul class=\"dropdown-menu\" role=\"menu\">\n"; | ||||||
|  | 		foreach($tasks['needscorrection'] as $t) { | ||||||
|  | 			$doc = $dms->getDocument($t['id']); | ||||||
|  | 			$content .= "       <li><a href=\"../out/out.ViewDocument.php?documentid=".$doc->getID()."¤ttab=docinfo\">".$doc->getName()."</a></li>"; | ||||||
|  | 		} | ||||||
|  | 		$content .= "       </ul>\n"; | ||||||
|  | 		$content .= "      </li>\n"; | ||||||
|  | 		} | ||||||
| 		if ($this->check_access('MyDocuments')) { | 		if ($this->check_access('MyDocuments')) { | ||||||
| 			$content .= "    <li class=\"divider\"></li>\n"; | 			$content .= "    <li class=\"divider\"></li>\n"; | ||||||
| 			$content .= "    <li><a href=\"../out/out.MyDocuments.php\">".getMLText("my_documents")."</a></li>\n"; | 			$content .= "    <li><a href=\"../out/out.MyDocuments.php\">".getMLText("my_documents")."</a></li>\n"; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann