Commit 9162db2f authored by Jerome Mariette's avatar Jerome Mariette
Browse files

add the hierarchical display

parent 3381ea09
{*
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="img_dialog" title=""></div>
<input type="hidden" id="analyse_name" value="{$analyse.name}"/>
<div class="analysis">
<h2>{$llang.analyse} {$analyse.name} :</h2>
<p><strong>{$analyse.description}</strong> <br />
<br />
{($llang.analyse_desc|replace:"###ANALYSE_SIZE###":"<strong>###ANALYSE_SIZE###</strong>")|replace:"###ANALYSE_SIZE###":$analyse_size}
</p>
</div>
<h3> {$llang.IlluminaMidSearchAnalyse_result_title} </h3>
<div class="underline"> </div>
{* First find out all mid names tested *}
{assign var="mids" value=array()}
{foreach from=$analyse_results key=sample item=sample_results}
{foreach from=$sample_results["default"] key=mid_name item=mid_value}
{if !in_array($mid_name, $mids) }
{$mids[]=$mid_name}
{/if}
{/foreach}
{/foreach}
<table class="tx-nG6-pi1-listrow">
<tr>
<th>{$llang.IlluminaMidSearchAnalyse_mid_title}</th>
{foreach from=$analyse_results key=sample item=sample_results}
<th>{$sample}</th>
{/foreach}
</tr>
{foreach $mids as $mid_name}
<tr>
<td> {$mid_name} </td>
{foreach from=$analyse_results key=sample item=sample_results}
<td>{$sample_results["default"][$mid_name]}</td>
{/foreach}
</tr>
{/foreach}
</table>
<h3> {$llang.Analyse_archives_title} </h3>
<div class="underline"> </div>
<p><ul>
{$dir=$data_folder|cat:$analyse.directory}
{foreach $dir|scandir as $file}
{if $file != "." and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
{$link=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
<li><a href="{$link}">{$file}</a> </li>
{/if}
{/foreach}
</ul></p>
\ No newline at end of file
......@@ -172,13 +172,14 @@ class tx_nG6_pi1 extends tslib_pibase {
}
$project_analysis[$analysis_id]['href'] = $this->pi_list_linkSingle($analysis_values['name'],$analysis_values['id'],1, array('analyze_id'=>$analysis_values['id'], 'project_id'=>$projects[key($projects)]['uid']));
}
$smarty->assign('h_project_analysis', tx_nG6_utils::trace_hierarchy($project_analysis));
$smarty->assign('project_analysis', $project_analysis);
}
if (isset($this->LOCAL_LANG[$this->LLkey]) && count($this->LOCAL_LANG[$this->LLkey]) > 0) {
$smarty->assign('llang', $this->LOCAL_LANG[$this->LLkey]);
} else {
$smarty->assign('llang', $this->LOCAL_LANG['default']);
}
}
return $smarty->fetch('project_view.tpl');
}
......@@ -241,6 +242,7 @@ class tx_nG6_pi1 extends tslib_pibase {
$run_analysis[$analysis_id]['href'] = $this->pi_list_linkSingle($analysis_values['name'],$analysis_values['id'],1, array('analyze_id'=>$analysis_values['id'], 'run_id'=>$this->piVars['run_id']));
}
}
$smarty->assign('h_run_analysis', tx_nG6_utils::trace_hierarchy($run_analysis));
$smarty->assign('run_analysis', $run_analysis);
}
if (isset($this->LOCAL_LANG[$this->LLkey]) && count($this->LOCAL_LANG[$this->LLkey]) > 0) {
......
......@@ -174,21 +174,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tr>
</thead>
<tbody>
{foreach from=$project_analysis key=analysis_id item=analysis_values}
<tr>
{if $analysis_values.superuser}
<td><center><input type="checkbox" id="chk_analysis_{$analysis_values.id}" value="analysis_{$analysis_values.id}"></center></td>
{/if}
{assign var="hidden_class" value="class='tx-nG6-pi1-hidden'"}
{if $analysis_values.hidden == 0}
{assign var="hidden_class" value=""}
{/if}
<td {$hidden_class}>{$analysis_values.href}</td>
<td {$hidden_class}>{$analysis_values.description}</td>
<td {$hidden_class}>{$analysis_values.software}</td>
<td {$hidden_class}>{$analysis_values.version}</td>
</tr>
{/foreach}
{include file="recursive_list_analysis_display.tpl" element=$h_project_analysis prof=0}
</tbody>
{if $superuser && $login_user}
<tfoot>
......
{*
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/>.
*}
{* Recursive function to display an analysis hierarchy *}
{foreach from=$element item=new_element}
<tr>
{assign var="hidden_class" value="class='tx-nG6-pi1-hidden'"}
{if $new_element.data.hidden == 0}
{assign var="hidden_class" value=""}
{/if}
{if $new_element.data.superuser}
<td><center><input type="checkbox" id="chk_analysis_{$new_element.data.id}" value="analysis_{$new_element.data.id}"></center></td>
{/if}
<td {$hidden_class}>
{section name=customer loop=$prof*3}
&nbsp;
{/section}
{$new_element.data.href}
</td>
<td {$hidden_class}>{$new_element.data.description}</td>
<td {$hidden_class}>{$new_element.data.software}</td>
<td {$hidden_class}>{$new_element.data.version}</td>
</tr>
{* recall *}
{if $new_element.child}
{$new_prof = $prof + 1}
{include file="recursive_list_analysis_display.tpl" element=$new_element.child prof=$new_prof}
{/if}
{/foreach}
\ No newline at end of file
......@@ -142,21 +142,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tr>
</thead>
<tbody>
{foreach from=$run_analysis key=analysis_id item=analysis_values}
<tr>
{if $analysis_values.superuser}
<td><center><input type="checkbox" id="chk_analysis_{$analysis_values.id}" value="analysis_{$analysis_values.id}"></center></td>
{/if}
{assign var="hidden_class" value="class='tx-nG6-pi1-hidden'"}
{if $analysis_values.hidden == 0}
{assign var="hidden_class" value=""}
{/if}
<td {$hidden_class}>{$analysis_values.href}</td>
<td {$hidden_class}>{$analysis_values.description}</td>
<td {$hidden_class}>{$analysis_values.software}</td>
<td {$hidden_class}>{$analysis_values.version}</td>
</tr>
{/foreach}
{include file="recursive_list_analysis_display.tpl" element=$h_run_analysis prof=0}
</tbody>
{if $superuser && $login_user}
<tfoot>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment