/**
* getPath - return the complete_path
*
+ * @param boolean does path is url clickable (default is false)
+ * @param boolean does path include this document group name ? (default is true)
* @return string the complete_path
* @access public
*/
- function getPath() {
+ function getPath($url = false, $includename = true) {
$returnPath = '';
if ($this->getParentID()) {
$parentDg = new DocumentGroup($this->Group, $this->getParentID());
- $returnPath = $parentDg->getPath();
+ $returnPath = $parentDg->getPath($url);
}
- return $returnPath.'/'.$this->getName();
+ if ($includename) {
+ if ($url) {
+ $returnPath .= '/'.util_make_link('/docman/?group_id='.$this->Group->getID().'&view=listfile&dirid='.$this->getID(),$this->getName());
+ } else {
+ $returnPath .= '/'.$this->getName();
+ }
+ }
+ return $returnPath;
}
/**
$DocGroupName = 0;
if ($dirid) {
- $ndg = new DocumentGroup($g,$dirid);
+ $ndg = new DocumentGroup($g, $dirid);
$DocGroupName = $ndg->getName();
+ $dgpath = $ndg->getPath(true, false);
if (!$DocGroupName) {
session_redirect('/docman/?group_id='.$group_id.'&error_msg='.urlencode($g->getErrorMessage()));
}
echo '<div id="handle" style="float:left; height:100px; margin:3px; width:3px; background: #000; cursor:e-resize;"></div>';
echo '<div id="right" style="float:left; width: 80%; overflow: auto; max-width: 90%;">';
if ($DocGroupName) {
- echo '<h3 class="docman_h3" >'._('Document Folder:').' <i>'.$DocGroupName.'</i> ';
+ echo '<h4>'._('Path:').' <i>'.$dgpath.'</i></h4>';
+ echo '<h3 class="docman_h3" >'._('Document Folder:').'<i>'.$DocGroupName.'</i> ';
if (forge_check_perm('docman', $group_id, 'approve')) {
echo '<a href="#" class="tabtitle" id="docman-editdirectory" title="'._('Edit this folder').'" >'. html_image('docman/configure-directory.png',22,22,array('alt'=>'edit')). '</a>';
echo '<a href="?group_id='.$group_id.'&action=trashdir&dirid='.$dirid.'" class="tabtitle" id="docman-trashdirectory" title="'._('Move this folder and his content to trash').'" >'. html_image('docman/trash-empty.png',22,22,array('alt'=>'trashdir')). '</a>';