';
print $langs->trans("Status");
diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php
index 5997f44714b..82d57514623 100644
--- a/htdocs/core/modules/modResource.class.php
+++ b/htdocs/core/modules/modResource.class.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2015 Laurent Destailleur
*
* 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
@@ -153,10 +154,6 @@ class modResource extends DolibarrModules
// 'categories_x' to add a tab in category view
// (reresource 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
- $this->tabs = array(
-// 'thirdparty:+resources:Resources:resource:$user->rights->resource->read:/resource/element_resource.php?element=societe&element_id=__ID__'
- );
-
// Boxes
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
$this->boxes = array(); // Boxes list
@@ -250,6 +247,21 @@ class modResource extends DolibarrModules
'user'=> 0
);
+ $this->menu[$r++]=array(
+ 'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=resource', //On utilise les ancres définis dans le menu parent déclaré au dessus
+ 'type'=> 'left', // Toujours un menu gauche
+ 'titre'=> 'List',
+ 'mainmenu'=> 'tools',
+ 'leftmenu'=> '', // On n'indique rien ici car on ne souhaite pas intégrer de sous-menus à ce menu
+ 'url'=> '/resource/list.php',
+ 'langs'=> 'resource',
+ 'position'=> 102,
+ 'enabled'=> '1',
+ 'perms'=> '$user->rights->resource->read',
+ 'target'=> '',
+ 'user'=> 0
+ );
+
// Exports
$r = 1;
diff --git a/htdocs/core/tpl/resource_add.tpl.php b/htdocs/core/tpl/resource_add.tpl.php
index 876afd41c72..e2add5fb266 100644
--- a/htdocs/core/tpl/resource_add.tpl.php
+++ b/htdocs/core/tpl/resource_add.tpl.php
@@ -1,7 +1,6 @@
+
select_resource_list('','fk_resource','',1,1,0,$events,'',2);
$out .= '';
-$out .= '
';
}
-// FIN DU TPL
\ No newline at end of file
+?>
+
diff --git a/htdocs/langs/en_US/resource.lang b/htdocs/langs/en_US/resource.lang
index c89edddec4b..cdff0391c30 100644
--- a/htdocs/langs/en_US/resource.lang
+++ b/htdocs/langs/en_US/resource.lang
@@ -17,6 +17,7 @@ ResourceFormLabel_description=Resource description
ResourcesLinkedToElement=Resources linked to element
+ShowResource=Show resource
ShowResourcePlanning=Show resource planning
GotoDate=Go to date
diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php
index 3618230a374..f509bc82759 100644
--- a/htdocs/resource/add.php
+++ b/htdocs/resource/add.php
@@ -1,6 +1,7 @@
* Copyright (C) 2015 Alexandre Spangaro
+ * Copyright (C) 2015 Laurent Destailleur
*
* 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
@@ -111,9 +112,9 @@ if ($action == 'confirm_add_resource')
}
}
+
/*
* View
- *
*/
$form=new Form($db);
@@ -146,7 +147,7 @@ if (! $action)
// Type
print '