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
c3d4df2b
Commit
c3d4df2b
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Rewrite working board to prepare new features
parent
0b69d014
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/index.php
+46
-21
46 additions, 21 deletions
htdocs/index.php
with
46 additions
and
21 deletions
htdocs/index.php
+
46
−
21
View file @
c3d4df2b
...
...
@@ -364,18 +364,6 @@ $showweather=empty($conf->global->MAIN_DISABLE_METEO)?1:0;
//Array that contains all WorkboardResponse classes to process them
$dashboardlines
=
array
();
$boxwork
=
''
;
$boxwork
.
=
'<div class="box">'
;
$boxwork
.
=
'<table summary="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"WorkingBoard"
))
.
'" class="noborder boxtable" width="100%">'
.
"
\n
"
;
$boxwork
.
=
'<tr class="liste_titre">'
;
$boxwork
.
=
'<th class="liste_titre" colspan="2">'
.
$langs
->
trans
(
"DolibarrWorkBoard"
)
.
'</th>'
;
$boxwork
.
=
'<th class="liste_titre" align="right">'
.
$langs
->
trans
(
"Number"
)
.
'</th>'
;
$boxwork
.
=
'<th class="liste_titre" align="right">'
.
$form
->
textwithpicto
(
$langs
->
trans
(
"Late"
),
$langs
->
trans
(
"LateDesc"
))
.
'</th>'
;
$boxwork
.
=
'<th class="liste_titre"> </th>'
;
//print '<th class="liste_titre" width="20"> </th>';
if
(
$showweather
)
$boxwork
.
=
'<th class="liste_titre hideonsmartphone" width="80"> </th>'
;
$boxwork
.
=
'</tr>'
.
"
\n
"
;
// Do not include sections without management permission
require
DOL_DOCUMENT_ROOT
.
'/core/class/workboardresponse.class.php'
;
...
...
@@ -531,27 +519,64 @@ foreach($valid_dashboardlines as $board)
}
}
$boxwork
=
''
;
$boxwork
.
=
'<div class="box">'
;
$boxwork
.
=
'<table summary="'
.
dol_escape_htmltag
(
$langs
->
trans
(
"WorkingBoard"
))
.
'" class="noborder boxtable" width="100%">'
.
"
\n
"
;
$boxwork
.
=
'<tr class="liste_titre">'
;
$boxwork
.
=
'<th class="liste_titre">'
.
$langs
->
trans
(
"DolibarrWorkBoard"
)
.
'</th>'
;
$boxwork
.
=
'<th class="liste_titre" align="right">'
.
$langs
->
trans
(
"Number"
)
.
'</th>'
;
$boxwork
.
=
'<th class="liste_titre" align="right">'
.
$form
->
textwithpicto
(
$langs
->
trans
(
"Late"
),
$langs
->
trans
(
"LateDesc"
))
.
'</th>'
;
$boxwork
.
=
'<th class="liste_titre" style="width: 22px"> </th>'
;
//print '<th class="liste_titre" width="20"> </th>';
//if ($showweather) $boxwork.='<th class="liste_titre hideonsmartphone" width="80"> </th>';
$boxwork
.
=
'</tr>'
.
"
\n
"
;
if
(
$showweather
)
{
$var
=!
$var
;
$boxwork
.
=
'<tr '
.
$bc
[
$var
]
.
'>'
;
$boxwork
.
=
'<td colspan="4" class="nohover hideonsmartphone center valignmiddle">'
;
//$boxwork.=$langs->trans("Meteo");
//$boxwork.='</td><td colspan="2" class="nohover center">';
$text
=
''
;
if
(
$totallate
>
0
)
$text
=
$langs
->
transnoentitiesnoconv
(
"WarningYouHaveAtLeastOneTaskLate"
)
.
' ('
.
$langs
->
transnoentitiesnoconv
(
"NActionsLate"
,
$totallate
)
.
')'
;
$options
=
'height="64px"'
;
if
(
$rowspan
<=
2
)
$options
=
'height="24"'
;
// Weather logo is smaller if dashboard has few elements
else
if
(
$rowspan
<=
3
)
$options
=
'height="48"'
;
// Weather logo is smaller if dashboard has few elements
$boxwork
.
=
showWeather
(
$totallate
,
$text
,
$options
);
$boxwork
.
=
'</td>'
;
/*$boxwork.='<td align="left" colspan="3" class="nohover">';
if ($board->nbtodolate > 0) $boxwork.=img_picto($textlate,"warning");
else $boxwork.=' ';
$boxwork.='</td>';*/
$boxwork
.
=
'</tr>'
;
$showweather
=
0
;
}
// Show dashboard
foreach
(
$valid_dashboardlines
as
$board
)
{
$var
=!
$var
;
$boxwork
.
=
'<tr '
.
$bc
[
$var
]
.
'><td
width="16
">'
.
$board
->
img
.
'
</td><td>
'
.
$board
->
label
.
'</td>'
;
$boxwork
.
=
'<tr '
.
$bc
[
$var
]
.
'><td
class="nowrap
">'
.
$board
->
img
.
'
'
.
$board
->
label
.
'</td>'
;
$boxwork
.
=
'<td align="right"><a class="dashboardlineindicator" href="'
.
$board
->
url
.
'"><span class="dashboardlineindicator">'
.
$board
->
nbtodo
.
'</span></a></td>'
;
$boxwork
.
=
'<td align="right">'
;
$textlate
=
$langs
->
trans
(
"NActionsLate"
,
$board
->
nbtodolate
);
$textlate
.
=
' ('
.
$langs
->
trans
(
"Late"
)
.
' = '
.
$langs
->
trans
(
"DateReference"
)
.
' > '
.
$langs
->
trans
(
"DateToday"
)
.
' '
.
(
ceil
(
$board
->
warning_delay
)
>=
0
?
'+'
:
''
)
.
ceil
(
$board
->
warning_delay
)
.
' '
.
$langs
->
trans
(
"days"
)
.
')'
;
$boxwork
.
=
'<a title="'
.
dol_escape_htmltag
(
$textlate
)
.
'" class="dashboardlineindicatorlate'
.
(
$board
->
nbtodolate
>
0
?
' dashboardlineko'
:
' dashboardlineok'
)
.
'" href="'
.
((
!
$board
->
url_late
)
?
$board
->
url
:
$board
->
url_late
)
.
'"><span class="dashboardlineindicatorlate'
.
(
$board
->
nbtodolate
>
0
?
' dashboardlineko'
:
' dashboardlineok'
)
.
'">'
;
$textlate
.
=
' ('
.
$langs
->
trans
(
"Late"
)
.
' = '
.
$langs
->
trans
(
"DateReference"
)
.
' > '
.
$langs
->
trans
(
"DateToday"
)
.
' '
.
(
ceil
(
$board
->
warning_delay
)
>=
0
?
'+'
:
''
)
.
ceil
(
$board
->
warning_delay
)
.
' '
.
$langs
->
trans
(
"days"
)
.
')'
;
$boxwork
.
=
'<a title="'
.
dol_escape_htmltag
(
$textlate
)
.
'" class="dashboardlineindicatorlate'
.
(
$board
->
nbtodolate
>
0
?
' dashboardlineko'
:
' dashboardlineok'
)
.
'" href="'
.
((
!
$board
->
url_late
)
?
$board
->
url
:
$board
->
url_late
)
.
'">'
;
$boxwork
.
=
'<span class="dashboardlineindicatorlate'
.
(
$board
->
nbtodolate
>
0
?
' dashboardlineko'
:
' dashboardlineok'
)
.
'">'
;
$boxwork
.
=
$board
->
nbtodolate
;
$boxwork
.
=
'</span></a>'
;
$boxwork
.
=
'</span>'
;
$boxwork
.
=
'</a>'
;
$boxwork
.
=
'</td>'
;
$boxwork
.
=
'<td align="left">'
;
if
(
$board
->
nbtodolate
>
0
)
$boxwork
.
=
img_picto
(
$textlate
,
"warning"
);
else
$boxwork
.
=
' '
;
$boxwork
.
=
'<td>'
;
if
(
$board
->
nbtodolate
>
0
)
$boxwork
.
=
img_picto
(
$textlate
,
"warning"
,
'class="valignmiddle"'
)
.
' '
;
$boxwork
.
=
'</td>'
;
/*print '<td class="nowrap" align="right">';
print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')';
print '</td>';*/
/*
if ($showweather)
{
$boxwork.='<td class="nohover hideonsmartphone noborderbottom" rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">';
...
...
@@ -563,7 +588,7 @@ foreach($valid_dashboardlines as $board)
$boxwork.=showWeather($totallate,$text,$options);
$boxwork.='</td>';
$showweather=0;
}
}
*/
$boxwork
.
=
'</tr>'
;
$boxwork
.
=
"
\n
"
;
}
...
...
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