Skip to content
Snippets Groups Projects
Commit 0e5f8cf3 authored by Marco De Donno's avatar Marco De Donno
Browse files

Only list the assiged users for admin account

parent 954e8bf5
No related branches found
No related tags found
No related merge requests found
......@@ -177,38 +177,40 @@
<div id="zoom_slider"></div>
</div>
<script type="text/javascript">
$( "#icnml_navigation_afis" )
.addClass( "activated" );
var users_assigned_refs = [];
{% for user in users_assigned_refs %}
users_assigned_refs.push( "{{ user[ 'id' ] }}" );
{% endfor %}
$( "#users_select_refs" )
.val( users_assigned_refs ).trigger( "chosen:updated" );
var users_assigned_marks = [];
{% for user in users_assigned_marks %}
users_assigned_marks.push( "{{ user[ 'id' ] }}" );
{% endfor %}
$( "#users_select_marks" )
.val( users_assigned_marks ).trigger( "chosen:updated" );
{% if admin %}
$( "#users_select_marks" ).on( "change", update_users_in_db )
$( "#users_select_refs" ).on( "change", update_users_in_db )
var users_assigned_refs = [];
{% for user in users_assigned_refs %}
users_assigned_refs.push( "{{ user[ 'id' ] }}" );
{% endfor %}
$( "#users_select_refs" )
.val( users_assigned_refs ).trigger( "chosen:updated" );
var users_assigned_marks = [];
{% for user in users_assigned_marks %}
users_assigned_marks.push( "{{ user[ 'id' ] }}" );
{% endfor %}
$( "#users_select_marks" )
.val( users_assigned_marks ).trigger( "chosen:updated" );
{% if admin %}
$( "#users_select_marks" ).on( "change", update_users_in_db )
$( "#users_select_refs" ).on( "change", update_users_in_db )
{% endif %}
$( "#users_select_marks" )
.chosen( {
search_contains: true,
width: "50%"
} );
$( "#users_select_refs" )
.chosen( {
search_contains: true,
width: "50%"
} );
{% endif %}
$( "#users_select_marks" )
.chosen( {
search_contains: true,
width: "50%"
} );
$( "#users_select_refs" )
.chosen( {
search_contains: true,
width: "50%"
} );
$( "#icnml_navigation_afis" )
.addClass( "activated" );
$( "#navloc" ).append(
$( "<a />" )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment