Commit a0f61488 authored by Celine Noirot's avatar Celine Noirot

Merge branch 'issue#161' into 'dev'

Merge branch issue#161 with dev

See merge request !98
parents 9ded8886 cc11c1b8
......@@ -401,6 +401,21 @@ $template_mail.='<p>Yours sincerely</p>
return($path_to_space_save_dir);
}
static function get_project_purge_msg($project_id){
$space_id = tx_nG6_db::get_project_space_id($project_id);
$space_config = tx_nG6_utils::get_retention_policy_from_space_id($space_id);
$project_purge_msg = '';
foreach($space_config as $line_id => $line_content){
if(strpos($line_content, 'purge_msg') === 0){
//We get the value in the "purge_msg = " line
$project_purge_msg = trim( substr( $line_content, strpos( $line_content, '=')+1 ) );
}
}
return($project_purge_msg);
}
static function get_save_dir(){
$config_file_content = tx_nG6_utils::get_config_content($space_id);
......
......@@ -205,6 +205,7 @@ class tx_nG6_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$smarty->assign('is_ng6_superadmin', tx_nG6_db::is_user_ng6_superadmin($user_id) ? true : false);
$smarty->assign('visible_projects', $visible_projects);
// If it's a single project, add runs and analysis information
if ($single_project_display) {
......@@ -254,6 +255,7 @@ class tx_nG6_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$smarty->assign_by_ref('tx_nG6_utils', $txNG6Utils);
$smarty->assign_by_ref('retention_policy', tx_nG6_utils::get_project_retention_policy($projects[key($projects)]['id']));
$smarty->assign('space_purge_msg', tx_nG6_utils::get_project_purge_msg($projects[key($projects)]['id']));
}
return $smarty->fetch('project_view.tpl');
......
......@@ -44,6 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="ng6-content-header-left project">
<h2>Projet <small>{$projects[key($projects)].name}</small></h2>
<div><p>Current space: <b><span id="current_space_id">{$projects[key($projects)].space_id}</span></b></p></div>
<div><p>{$space_purge_msg}</p></div>
{if $projects[key($projects)].is_admin}
<div id="change_space_id_warning"><p><i>Warning, migrating a project from one space to another will update both the files location and the retention limits.</i></p></div>
<div id="change_space_id_form"></div>
......@@ -60,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<br />
{assign var="project_size" value="<span id='size' class='tx-nG6-mini-wait'></span>"}
Raw data and analysis results use <strong>{$project_size}</strong> on the hard drive for the whole project.<br />
New data added to this project will be kept<b>{$retention_policy}</b>. <br />
<!-- New data added to this project will be kept<b>{$retention_policy}</b>. <br /> -->
<br><label>Data overview</label><br>
<table class="table table-striped table-bordered dataTable" id="manag_purged_data_table">
......
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