Commit cc11c1b8 authored by Romain Therville's avatar Romain Therville
Browse files

Update to the single project view

- The "New data added to this project will be kept [...]" label has been
- The label indicating a space's retention limit and purge policy will
now be set in, as 'purge_msg' in the project
- Every project's purge message will be displayed in its individual view
(Under the "Current space: xxx" label).

issue #161
parent 9ded8886
......@@ -401,6 +401,21 @@ $template_mail.='<p>Yours sincerely</p>
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 ) );
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 <>.
<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>
{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 <>.
<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">
Supports Markdown
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