Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
# Display list
/* Requires
$difflist = diffusion list array
$_SESSION[m_admin]['entities'][listmodel]
$_SESSION[$origin][listinstance]
$roles = list of available roles
$onlyCC = hide 'dest';
*/
echo '<div style="max-height:490px;overflow:auto;">';
$empty = 0;
$nb_roles = 0;
if($origin == 'indexing' && $category == 'outgoing'){
//$difflist['copy'] = array();
}
foreach($roles as $role_id => $role_label) {
$nb_role++;
if($category == 'outgoing' && $role_label == 'Destinataire'){
$role_label = _SHIPPER;
}
if(($specific_role != $role_id && $specific_role.'_copy' != $role_id && $specific_role.'_info' != $role_id) && isset($specific_role) && $specific_role <> '')
continue;
if(count($difflist[$role_id]['users']) > 0
|| count($difflist[$role_id]['entities']) > 0
) {
$empty++;
?>
<h3 class="sstit" style="font-size: 1.2em;"><?php functions::xecho($role_label);?></h3><?php
if(count($difflist[$role_id]['users']) > 0) { ?>
<table cellpadding="0" cellspacing="0" border="0" class="listingsmall liste_diff spec" style="width:100%;margin:0;"><?php
$color = ' class="col"';
for($i=0, $l=count($difflist[$role_id]['users']);
$i<$l;
$i++
) {
$user = $difflist[$role_id]['users'][$i];
if ($color == ' class="col"') $color = ' ';
else $color = ' class="col"';
if (preg_match("/[DEL]/", $difflist[$role_id]['users'][$i]['process_comment'])) {
$styleMoved=" style='text-decoration: line-through;opacity:0.5;' ";
$descMoved=$difflist[$role_id]['users'][$i]['process_comment'];
} else {
$styleMoved="";
$descMoved="";
}
?>
<tr <?php echo $color.$styleMoved;?> title="<?php echo $descMoved;?>">
<td style="width:15%;text-align:center;">
<i class="fa fa-user fa-2x" title="<?php echo _USER;?>"></i>
</td>
<td style="width:10%;"><?php
/* if($user['visible'] == 'Y') { ?>
<i class="fa fa-check fa-2x" title="<?php echo _VISIBLE;?>"></i> <?php
} else {?>
<i class="fa fa-times fa-2x" title="<?php echo _NOT_VISIBLE;?>"></i><?php
} */?>
</td>
<td style="width:37%;"><?php functions::xecho($user['lastname'] . " " . $user['firstname']);?></td>
<td style="width:38%;"><?php functions::xecho($user['entity_label']);?></td>
<?php
if($showStatus == true){
if(!empty($difflist[$role_id]['users'][$i]['process_date'])){
echo '<td style="width:5%;"><i class="fa fa-check" aria-hidden="true" style="color:green;"></i></td>';
}else{
echo '<td style="width:5%;"><i class="fa fa-hourglass-half" aria-hidden="true"></i></td>';
}
}
?>
</tr><?php
} ?>
</table><?php
}
if(count($difflist[$role_id]['entities']) > 0) { ?>
<table cellpadding="0" cellspacing="0" border="0" class="listingsmall liste_diff spec" style="width:100%;margin:0;"><?php
$color = ' class="col"';
for ($i=0, $l=count($difflist[$role_id]['entities']);
$i<$l;
$i++
) {
$entity = $difflist[$role_id]['entities'][$i];
if ($color == ' class="col"') $color = '';
else $color = ' class="col"';?>
<tr <?php echo $color;?> >
<td style="width:15%;text-align:center;">
<i class="fa fa-sitemap fa-2x" title="<?php echo _ENTITY . " " . $role_label ;?>" ></i>
</td>
<td style="width:10%;"><?php
/*if($entity['visible'] == 'Y') { ?>
<i class="fa fa-check fa-2x" title="<?php echo _VISIBLE;?>"></i><?php
} else {?>
<i class="fa fa-times fa-2x" title="<?php echo _NOT_VISIBLE;?>"></i><?php
}*/ ?>
</td>
<td style="width:37%;"><?php functions::xecho($entity['entity_id']);?></td>
<td style="width:38%;"><?php functions::xecho($entity['entity_label']);?></td>
</tr> <?php
} ?>
</table><?php
} ?>
<br/><?php
}
}
if($empty == $nb_roles){
echo '<div style="font-style:italic;text-align:center;color:#ea0000;margin:10px;">'._DIFF_LIST.' '._IS_EMPTY.'</div>';
}
echo '</div>';
?>