class.tx_nG6_eid.php 9.49 KB
Newer Older
Penom Nom's avatar
Penom Nom committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
{*
Copyright (C) 2009 INRA
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*}

<div id="user_information_dialog" title=""></div>
<div id="error_dialog" title=""></div>
		
<input type="hidden" id="cancel_btn_label" value="{$llang.cancel_btn_label}" />
<input type="hidden" id="ok_btn_label" value="{$llang.ok_btn_label}" />
<input type="hidden" id="yes_btn_label" value="{$llang.yes_btn_label}" />
<input type="hidden" id="no_btn_label" value="{$llang.no_btn_label}" />
<input type="hidden" id="confirmation_dialog_title" value="{$llang.confirmation_dialog_title}" />
<input type="hidden" id="information_error_title" value="{$llang.information_error_title}" />
<input type="hidden" id="hide_dialog_title" value="{$llang.hide_dialog_title}" />
<input type="hidden" id="hide_confirmation_msg" value="{$llang.hide_confirmation_msg}" />
<input type="hidden" id="unhide_dialog_title" value="{$llang.unhide_dialog_title}" />
<input type="hidden" id="unhide_confirmation_msg" value="{$llang.unhide_confirmation_msg}" />
<input type="hidden" id="information_error_msg" value="{$llang.information_error_msg}" />
		
<input type="hidden" id="information_dialog_zero_check" value="{$llang.information_dialog_zero_check}" />
<input type="hidden" id="delete_confirmation_msg" value="{$llang.delete_confirmation_msg}" />
<input type="hidden" id="deleting_dialog_msg" value="{$llang.deleting_dialog_msg}" />
<input type="hidden" id="delete_authentication_dialog_msg" value="{$llang.delete_authentication_dialog_msg|replace:'###SPAN_SERVER###':$server_name}" />
		
<input type="hidden" id="user_login" value="{$llang.user_login}" />
<input type="hidden" id="user_pwd" value="{$llang.user_pwd}" />
<input type="hidden" id="user_group" value="{$user_group}" />
		
<input type="hidden" id="deleting_dialog_title" value="{$llang.deleting_dialog_title}" />
<input type="hidden" id="delete_success_msg" value="{$llang.delete_success_msg}" />
<input type="hidden" id="delete_dialog_rigth_error" value="{$llang.delete_dialog_rigth_error}" />
<input type="hidden" id="delete_dialog_authentification_error" value="{$llang.delete_dialog_authentification_error}" />
<input type="hidden" id="delete_dialog_connection_error" value="{$llang.delete_dialog_connection_error}" />

<input type="hidden" id="DataTables_length_menu" value="{$llang.DataTables_length_menu}" />
<input type="hidden" id="DataTables_zero_records" value="{$llang.DataTables_zero_records}" />
<input type="hidden" id="DataTables_info" value="{$llang.DataTables_info}" />
<input type="hidden" id="DataTables_info_empty" value="{$llang.DataTables_info_empty}" />
<input type="hidden" id="DataTables_info_filtered" value="{$llang.DataTables_info_filtered}" />
<input type="hidden" id="DataTables_search" value="{$llang.DataTables_search}" />
<input type="hidden" id="DataTables_pagination_first" value="{$llang.DataTables_pagination_first}" />
<input type="hidden" id="DataTables_pagination_last" value="{$llang.DataTables_pagination_last}" />
<input type="hidden" id="DataTables_pagination_next" value="{$llang.DataTables_pagination_next}" />
<input type="hidden" id="DataTables_pagination_previous" value="{$llang.DataTables_pagination_previous}" />

<input type="hidden" id="Jeditable_dblClickTitle" value="{$llang.Jeditable_dblClickTitle}" />

<input type="hidden" id="Datepicker_closeText" value="{$llang.Datepicker_closeText}" />
<input type="hidden" id="Datepicker_prevText" value="{$llang.Datepicker_prevText}" />
<input type="hidden" id="Datepicker_nextText" value="{$llang.Datepicker_nextText}" />
<input type="hidden" id="Datepicker_currentText" value="{$llang.Datepicker_currentText}" />
<input type="hidden" id="Datepicker_monthNames" value="{$llang.Datepicker_monthNames}" />
<input type="hidden" id="Datepicker_monthNamesShort" value="{$llang.Datepicker_monthNamesShort}" />
<input type="hidden" id="Datepicker_dayNames" value="{$llang.Datepicker_dayNames}" />
<input type="hidden" id="Datepicker_dayNamesShort" value="{$llang.Datepicker_dayNamesShort}" />
<input type="hidden" id="Datepicker_dayNamesMin" value="{$llang.Datepicker_dayNamesMin}" />
<input type="hidden" id="Datepicker_weekHeader" value="{$llang.Datepicker_weekHeader}" />

<input type="hidden" id="data_folder" value="{$data_folder}" />	
<input type="hidden" id="view" value="run" />
<input type="hidden" id="ids" value="{$run_ids}" />

{* If no runs can be displayed *}
{if $runs|@count == 0 }
	{$llang.no_raw}
	
