Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
1e1b0aa4
Commit
1e1b0aa4
authored
8 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FIX #4278 add optgroup in list users visa circuit
parent
26111148
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
visa/trunk/load_listmodel_visa.php
+38
-14
38 additions, 14 deletions
visa/trunk/load_listmodel_visa.php
with
38 additions
and
14 deletions
visa/trunk/load_listmodel_visa.php
+
38
−
14
View file @
1e1b0aa4
...
...
@@ -85,16 +85,28 @@ require_once "modules" . DIRECTORY_SEPARATOR . "visa" . DIRECTORY_SEPARATOR
$content
.
=
'<tr '
.
$color
.
'>'
;
$content
.
=
'<td>'
;
$tab_users
=
$visa
->
getUsersVis
();
$content
.
=
'<span id="rank_'
.
$seq
.
'"> <span class="nbResZero" style="font-weight:bold;opacity:0.5;">'
.
(
$seq
+
1
)
.
'</span> </span>'
;
$content
.
=
'<select id="conseiller_'
.
$seq
.
'" name="conseiller_'
.
$seq
.
'" >'
;
$content
.
=
'<option value="" >Sélectionnez un utilisateur</option>'
;
foreach
(
$tab_users
as
$user
){
$selected
=
" "
;
if
(
$user
[
'id'
]
==
$step
[
'user_id'
])
$selected
=
" selected"
;
$content
.
=
'<option value="'
.
$user
[
'id'
]
.
'" '
.
$selected
.
'>'
.
$user
[
'lastname'
]
.
', '
.
$user
[
'firstname'
]
.
'</option>'
;
$content
.
=
'<option value="" >Sélectionnez un utilisateur</option>'
;
$tab_userentities
=
$visa
->
getEntityVis
();
/** Order by parent entity **/
foreach
(
$tab_userentities
as
$key
=>
$value
)
{
$content
.
=
'<optgroup label="'
.
$tab_userentities
[
$key
][
'entity_id'
]
.
'">'
;
$tab_users
=
$visa
->
getUsersVis
(
$tab_usergroups
[
$key
][
'group_id'
]);
foreach
(
$tab_users
as
$user
){
if
(
$tab_userentities
[
$key
][
'entity_id'
]
==
$user
[
'entity_id'
]){
$selected
=
" "
;
if
(
$user
[
'id'
]
==
$step
[
'user_id'
])
$selected
=
" selected"
;
$content
.
=
'<option value="'
.
$user
[
'id'
]
.
'" '
.
$selected
.
'>'
.
$user
[
'lastname'
]
.
', '
.
$user
[
'firstname'
]
.
'</option>'
;
}
}
$content
.
=
'</optgroup>'
;
}
$content
.
=
'</select>'
;
$content
.
=
"</select>"
;
$content
.
=
"<span id=
\"
signatory_"
.
$seq
.
"
\"
>"
;
...
...
@@ -141,14 +153,26 @@ require_once "modules" . DIRECTORY_SEPARATOR . "visa" . DIRECTORY_SEPARATOR
$tab_users
=
$visa
->
getUsersVis
();
$content
.
=
'<span id="rank_'
.
$seq
.
'"> <span class="nbResZero" style="font-weight:bold;opacity:0.5;">'
.
(
$seq
+
1
)
.
'</span> </span>'
;
$content
.
=
'<select id="conseiller_'
.
$seq
.
'" name="conseiller_'
.
$seq
.
'" >'
;
$content
.
=
'<option value="" >Sélectionnez un utilisateur</option>'
;
foreach
(
$tab_users
as
$user
){
$selected
=
" "
;
if
(
$user
[
'id'
]
==
$circuit
[
'sign'
][
'users'
][
0
][
'user_id'
])
$selected
=
" selected"
;
$content
.
=
'<option value="'
.
$user
[
'id'
]
.
'" '
.
$selected
.
'>'
.
$user
[
'lastname'
]
.
', '
.
$user
[
'firstname'
]
.
'</option>'
;
$content
.
=
'<option value="" >Sélectionnez un utilisateur</option>'
;
$tab_userentities
=
$visa
->
getEntityVis
();
/** Order by parent entity **/
foreach
(
$tab_userentities
as
$key
=>
$value
)
{
$content
.
=
'<optgroup label="'
.
$tab_userentities
[
$key
][
'entity_id'
]
.
'">'
;
$tab_users
=
$visa
->
getUsersVis
(
$tab_usergroups
[
$key
][
'group_id'
]);
foreach
(
$tab_users
as
$user
){
if
(
$tab_userentities
[
$key
][
'entity_id'
]
==
$user
[
'entity_id'
]){
$selected
=
" "
;
if
(
$user
[
'id'
]
==
$circuit
[
'sign'
][
'users'
][
0
][
'user_id'
])
$selected
=
" selected"
;
$content
.
=
'<option value="'
.
$user
[
'id'
]
.
'" '
.
$selected
.
'>'
.
$user
[
'lastname'
]
.
', '
.
$user
[
'firstname'
]
.
'</option>'
;
}
}
$content
.
=
'</optgroup>'
;
}
$content
.
=
"
</select>
"
;
$content
.
=
'
</select>
'
;
$content
.
=
"<span id=
\"
signatory_' .
$j
. '
\"
> <i title=
\"
Signataire
\"
style=
\"
color : #fdd16c
\"
class=
\"
fa fa-certificate fa-lg fa-fw
\"
></i></span>"
;
$content
.
=
"</td>"
;
...
...
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