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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
40c88995
Commit
40c88995
authored
12 years ago
by
Philippe Grand
Browse files
Options
Downloads
Patches
Plain Diff
display enhancement and standardize
parent
5b6a12d0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/admin/project.php
+26
-12
26 additions, 12 deletions
htdocs/admin/project.php
with
26 additions
and
12 deletions
htdocs/admin/project.php
+
26
−
12
View file @
40c88995
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-201
2
Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011-201
3
Philippe Grand <philippe.grand@atoo-net.com>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -66,7 +66,7 @@ if ($action == 'updateMask')
...
@@ -66,7 +66,7 @@ if ($action == 'updateMask')
}
}
}
}
if
(
$action
==
'specimen'
)
else
if
(
$action
==
'specimen'
)
{
{
$modele
=
GETPOST
(
'module'
,
'alpha'
);
$modele
=
GETPOST
(
'module'
,
'alpha'
);
...
@@ -111,12 +111,13 @@ if ($action == 'specimen')
...
@@ -111,12 +111,13 @@ if ($action == 'specimen')
}
}
}
}
if
(
$action
==
'set'
)
// Activate a model
else
if
(
$action
==
'set'
)
{
{
$ret
=
addDocumentModel
(
$value
,
$type
,
$label
,
$scandir
);
$ret
=
addDocumentModel
(
$value
,
$type
,
$label
,
$scandir
);
}
}
if
(
$action
==
'del'
)
else
if
(
$action
==
'del'
)
{
{
$ret
=
delDocumentModel
(
$value
,
$type
);
$ret
=
delDocumentModel
(
$value
,
$type
);
if
(
$ret
>
0
)
if
(
$ret
>
0
)
...
@@ -125,7 +126,8 @@ if ($action == 'del')
...
@@ -125,7 +126,8 @@ if ($action == 'del')
}
}
}
}
if
(
$action
==
'setdoc'
)
// Set default model
else
if
(
$action
==
'setdoc'
)
{
{
if
(
dolibarr_set_const
(
$db
,
"PROJECT_ADDON_PDF"
,
$value
,
'chaine'
,
0
,
''
,
$conf
->
entity
))
if
(
dolibarr_set_const
(
$db
,
"PROJECT_ADDON_PDF"
,
$value
,
'chaine'
,
0
,
''
,
$conf
->
entity
))
{
{
...
@@ -142,7 +144,7 @@ if ($action == 'setdoc')
...
@@ -142,7 +144,7 @@ if ($action == 'setdoc')
}
}
}
}
if
(
$action
==
'setmod'
)
else
if
(
$action
==
'setmod'
)
{
{
// TODO Verifier si module numerotation choisi peut etre active
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
// par appel methode canBeActivated
...
@@ -156,7 +158,7 @@ if ($action == 'setmod')
...
@@ -156,7 +158,7 @@ if ($action == 'setmod')
$dirmodels
=
array_merge
(
array
(
'/'
),(
array
)
$conf
->
modules_parts
[
'models'
]);
$dirmodels
=
array_merge
(
array
(
'/'
),(
array
)
$conf
->
modules_parts
[
'models'
]);
llxHeader
();
llxHeader
(
""
,
$langs
->
trans
(
"ProjectsSetup"
)
);
$form
=
new
Form
(
$db
);
$form
=
new
Form
(
$db
);
...
@@ -165,8 +167,20 @@ print_fiche_titre($langs->trans("ProjectsSetup"),$linkback,'setup');
...
@@ -165,8 +167,20 @@ print_fiche_titre($langs->trans("ProjectsSetup"),$linkback,'setup');
print
"<br>"
;
print
"<br>"
;
$h
=
0
;
$head
[
$h
][
0
]
=
DOL_URL_ROOT
.
"/admin/project.php"
;
$head
[
$h
][
1
]
=
$langs
->
trans
(
"Projects"
);
$head
[
$h
][
2
]
=
'Project'
;
$hselected
=
$h
;
$h
++
;
dol_fiche_head
(
$head
,
$hselected
,
$langs
->
trans
(
"ModuleSetup"
));
/*
* Projects Numbering model
*/
// Project numbering module
print_titre
(
$langs
->
trans
(
"ProjectsNumberingModules"
));
print_titre
(
$langs
->
trans
(
"ProjectsNumberingModules"
));
print
'<table class="noborder" width="100%">'
;
print
'<table class="noborder" width="100%">'
;
...
@@ -198,7 +212,7 @@ foreach ($dirmodels as $reldir)
...
@@ -198,7 +212,7 @@ foreach ($dirmodels as $reldir)
$file
=
$reg
[
1
];
$file
=
$reg
[
1
];
$classname
=
substr
(
$file
,
4
);
$classname
=
substr
(
$file
,
4
);
require_once
DOL_DOCUMENT_ROOT
.
"/core/modules/project/"
.
$file
.
'.php'
;
require_once
$dir
.
$file
.
'.php'
;
$module
=
new
$file
;
$module
=
new
$file
;
...
@@ -213,7 +227,7 @@ foreach ($dirmodels as $reldir)
...
@@ -213,7 +227,7 @@ foreach ($dirmodels as $reldir)
print
$module
->
info
();
print
$module
->
info
();
print
'</td>'
;
print
'</td>'
;
// Show example of numbering mod
ul
e
// Show example of numbering mode
l
print
'<td nowrap="nowrap">'
;
print
'<td nowrap="nowrap">'
;
$tmp
=
$module
->
getExample
();
$tmp
=
$module
->
getExample
();
if
(
preg_match
(
'/^Error/'
,
$tmp
))
print
'<div class="error">'
.
$langs
->
trans
(
$tmp
)
.
'</div>'
;
if
(
preg_match
(
'/^Error/'
,
$tmp
))
print
'<div class="error">'
.
$langs
->
trans
(
$tmp
)
.
'</div>'
;
...
@@ -269,7 +283,7 @@ print '</table><br>';
...
@@ -269,7 +283,7 @@ print '</table><br>';
/*
/*
*
Modeles documents for project
s
*
Document templates generator
s
*/
*/
print_titre
(
$langs
->
trans
(
"ProjectsModelModule"
));
print_titre
(
$langs
->
trans
(
"ProjectsModelModule"
));
...
@@ -352,7 +366,7 @@ foreach ($dirmodels as $reldir)
...
@@ -352,7 +366,7 @@ foreach ($dirmodels as $reldir)
print
"</td>"
;
print
"</td>"
;
}
}
// Defaut
// Defau
l
t
print
"<td align=
\"
center
\"
>"
;
print
"<td align=
\"
center
\"
>"
;
if
(
$conf
->
global
->
PROJECT_ADDON_PDF
==
"
$name
"
)
if
(
$conf
->
global
->
PROJECT_ADDON_PDF
==
"
$name
"
)
{
{
...
...
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