浏览代码

Loan - Move tab Notes after Files tab

aspangaro 8 年之前
父节点
当前提交
302109b3fe
共有 1 个文件被更改,包括 12 次插入12 次删除
  1. 12 12
      htdocs/core/lib/loan.lib.php

+ 12 - 12
htdocs/core/lib/loan.lib.php

@@ -1,6 +1,6 @@
 <?php
-/* Copyright (C) 2014		Alexandre Spangaro	<aspangaro.dolibarr@gmail.com>
- * Copyright (C) 2015       Frederic France      <frederic.france@free.fr>
+/* Copyright (C) 2014-2016	Alexandre Spangaro	<aspangaro@zendsi.com>
+ * Copyright (C) 2015		Frederic France		<frederic.france@free.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -41,16 +41,6 @@ function loan_prepare_head($object)
 	$head[$tab][2] = 'card';
 	$tab++;
 
-	if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))		
-	{		
-		$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);		
-		$head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;		
-		$head[$tab][1] = $langs->trans("Notes");		
-		if($nbNote > 0) $head[$tab][1].= ' <span class="badge">'.$nbNote.'</span>';		
-		$head[$tab][2] = 'note';		
-		$tab++;		
-	}
-
     // Show more tabs from modules
     // Entries must be declared in modules descriptor with line
     // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__');   to add new tab
@@ -68,6 +58,16 @@ function loan_prepare_head($object)
 	$head[$tab][2] = 'documents';
 	$tab++;
 
+	if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
+	{		
+		$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
+		$head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;
+		$head[$tab][1] = $langs->trans("Notes");
+		if($nbNote > 0) $head[$tab][1].= ' <span class="badge">'.$nbNote.'</span>';
+		$head[$tab][2] = 'note';
+		$tab++;
+	}
+
     $head[$tab][0] = DOL_URL_ROOT.'/loan/info.php?id='.$object->id;
     $head[$tab][1] = $langs->trans("Info");
     $head[$tab][2] = 'info';