{* If a single run has to be displayed *}
{elseif $runs|@count == 1}
	<div class="run">
		<h2>{$llang.run} {$runs[$first_id].name} :</h2>
		<p><strong>{$runs[$first_id].description}</strong> <br />
		{if $run_analysis|@count > 0} 
			{($llang.miltiple_analysis_run_desc|replace:"###RUN_NAME###":$runs[$first_id].name)|replace:"###NB_ANALYSIS###":($run_analysis|@count)}  
		{else}
			{($llang.single_analysis_run_desc|replace:"###RUN_NAME###":$runs[$first_id].name)|replace:"###NB_ANALYSIS###":($run_analysis|@count)}
		{/if}
		<br />
		{assign var="run_size" value="<span id='size' class='tx-nG6-mini-wait'></span>"}
		{($llang.run_desc|replace:"###RUN_SIZE###":"<strong>###RUN_SIZE###</strong>")|replace:"###RUN_SIZE###":$run_size}
		</p>
	</div>
	<table class="tx-nG6-pi1-listrow">
		<tr>
			<th align="left">{$llang.project_name}</th>
			<th align="left">{$llang.date}</th>
			<th align="left">{$llang.species}</th>
			<th align="left">{$llang.type}</th>
			<th align="left">{$llang.data_nature}</th>
			<th align="left">{$llang.nb_sequences}</th>
			<th align="left">{$llang.full_seq_size}</th>
			<th align="left">{$llang.sequencer}</th>
		</tr>	
		<tr>
			<td align="left">{$runs[$first_id].project_name}</td>
			<td align="left">{$runs[$first_id].date|date_format:"%d-%m-%y"}</td>
			<td align="left">{$runs[$first_id].species}</td>
			<td align="left">{$runs[$first_id].type}</td>
			<td align="left">{$runs[$first_id].data_nature}</td>
			<td align="left">{$runs[$first_id].nb_sequences|number_format:0:' ':' '}</td>
			<td align="left">{$runs[$first_id].full_seq_size|number_format:0:' ':' '}</td>
			<td align="left">{$runs[$first_id].sequencer}</td>
		</tr>
	</table>
	<h3> {$llang.downloads} : </h3>
	<div class="underline"> </div>
	<p><ul>
	{$dir=$data_folder|cat:$runs[$first_id].directory}
	{assign var="nb_files" value=0}
	{foreach $dir|scandir as $file}
		{if $file != "." and $file !="" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
			{$link=(('fileadmin'|cat:$runs[$first_id].directory)|cat:'/')|cat:$file}
			<li><a href="{$link}">{$file}</a> <br /></li>
			{$nb_files = $nb_files + 1}
		{/if}
	{/foreach}
	</ul></p>
	{if $nb_files == 0} 
		<p>{$llang.not_synchro}</p>
	{/if}
	<br />
	{* If there is some analysis to display *}
	{if $run_analysis|@count > 0}
		<h3> {$llang.analyzes_done} </h3>
		<div class="underline"> </div>
		<br />
		{* Find out if the current user is super user of an analysis *}
		{assign var="superuser" value=false}
		{foreach from=$run_analysis key=analysis_id item=analysis_values}
			{if $analysis_values.superuser && !$superuser}
				{assign var="superuser" value=true}
			{elseif !$superuser}
				{assign var="superuser" value=false}
			{/if}
		{/foreach}
		<table class="display" id="analysis_data_table">
			<thead>
				<tr>
					{if $superuser && $login_user}
					<th><center><input type="checkbox" id="chk_all_analysis"></center></th>
					{/if}
					<th nowrap>{$llang.name}</th>
					<th>{$llang.description}</th>
					<th>{$llang.software}</th>
					<th>{$llang.version}</th>
				</tr>
			</thead>
			<tbody>
				{include file="recursive_list_analysis_display.tpl" element=$h_run_analysis prof=0}
			</tbody>
			{if $superuser && $login_user}
				<tfoot>
					<tr>
						<th align="left" colspan="5">
							{$llang.toolbar_title}
							<button id="hide_analysis" type="button" class="btn pill-l"><span><span>{$llang.hide_btn}</span></span></button><button id="unhide_analysis" type="button" class="btn pill-r"><span><span>{$llang.unhide_btn}</span></span></button>
							&nbsp;<button id="delete_analysis" type="button" class="btn"><span><span>{$llang.delete_btn}</span></span></button>
						</th>
					</tr>
				</tfoot>
			{/if}
		</table>
	{/if}
	
{* If multiple runs have to be displayed *}
{else}
	{* Find out if the current user is super user of a run *}
	{assign var="superuser" value=false}
	{foreach from=$runs key=run_id item=run_values}
		{if $run_values.superuser && !$superuser}
			{assign var="superuser" value=true}
		{elseif !$superuser}
			{assign var="superuser" value=false}
		{/if}
	{/foreach}
	{* Then display the table *}
	<div class="run">
		<h2>{$llang.run_list}</h2>
		<p>
		{$llang.list_run_desc|replace:"###NB_RUN###":($runs|@count)}  
		<br />
		{assign var="run_size" value="<span id='size' class='tx-nG6-mini-wait'></span>"}
		{($llang.run_desc|replace:"###RUN_SIZE###":"<strong>###RUN_SIZE###</strong>")|replace:"###RUN_SIZE###":$run_size}
		</p>
	</div>
	<br />
	{include file='run_table.tpl'}
	
{/if}