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

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

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