run_view.tpl 7.27 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
{*
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>

Jerome Mariette's avatar
Jerome Mariette committed
21
22
<input type="hidden" id="server_name" value="{$server_name}" />
<input type="hidden" id="user_id" value="{$user_id}" />
Penom Nom's avatar
Penom Nom committed
23
24
25
<input type="hidden" id="data_folder" value="{$data_folder}" />	
<input type="hidden" id="view" value="run" />
<input type="hidden" id="ids" value="{$run_ids}" />
Jerome Mariette's avatar
Jerome Mariette committed
26
<input type="hidden" id="login_user" value="{$login_user}" />
Jerome Mariette's avatar
Jerome Mariette committed
27
<input type="hidden" id="user_login" value="{$user_login}" />
Jerome Mariette's avatar
Jerome Mariette committed
28
<input type="hidden" id="server_url" value="{$server_url}" />
Penom Nom's avatar
Penom Nom committed
29
30

{* If no runs can be displayed *}
Jerome Mariette's avatar
Jerome Mariette committed
31
{if $runs|@count == 0 || ($runs|@count == 1 && $runs[key($runs)].hidden == 1 && !$runs[key($runs)].is_admin) }
Jerome Mariette's avatar
Jerome Mariette committed
32
	Sorry no results to display
Penom Nom's avatar
Penom Nom committed
33
34
	
{* If a single run has to be displayed *}
35
{elseif $single_run_display}
philippe's avatar
philippe committed
36
37
	<div class="sub-content sc-top">
		<div class="ng6-content-header-left run">
philippe's avatar
philippe committed
38
39
			<h2>Run <small>{$runs[key($runs)].name}</small></h2>
		</div>
philippe's avatar
philippe committed
40
		<div class="ng6-content-header-right">
Jerome Mariette's avatar
Jerome Mariette committed
41
42
			{$runs[key($runs)].description} <br/><br/>
			
philippe's avatar
philippe committed
43
44
			<div style="float:left;margin-right:25px">
				<p class="bullet"><strong>Project name: </strong> {$runs[key($runs)].project_name}</p>
Penom Nom's avatar
Penom Nom committed
45
				<p class="bullet"><strong>Date: </strong> {$runs[key($runs)].date|date_format:"%d/%m/%y"}</p>
philippe's avatar
philippe committed
46
47
48
49
50
51
52
53
54
				<p class="bullet"><strong>Species: </strong> {$runs[key($runs)].species}</p>
				<p class="bullet"><strong>Type: </strong> {$runs[key($runs)].type}</p>
			</div>
			<div style="float:left">
				<p class="bullet"><strong>Data nature: </strong> {$runs[key($runs)].data_nature}</p>
				<p class="bullet"><strong>Number of sequences: </strong> {$runs[key($runs)].nb_sequences|number_format:0:' ':' '}</p>
				<p class="bullet"><strong>Full sequences length: </strong> {$runs[key($runs)].full_seq_size|number_format:0:' ':' '}</p>
				<p class="bullet"><strong>Sequencer: </strong> {$runs[key($runs)].sequencer}</p>
			</div>
philippe's avatar
philippe committed
55
			<div style="clear:both"></div>
Jerome Mariette's avatar
Jerome Mariette committed
56
57
58
59
60
61
62
63
			{assign var="run_size" value="<span id='size' class='tx-nG6-mini-wait'></span>"}
			<br />
			Raw data and analysis results use <strong>{$run_size}</strong> on the hard drive.<br/>
			{if $run_analysis|@count > 0} 
				<strong>{$run_analysis|@count}</strong> analysis have been done on this run.
			{else}
				<strong>{$run_analysis|@count}</strong> analysis has been done on this run.
			{/if}
philippe's avatar
philippe committed
64
65
		</div>
		<div style="clear:both"></div>
Penom Nom's avatar
Penom Nom committed
66
	</div>
Jerome Mariette's avatar
Jerome Mariette committed
67
	
philippe's avatar
philippe committed
68
69
70
	<div class="sub-content sc-bottom">
		<ul id="myTab" class="nav nav-tabs">
			<li class="active"><a href="#analyses" data-toggle="tab">Analyses</a></li>
Penom Nom's avatar
Penom Nom committed
71
	 		<li><a href="#downloads" data-toggle="tab">Raw data</a></li>
philippe's avatar
philippe committed
72
73
74
75
76
77
		</ul>
		
		<div id="myTabContent" class="tab-content">
	 		<div class="tab-pane fade in active" id="analyses">
	 			{* Find out if an analysis table should be displayed *}
				{assign var="display_analysis_result" value=false}
78
				{foreach from=$h_analysis key=analysis_id item=analysis_values}
philippe's avatar
philippe committed
79
80
81
82
83
84
					{if $analysis_values.is_admin && $analysis_values.hidden == 1}
						{assign var="display_analysis_result" value=true}
					{elseif $analysis_values.hidden == 0}
						{assign var="display_analysis_result" value=true}
					{/if}
				{/foreach}
85
86
				{assign var="is_admin" value=$runs[key($runs)].is_admin}
				{include file='analysis_table.tpl'}
philippe's avatar
philippe committed
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
	 		</div>
	 		
	 		<div class="tab-pane fade" id="downloads">
	 			{$dir=$data_folder|cat:$runs[key($runs)].directory}
				{assign var="nb_files" value=0}
				<ul>
				{foreach $dir|scandir as $file}
					{if $file != "." and $file !="" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
						{$link=(('fileadmin'|cat:$runs[key($runs)].directory)|cat:'/')|cat:$file}
						<li class="filelist"><a href="{$link}">{$file}</a> <br /></li>
						{$nb_files = $nb_files + 1}
					{/if}
				{/foreach}
				</ul>
				{if $nb_files == 0} 
					<div class="alert alert-info">
						Results folder not synchronized yet...
	    			</div>
Jerome Mariette's avatar
Jerome Mariette committed
105
				{/if}
philippe's avatar
philippe committed
106
	 		</div>
Jerome Mariette's avatar
Jerome Mariette committed
107
108
 		</div>
 	</div>
Penom Nom's avatar
Penom Nom committed
109
110
111
112
	
{* If multiple runs have to be displayed *}
{else}
	{* Find out if the current user is super user of a run *}
Jerome Mariette's avatar
Jerome Mariette committed
113
	{assign var="is_at_least_admin_of_1_run" value=false}
Penom Nom's avatar
Penom Nom committed
114
	{foreach from=$runs key=run_id item=run_values}
Jerome Mariette's avatar
Jerome Mariette committed
115
116
117
118
		{if $run_values.is_admin && !$is_at_least_admin_of_1_run}
			{assign var="is_at_least_admin_of_1_run" value=true}
		{elseif !$is_at_least_admin_of_1_run}
			{assign var="is_at_least_admin_of_1_run" value=false}
Penom Nom's avatar
Penom Nom committed
119
120
121
		{/if}
	{/foreach}
	{* Then display the table *}
philippe's avatar
philippe committed
122
123
124
	<div class="sub-content sc-top">
		<div class="ng6-content-header-left run">
			<h2>Runs list <small> you can access </small></h2>
Jerome Mariette's avatar
Jerome Mariette committed
125
126
		</div>
		<div class="ng6-content-header-right">
philippe's avatar
philippe committed
127
128
129
130
131
132
			You have access to <strong>{$runs|@count}</strong> runs.
			<br />
			{assign var="run_size" value="<span id='size' class='tx-nG6-mini-wait'></span>"}
			Raw data and analysis results use <strong>{$run_size}</strong> on the hard drive.
		</div>
		<div style="clear:both"></div>
Penom Nom's avatar
Penom Nom committed
133
134
	</div>
	
philippe's avatar
philippe committed
135
136
137
	<div class="sub-content sc-bottom">
		{include file='run_table.tpl'}
	</div>	
Jerome Mariette's avatar
Jerome Mariette committed
138
139
140
141
142
143
{/if}

{* Modal initialization *}
{* Global tmpl *}
<div id="ng6modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="modal-label-tmpl" aria-hidden="true">
	<div class="modal-header">
Penom Nom's avatar
Penom Nom committed
144
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
Jerome Mariette's avatar
Jerome Mariette committed
145
146
147
148
149
150
151
152
153
		<h3 id="modal-label-tmpl">Modal header</h3>
	</div>
	<div id="modal-body-tmpl" class="modal-body"></div>
	<div id="modal-foot-tmpl" class="modal-footer"></div>
</div>

{* setAndRunModal *}
<div id="setAndRunModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="setAndRunModalLabel" aria-hidden="true">
	<div class="modal-header">
Penom Nom's avatar
Penom Nom committed
154
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
Jerome Mariette's avatar
Jerome Mariette committed
155
156
157
158
159
160
161
162
163
164
165
166
		<h3 id="setAndRunModalLabel"></h3>
	</div>
	<div id="setAndRunModalBody" class="modal-body"></div>
	<div class="modal-footer">
		<button id="reset_workflow" class="btn"><i class="icon-refresh"></i> Reset</button>
		<button id="run_workflow" class="btn btn-primary"><i class="icon-cog icon-white"></i> Run</button>
	</div>
</div>

{* statusModal *}
<div id="statusModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="statusModalLabel" aria-hidden="true">
	<div class="modal-header">
Penom Nom's avatar
Penom Nom committed
167
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
Jerome Mariette's avatar
Jerome Mariette committed
168
169
170
171
172
173
174
175
		<h3 id="statusModalLabel"></h3>
	</div>
	<div id="statusModalBody" class="modal-body"></div>
	<div class="modal-footer">
		<button id="refresh_workflow" class="btn"><i class="icon-refresh"></i> Refresh</button>
		<button id="rerun_workflow" class="btn btn-primary"><i class="icon-cog icon-white"></i> ReRun</button>
	</div>
</div>