Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

all.html 3.46 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
{{extend 'db_layout.html'}}
{{import vidjil_utils}}

{{total_file_count = 0 ; total_size = 0}}

<h3></h3>

<div class="db_block">
    <div class="db_block_left">
        search
11
        <input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}"  onchange="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'filter' : this.value} )">
12
    </div>
13 14 15
    <div class="db_block_right">
        page:
        {{ if page > 0: }}
16
            <div class="button" onclick="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'page': {{=page-1}}})"><</div>
17 18 19
        {{ pass }}
	{{= page + 1 }}
        {{if len(query) > step : }}
20
            <div class="button" onclick="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'page': {{=page+1}}})">></div>
21 22
        {{ pass }}
    </div>
23 24 25 26 27
</div>

<div id="db_table_container">
    <table class="db_table" id="table">
        <thead>
28
	    <tr>
HERBERT Ryan's avatar
HERBERT Ryan committed
29
            {{ for header in fields: }}
30 31
	        {{if isAdmin or header['public']:}}
	            <td class="{{if header['width']:}}column_{{=header['width']}}{{pass}} pointer"
32
                 onclick="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'sort' : '{{=header['sort']}}', 'filter' : '{{=request.vars["filter"]}}'
33
		            {{if not reverse and request.vars["sort"]==header['sort'] :}} , 'reverse' : true {{pass}} })">
34 35 36 37
                        {{=header['name']}}
                    </td>
                {{ pass }}
            {{ pass }}
38 39 40 41 42 43 44 45
                
                <td class="column5"> </td>
                <td class="column5"> </td>
                <td class="column5"> </td>
            </tr>
        </thead>
        
        
HERBERT Ryan's avatar
HERBERT Ryan committed
46 47
       {{for i in range(0, min(len(query), step)) :}}
           {{data = query[i]}}
HERBERT Ryan's avatar
HERBERT Ryan committed
48 49
           <tr class="pointer" onclick="db.call('sample_set/index', {'id' :'{{=data.sample_set_id}}' , 'config_id' : {{=data.most_used_conf}} } )" >
               {{ for field in fields: }}
50
  		   <td>
HERBERT Ryan's avatar
HERBERT Ryan committed
51
		       {{= field['call'](data)}}
52 53
                   </td>
               {{ pass }}
54 55 56 57 58
            {{ total_file_count += data.file_count ; total_size += data.size }}
               
{{if isAdmin:}} <td onclick="db.call('sample_set/permission', {'id' :'{{=data.id}}'} )" > <i class="icon-key" title="set permissions"></i> </td> {{else:}} <td></td> {{pass}}
                {{if data.has_permission:}}
		<td onclick="db.call('sample_set/edit', {'id' :'{{=data.id}}'} )" > <i class="icon-pencil-2" title="{{='edit %s information' % 'sample_set'}}"></i> </td>
59
		<td onclick="db.call('sample_set/confirm', {'id' :'{{=data.id}}'} )" > <i class="icon-erase" title="{{='delete %s' % helper.get_type()}}"></i> </td>
60 61 62 63 64 65 66 67 68 69 70 71
                {{else:}}  <td></td><td></td>{{pass}}
            </tr>
        {{pass}}

    </table>
    <table class="db_table" id="db_fixed_header"></table>
</div>

<div class="db_block">
    <div class="db_block_left">

{{if auth.can_create_patient():}}
72
<span class="button2" onclick="db.call('{{=helper.get_add_route()}}')"> + new {{=helper.get_type()}} </span>
73 74
<span class="button2" onclick="db.call('sample_set/custom', {'filter': '{{=request.vars['filter']}}' })"> compare samples/patients </span>
{{else:}}
75
<!-- <span class="button2 inactive" onclick="db.call('sample_set/add')" title="you don't have permission to create new {{=type}}"> add sample_set </span> -->
76 77 78 79 80
{{pass}}

  </div>
  <div class="db_block_right">
  <br />
81
  {{ =min(step, len(query)) }} {{=type}}s, {{ =total_file_count }} files ({{ =vidjil_utils.format_size(total_size) }})
82 83
  </div>
</div>