AnalysisTemplate.tpl 5.11 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
33
		<div class="ng6-content-header-left analysis">
			<h2>Analysis <small>{$analyse.name}</small></h2>
		</div>
		<div class="ng6-content-header-right">
			{$analyse.description}
			<br />
			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
		</div>
		<div style="clear:both"></div>
Penom Nom's avatar
Penom Nom committed
37
38
39
	{/block}
</div>

40
41
42

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

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

Penom Nom's avatar
Penom Nom committed
46
47
			{block name=nav_menu_results}
				<li class="active"><a href="#results" data-toggle="tab">{block name=results_title} Results {/block}</a></li>
48
			{/block}
49

Penom Nom's avatar
Penom Nom committed
50
51
52
53
54
			{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}
55

Penom Nom's avatar
Penom Nom committed
56
57
58
			{block name=nav_menu_downloads}
				<li><a href="#downloads" data-toggle="tab">{block name=downloads_title} Downloads {/block}</a></li>
			{/block}
59

60
61
			{assign var="comment_tab" value="analysis_comments"}
			<li><a href="#{$comment_tab}" data-toggle="tab">Comments</a></li>
62

Penom Nom's avatar
Penom Nom committed
63
64
			{block name=nav_menu_update}{/block}
		</ul>
65
66


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

Penom Nom's avatar
Penom Nom committed
69
70
71
72
73
			{block name=tab_content_results}
				<div class="tab-pane fade in active" id="results">
					{block name=results}{/block}
				</div>
			{/block}
74

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

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

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

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

Penom Nom's avatar
Penom Nom committed
146
			{block name=tab_content_update}{/block}
147
148
149
150
		</div>
	{/block}
</div>

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