AnalysisTemplate.tpl 6.03 KB
Newer Older
1
2
{*
Copyright (C) 2009 INRA
3

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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/>.
*}

<input type="hidden" id="analyse_name" value="{$analyse.name}"/>
19
20
<input type="hidden" id="view" value="analyze" />
<input type="hidden" id="ids" value="{$analyze_id}" />
Penom Nom's avatar
Penom Nom committed
21
<input type="hidden" id="server_url" value="{$server_url}" />
22
<input type="hidden" id="user_login" value="{$user_login}" />
23
<input type="hidden" id="user_id" value="{$user_id}" />
Penom Nom's avatar
Penom Nom committed
24
25
26

<div class="sub-content sc-top">
	{block name=description}
27
28
29
30
31
32
		<div class="ng6-content-header-left analysis">
			<h2>Analysis <small>{$analyse.name}</small></h2>
		</div>
		<div class="ng6-content-header-right">
			{$analyse.description}
			<br />
33
			All data related to this analysis use <strong> {$analyse_size} </strong> on the hard drive.<br/>
Penom Nom's avatar
Penom Nom committed
34
			{block name=description_update}{/block}
35
			{if $analysis_data_state == 'stored'}
36
				The analysis data is <strong>stored</strong>. It will be kept until <strong>{$analysis_retention_date}</strong>.<br/>
Romain Therville's avatar
Romain Therville committed
37
			{elseif $analysis_data_state == 'purged'}
38
				The analysis data has been <strong>purged</strong> on <strong>{$analysis_purge_date}</strong>.<br/>
Romain Therville's avatar
Romain Therville committed
39
			{elseif $analysis_data_state == 'extended'}
40
				The analysis data retention has been <strong>extended</strong> to <strong>{$analysis_retention_date}</strong>.<br/>
41
			{/if}
42
43
		</div>
		<div style="clear:both"></div>
Penom Nom's avatar
Penom Nom committed
44
45
46
	{/block}
</div>

47
48
49

<div class="sub-content sc-bottom">
	{block name=content}
50

Penom Nom's avatar
Penom Nom committed
51
		<ul id="myTab" class="nav nav-tabs">
52

Penom Nom's avatar
Penom Nom committed
53
54
			{block name=nav_menu_results}
				<li class="active"><a href="#results" data-toggle="tab">{block name=results_title} Results {/block}</a></li>
55
			{/block}
56

Penom Nom's avatar
Penom Nom committed
57
58
59
60
61
			{block name=nav_menu_params}
				{if $analyse.params != ""}
				<li><a href="#parameters" data-toggle="tab">{block name=params_title} Parameters {/block}</a></li>
				{/if}
			{/block}
62

Penom Nom's avatar
Penom Nom committed
63
64
65
			{block name=nav_menu_downloads}
				<li><a href="#downloads" data-toggle="tab">{block name=downloads_title} Downloads {/block}</a></li>
			{/block}
66

67
68
			{assign var="comment_tab" value="analysis_comments"}
			<li><a href="#{$comment_tab}" data-toggle="tab">Comments</a></li>
69

Penom Nom's avatar
Penom Nom committed
70
71
			{block name=nav_menu_update}{/block}
		</ul>
72
73


Penom Nom's avatar
Penom Nom committed
74
		<div id="myTabContent" class="tab-content">
75

Penom Nom's avatar
Penom Nom committed
76
77
78
79
80
			{block name=tab_content_results}
				<div class="tab-pane fade in active" id="results">
					{block name=results}{/block}
				</div>
			{/block}
81

Penom Nom's avatar
Penom Nom committed
82
83
84
85
86
			{block name=tab_content_params}
				{if $analyse.params != ""}
					<div class="tab-pane fade" id="parameters">
						{block name=params}
							{block name=params_content}
Penom Nom's avatar
Penom Nom committed
87
							{assign var="params" value=";"|explode:$analyse.params}
Penom Nom's avatar
Penom Nom committed
88
							<ul>
