AnalysisTemplate.tpl 5.33 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.
Penom Nom's avatar
Penom Nom committed
34
			{block name=description_update}{/block}
35
36
37
38
39
			{if $analysis_data_state == 'stored'}
				The analysis data is <strong>stored</strong>. It will be kept until {$analysis_retention_date}.<br/>
			{else}
				The analysis data has been <strong>purged</strong>.<br/>
			{/if}
40
41
		</div>
		<div style="clear:both"></div>
Penom Nom's avatar
Penom Nom committed
42
43
44
	{/block}
</div>

45
46
47

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

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

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

Penom Nom's avatar
Penom Nom committed
55
56
57
58
59
			{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}
60

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

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

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


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

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

Penom Nom's avatar
Penom Nom committed
80
81
82
83
84
			{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
85
							{assign var="params" value=";"|explode:$analyse.params}
Penom Nom's avatar
Penom Nom committed
86
							<ul>
Penom Nom's avatar
Penom Nom committed
87
88
89
							    {foreach from=$params item=current_param}
								    <li class="parameter">{$current_param}</li>
								{/foreach}
Penom Nom's avatar
Penom Nom committed
90
91
							</ul>
							{/block}
92

Penom Nom's avatar
Penom Nom committed
93
94
95
96
97
98
99
							{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>
100
101
									<span class="editable editable-block-content"
										id="editable-command-line" data-pk="{$analyze_id}"
Penom Nom's avatar
Penom Nom committed
102
103
104
105
106
107
108
										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}
109
					</div>
Penom Nom's avatar
Penom Nom committed
110
111
				{/if}
			{/block}
112

Penom Nom's avatar
Penom Nom committed
113
114
115
116
			{block name=tab_content_downloads}
				<div class="tab-pane fade" id="downloads">
					{block name=download}
						{assign var="nb_files" value=0}
117
						{$dir=$data_folder|cat:$analyse.directory}
118
						{foreach $dir|scandir as $file}
119
							{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
Penom Nom's avatar
Penom Nom committed
120
121
122
							{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
								{$nb_files = $nb_files + 1}
							{/if}
123
						{/foreach}
124
						{if $nb_files == 0}
Penom Nom's avatar
Penom Nom committed
125
							<div class="alert alert-info">
Romain Therville's avatar
Romain Therville committed
126
127
128
129
130
								{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
131
132
133
							</div>
						{else}
							<ul>
Romain Therville's avatar
Romain Therville committed
134
								<div class="alert alert-info" name="retention-info">
Romain Therville's avatar
Romain Therville committed
135
									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
136
								</div>
Penom Nom's avatar
Penom Nom committed
137
								{foreach $dir|scandir as $file}
138
								{assign var="link" value=(('fileadmin'|cat:'/'|cat:$analyse.directory)|cat:'/')|cat:$file}
Penom Nom's avatar
Penom Nom committed
139
140
141
142
143
144
145
146
								{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>
147
			{/block}
148

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

Penom Nom's avatar
Penom Nom committed
151
			{block name=tab_content_update}{/block}
152
153
154
155
		</div>
	{/block}
</div>

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