Commit 479944e6 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team

patient/index.html: adds a "users" column for admin

It is actually the group id.
parent 62526687
......@@ -29,6 +29,9 @@ query = db(
<td class="column_100"> birth </td>
<td> info </td>
<td class="column_100"> configs </td>
{{if auth.has_membership("admin"):}}
<td class="column_100"> users </td>
{{pass}}
<td class="column_100"> files </td>
<td class="column5"> </td>
<td class="column5"> </td>
......@@ -47,6 +50,21 @@ query = db(
<td> {{for row2 in db( db.fused_file.patient_id == row.patient.id ).select(db.fused_file.config_id, distinct=True) :}}
{{=db.config[row2.config_id].name}}
{{pass}}</td>
<!-- groups/users -->
{{if auth.has_membership("admin"):}}
<td>
{{for row3 in db(
(db.auth_permission.name == "read") &
(db.auth_permission.table_name == "patient") &
(db.auth_permission.record_id == row.patient.id)
).select( orderby=db.auth_permission.group_id, distinct=True ) :}}
{{if db.auth_permission[row3.id].group_id > 2:}}
{{=db.auth_permission[row3.id].group_id}}
{{pass}}
{{pass}}
</td>
{{pass}}
<!-- end groups/users -->
<td> {{=row[count]}}</td>
{{if auth.has_membership("admin"):}}
<td onclick="db.call('patient/permission', {'id' :'{{=row.patient.id}}'} )" > p </td> {{else:}} <td></td> {{pass}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment