Commit c4102f5a authored by Penom Nom's avatar Penom Nom
Browse files

edit only editable analyses

parent 1805799a
......@@ -17,8 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<input type="hidden" id="analyse_name" value="{$analyse.name}"/>
{block name=description}
<div class="sub-content sc-top">
<div class="sub-content sc-top">
{block name=description}
<div class="ng6-content-header-left analysis">
<h2>Analysis <small>{$analyse.name}</small></h2>
</div>
......@@ -26,79 +27,105 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{$analyse.description}
<br />
All data related to this analysis use <strong> {$analyse_size} </strong> on the hard drive.
{block name=description_update}{/block}
</div>
<div style="clear:both"></div>
</div>
{/block}
{/block}
</div>
<div class="sub-content sc-bottom">
{block name=content}
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#results" data-toggle="tab">{block name=results_title} Results {/block}</a></li>
{if $analyse.params != ""}
<li><a href="#parameters" data-toggle="tab">{block name=params_title} Parameters {/block}</a></li>
{/if}
<li><a href="#downloads" data-toggle="tab">{block name=downloads_title} Downloads {/block}</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="results">
{block name=results}{/block}
</div>
{if $analyse.params != ""}
<div class="tab-pane fade" id="parameters">
{block name=params}
{block name=params_content}
<ul>
<li class="parameter">{$analyse.params}</li>
</ul>
{/block}
{block name=command_line_content}
{if $is_project_admin }
<br/>
<br/>
<div class="editable-block">
<span class="editable-block-head label label-info">Command</span>
<i>{$analyse.software}</i>
<span class="editable editable-block-content"
id="editable-command-line" data-pk="{$analyze_id}"
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}
<ul id="myTab" class="nav nav-tabs">
{block name=nav_menu_results}
<li class="active"><a href="#results" data-toggle="tab">{block name=results_title} Results {/block}</a></li>
{/block}
</div>
{/if}
<div class="tab-pane fade" id="downloads">
{block name=download}
{assign var="nb_files" value=0}
{$dir=$data_folder|cat:$analyse.directory}
{foreach $dir|scandir as $file}
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
{$nb_files = $nb_files + 1}
{/if}
{/foreach}
{if $nb_files == 0}
<div class="alert alert-info">
Results folder not synchronized yet...
{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}
{block name=nav_menu_downloads}
<li><a href="#downloads" data-toggle="tab">{block name=downloads_title} Downloads {/block}</a></li>
{/block}
{block name=nav_menu_update}{/block}
</ul>
<div id="myTabContent" class="tab-content">
{block name=tab_content_results}
<div class="tab-pane fade in active" id="results">
{block name=results}{/block}
</div>
{/block}
{block name=tab_content_params}
{if $analyse.params != ""}
<div class="tab-pane fade" id="parameters">
{block name=params}
{block name=params_content}
<ul>
<li class="parameter">{$analyse.params}</li>
</ul>
{/block}
{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>
<span class="editable editable-block-content"
id="editable-command-line" data-pk="{$analyze_id}"
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}
</div>
{else}
<ul>
{/if}
{/block}
{block name=tab_content_downloads}
<div class="tab-pane fade" id="downloads">
{block name=download}
{assign var="nb_files" value=0}
{$dir=$data_folder|cat:$analyse.directory}
{foreach $dir|scandir as $file}
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{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}
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
{$nb_files = $nb_files + 1}
{/if}
{/foreach}
</ul>
{/if}
{if $nb_files == 0}
<div class="alert alert-info">
Results folder not synchronized yet...
</div>
{else}
<ul>
{foreach $dir|scandir as $file}
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{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>
{/block}
{block name=tab_content_update}{/block}
</div>
</div>
{/block}
</div>
......
......@@ -17,73 +17,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{extends file='AnalysisTemplate.tpl'}
{block name=description}
<div class="sub-content sc-top">
<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.
<br/>
<div style="float:right;">
{if $is_project_admin }
<button id="add_file" type="button" class="btn btn-small btn-primary"><i class="icon-plus icon-white"></i> add files</button>
{/if}
</div>
</div>
<div style="clear:both"></div>
{block name=description_update}
<br/>
<div style="float:right;">
{if $is_project_admin }
<button id="add_file" type="button" class="btn btn-small btn-primary"><i class="icon-plus icon-white"></i> add files</button>
{/if}
</div>
{/block}
{block name=content}
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#downloads" data-toggle="tab">Downloads</a></li>
{if $analyse.params != ""}
<li><a href="#parameters" data-toggle="tab">Parameters</a></li>
{/if}
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="downloads">
{assign var="nb_files" value=0}
{$dir=$data_folder|cat:$analyse.directory}
{foreach $dir|scandir as $file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
{$nb_files = $nb_files + 1}
{/if}
{/foreach}
{if $nb_files == 0}
<div class="alert alert-info">
Results folder not synchronized yet...
</div>
{else}
<ul>
{foreach $dir|scandir as $file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
{$link=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
<li class="filelist"><a href="{$link}">{$file}</a> </li>
{/if}
{/foreach}
</ul>
{/if}
</div>
{if $analyse.params != ""}
<div class="tab-pane fade" id="parameters">
{assign var="params" value=";"|explode:$analyse.params}
<ul>
{foreach from=$params item=param}
<li class="parameter">{$param}</li>
{/foreach}
</ul>
</div>
{/if}
</div>
{/block}
\ No newline at end of file
{* No result tab*}
{block name=nav_menu_results}{/block}
{block name=tab_content_results}{/block}
\ No newline at end of file
......@@ -212,6 +212,12 @@ $(function () {
$(this).editable('show');
})
//auto active tab
var href = $('#myTab > li').removeClass( "active" ).first().addClass( "active" ).children("a:first").attr('href');
$('#myTabContent > div.tab-pane.fade').removeClass( "in active" );
$(href).addClass( "in active" );
// Add numeric with white space in sort
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"numeric-pre": function ( a ) {
......
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