Commit 9e93194a authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

refactoring the generation of config links to ensure they are separated correctly

parent 83feeab4
...@@ -48,16 +48,16 @@ ...@@ -48,16 +48,16 @@
<td> {{ if row['birth'] is not None: }} {{=row['birth'] }} {{ pass }} </td> <td> {{ if row['birth'] is not None: }} {{=row['birth'] }} {{ pass }} </td>
<td> {{=row['info'] }} </td> <td> {{=row['info'] }} </td>
<td> <td>
{{ configs = [] }}
{{for conf in row['conf_list'] :}} {{for conf in row['conf_list'] :}}
{{filename = vidjil_utils.anon_ids(row['id']) + " (" + conf['name'] + ")"}} {{filename = vidjil_utils.anon_ids(row['id']) + " (" + conf['name'] + ")"}}
{{if conf['fused_file'] is not None :}} {{if conf['fused_file'] is not None :}}
<a href="index.html?patient={{=row['id']}}&config={{=conf['id']}}" type="text/html" {{ configs.append(str(A(conf['name'], _href="index.html?patient=" + str(row['id']) + "&config=" + str(conf['id']), _type="text/html",
onclick="event.preventDefault() _onclick="event.preventDefault();event.stopPropagation();if( event.which == 2 ) { window.open(this.href); } else { db.load_data( { 'patient' : '" + str(row['id']) + "' , 'config' : " + str(conf['id']) + " }, '" + filename + "' ); }"))) }}
event.stopPropagation() {{else:}}
if( event.which == 2 ) { window.open(this.href) } {{ configs.append(config['name']) }}
else { db.load_data( { 'patient' : '{{=row['id']}}' , 'config' : {{=conf['id']}} }, '{{=filename}}' ) }" >
{{pass}} {{pass}}
{{=conf['name']}} </a> {{= XML(", ".join(configs)) }}
{{pass}} {{pass}}
</td> </td>
{{if isAdmin:}} <td> {{=row['groups']}}</td>{{pass}} {{if isAdmin:}} <td> {{=row['groups']}}</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