getName() . '.php';
if(file_exists($viewFile))
{
if(!empty($node->getNodeData()->getData()))
{
extract($node->getNodeData()->getData());
}
// ajouter un article
$new_article = '';
if($_SESSION['admin'])
{
$id = 'n' . $this->id_node;
$js = 'onclick="openEditor(\'' . $id . '\')"';
$share_button = '

';
$html = '';
$new_button = '' . "\n" .
'
';
$modify_js = 'onclick="openEditor(\'' . $id . '\')"';
$modify_article = '
' . "\n";
$up_js = 'onclick="switchPositions(\'' . $id . '\', \'up\')"';
$up_button = '
' . "\n";
$down_js = 'onclick="switchPositions(\'' . $id . '\', \'down\')"';
$down_button = '
' . "\n";
$delete_js = 'onclick="deleteArticle(\'' . $id . '\')"';
$delete_article = '
' . "\n";
$close_js = 'onclick="closeEditor(\'' . $id . '\')"';
$close_editor = '';
$submit_js = 'onclick="submitArticle(\'' . $id . '\', \'\', clone' . $this->id_node . ')"';
$submit_article = '';
$admin_buttons = $new_button . $modify_article . $up_button . $down_button . $delete_article . $close_editor . $submit_article;
// squelette d'un nouvel article
ob_start();
require self::VIEWS_PATH . 'article.php';
$new_article = ob_get_clean();
}
// articles existants
$this->useChildrenBuilder($node);
$content = $this->html;
ob_start();
require $viewFile;
$this->html = ob_get_clean(); // pas de concaténation ici, on écrase
}
}
}