Penom Nom's avatar
Penom Nom committed
89
90
91
							    {foreach from=$params item=current_param}
								    <li class="parameter">{$current_param}</li>
								{/foreach}
Penom Nom's avatar
Penom Nom committed
92
93
							</ul>
							{/block}
94

Penom Nom's avatar
Penom Nom committed
95
96
97
98
99
100
101
							{block name=command_line_content}
								{if $is_project_admin && $analyse.is_editable }
								<br/>
								<br/>
								<div class="editable-block">
									<span class="editable-block-head label label-info">Command</span>
									<i>{$analyse.software}</i>
102
103
									<span class="editable editable-block-content"
										id="editable-command-line" data-pk="{$analyze_id}"
Penom Nom's avatar
Penom Nom committed
104
105
106
107
108
109
110
										data-url="index.php?eID=tx_nG6&type=update_db_field&table=tx_nG6_analyze&field=params" data-type="textarea" >
										{$analyse.params}
									</span>
								</div>
								{/if}
							{/block}
						{/block}
111
					</div>
Penom Nom's avatar
Penom Nom committed
112
113
				{/if}
			{/block}
114

Penom Nom's avatar
Penom Nom committed
115
116
117
118
			{block name=tab_content_downloads}
				<div class="tab-pane fade" id="downloads">
					{block name=download}
						{assign var="nb_files" value=0}
119
						{$dir=$data_folder|cat:$analyse.directory}
120
						{foreach $dir|scandir as $file}
121
							{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
Penom Nom's avatar
Penom Nom committed
122
123
124
							{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
								{$nb_files = $nb_files + 1}
							{/if}
125
						{/foreach}
126
						{if $nb_files == 0}
Penom Nom's avatar
Penom Nom committed
127
							<div class="alert alert-info">
Romain Therville's avatar
Romain Therville committed
128
129
130
131
132
								{if $analyse.data_state=="purged"}
									The data have been purged.  (Retention limit : {$analyse.retention_date|date_format})
								{else}
									Results folder not synchronized yet...
								{/if}
Penom Nom's avatar
Penom Nom committed
133
134
135
							</div>
						{else}
							<ul>
Romain Therville's avatar
Romain Therville committed
136
								<div class="alert alert-info" name="retention-info">
Romain Therville's avatar
Romain Therville committed
137
									Retention date is {$analyse.retention_date|date_format}. After this deadline, these data will no longer be available. Only metadata and quality control results will remain in NG6.
Romain Therville's avatar
Romain Therville committed
138
								</div>
Audrey Gibert's avatar
Audrey Gibert committed
139
140
141
142
								<br />
								<div class="alert alert-info" name="DownloadData_analysis">
									<p style="text-align: center;">You can download your files easily with <a href="https://ng6.toulouse.inra.fr/index.php?id=59" target="_blank"><strong>Menu > Download</strong></a>. Please visit the <a href="https://ng6.toulouse.inra.fr/index.php?id=57" target="_blank"><strong>FAQ</strong></a> > "How to get my data?" section to know more.</p>
								</div>
Penom Nom's avatar
Penom Nom committed
143
								{foreach $dir|scandir as $file}
144
								{assign var="link" value=(('fileadmin'|cat:'/'|cat:$analyse.directory)|cat:'/')|cat:$file}
Penom Nom's avatar
Penom Nom committed
145
146
147
148
149
150
151
152
								{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
									<li class="filelist"><a href="{$link}">{$file}</a> </li>
								{/if}
								{/foreach}
							</ul>
						{/if}
					{/block}
				</div>
153
			{/block}
154

155
			{include file='../comments.tpl' comments=$comments  tab_id=$comment_tab  add_new_comment=$is_project_admin  user_id=$user_id}
156

Penom Nom's avatar
Penom Nom committed
157
			{block name=tab_content_update}{/block}
158
159
160
161
		</div>
	{/block}
</div>

162
{include file='../../template/modals.tpl'}