Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
739b230b
Commit
739b230b
authored
15 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Add tab module in contract view
parent
a5ebf8fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dev/skeletons/modMyModule.class.php
+1
-0
1 addition, 0 deletions
dev/skeletons/modMyModule.class.php
htdocs/lib/contract.lib.php
+19
-2
19 additions, 2 deletions
htdocs/lib/contract.lib.php
with
20 additions
and
2 deletions
dev/skeletons/modMyModule.class.php
+
1
−
0
View file @
739b230b
...
...
@@ -103,6 +103,7 @@ class modMyModule extends DolibarrModules
// 'product' to add a tab in product view
// 'propal' to add a tab in propal view
// 'member' to add a tab in fundation member view
// 'contract' to add a tab in contract view
// Boxes
...
...
This diff is collapsed.
Click to expand it.
htdocs/lib/contract.lib.php
+
19
−
2
View file @
739b230b
<?php
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.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
...
...
@@ -53,7 +54,23 @@ function contract_prepare_head($contrat)
$head
[
$h
][
1
]
=
$langs
->
trans
(
"Info"
);
$head
[
$h
][
2
]
=
'info'
;
$h
++
;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__');
if
(
is_array
(
$conf
->
tabs_modules
[
'contract'
]))
{
$i
=
0
;
foreach
(
$conf
->
tabs_modules
[
'contract'
]
as
$value
)
{
$values
=
explode
(
':'
,
$value
);
if
(
$values
[
2
])
$langs
->
load
(
$values
[
2
]);
$head
[
$h
][
0
]
=
preg_replace
(
'/__ID__/i'
,
$contrat
->
id
,
$values
[
3
]);
$head
[
$h
][
1
]
=
$langs
->
trans
(
$values
[
1
]);
$head
[
$h
][
2
]
=
'tab'
.
$values
[
1
];
$h
++
;
}
}
return
$head
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment