Source for file display.php
Documentation is available at display.php
* @package linea21.modules
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
include_once(themePath('../project/' . SQL . '.inc.php'));
* Affichage de la liste des projets publics
* @param string $id_filter
* @return string $content
if ($statut == 'public') {
} else $pas = SELECT_LIMIT;
if ($statut == 'archives_p') $suffix = ' "'. strtolower(_t('statut','PA')). '"';
$data = $GLOBALS['sql_object']->DBSelect(SQL_getProjectsList($debut, $pas, $statut, $filter, $id_filter));
$bdd_nb_com = $datacount[0]['num_rows'];
$bdd_nb_com_display = '<p>' . $bdd_nb_com . ' ' . _t('project','name') . $suffix . '</p>' . END_LINE;
$content = '<h1>' . _t('project','list') . '</h1>' . END_LINE;
// echo $bdd_nb_com_display; // affichage du nombre d'enregistrements
$current_link = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue']);
for($i = 0; $i < count($data); $i++ ) {
$link_detail = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'id' => $data[$i]['project_id'], 'name' => $data[$i]['project_name']);
$link_scale = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'filter' => $GLOBALS['filters'][U_L]['scale']['linkvalue'], 'id' => $data[$i]['project_scale_id'], 'name' => $data[$i]['scale_denomination']);
$link_priority = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'filter' => $GLOBALS['filters'][U_L]['priority']['linkvalue'], 'id' => $data[$i]['priority_id'] , 'name' => $data[$i]['priority_name']);
$link_user = array('rub' => $GLOBALS['links'][U_L]['user-profile']['linkvalue'], 'id' => $data[$i]['project_posted_by'], 'name' => $data[$i]['user_login']);
$project_name = formatText($data[$i]['complete_project_name'], '2HTML');
$project_description = formatText($data[$i]['project_description'], '2HTML');
$scale_denomination = formatText($data[$i]['scale_denomination'], '2HTML');
$project_posted_on = formatText($data[$i]['project_published_date_display'], '2HTML');
$project_posted_by = formatText($data[$i]['user_login'], '2HTML');
$project_priority = formatText($data[$i]['priority_name'], '2HTML');
$project_theme_id = $data[$i]['project_theme_id'];
if($project_theme_id != 0) {
$project_theme = formatText($data[$i]['sdtheme_name'], '2HTML');
$link_theme = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'filter' => $GLOBALS['filters'][U_L]['theme']['linkvalue'], 'id' => $data[$i]['theme_sd_theme'], 'name' => $project_theme);
$content .= '<a href="' . HrefMaker($link_detail) . '" title="' . formatText($project_name, '2ATT') . '">' . $project_name . '</a>' . END_LINE;
$content .= '<p class="published_by">' . END_LINE;
$content .= _t('statut','published_on') . ' ' . $project_posted_on . ' ';
$content .= _t('divers','by'). ' <a href="' . HrefMaker($link_user) . '" title="' . $GLOBALS['links'][U_L]['user-profile']['desc'] . ' (' . $project_posted_by . ')">' . $project_posted_by . '</a>';
$content .= '<div class="chapo">' . $project_description . '</div>' . END_LINE;
$content .= '<a class="readmore" href="'. HrefMaker($link_detail). '">'. _t('btn', 'read_more'). '</a>';
$content .= '<p class="filter_info">';
$content .= _t('project','priority') . ' : ';
$content .= ' <a href="' . HrefMaker($link_priority) . '" title="' . $GLOBALS['filters'][U_L]['priority']['desc'] . ' : ' . formatText($project_priority, '2ATT') . '" class="filter_info_priority">' . $project_priority . '</a> ' . END_LINE;
$content .= _t('divers','scale') . ' : ';
$content .= ' <a href="' . HrefMaker($link_scale) . '" title="' . $GLOBALS['filters'][U_L]['scale']['desc'] . ' : ' . formatText($scale_denomination, '2ATT') . '" class="filter_info_scale">' . $scale_denomination . '</a>' . END_LINE;
if($project_theme_id != 0) {
$content .= ' ' . _t('divers','themeref') . ' : ';
$content .= '<a href="' . HrefMaker($link_theme) . '" title="' . $GLOBALS['filters'][U_L]['theme']['desc'] . ' : ' . formatText($project_theme, '2ATT') . '" class="filter_info_scale">' . $project_theme . '</a>' . END_LINE;
$content .= '<p class="info">' . _t('divers','nodata') . '</p>';
* Affichage d'un projet en détail
* @param integer $project_id
* @return string $stat status name
if (count($data) != 1) exit;
$link_scale = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'filter' => $GLOBALS['filters'][U_L]['scale']['linkvalue'], 'id' => $data[0]['project_scale_id'], 'name' => $data[0]['scale_denomination']);
$link_priority = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'filter' => $GLOBALS['filters'][U_L]['priority']['linkvalue'], 'id' => $data[0]['project_priority_id'], 'name' => $data[0]['project_priority']);
$link_user = array('rub' => $GLOBALS['links'][U_L]['user-profile']['linkvalue'], 'id' => $data[0]['project_posted_by'], 'name' => $data[0]['user_login']);
$link_parent = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'id' => $data[0]['project_parent_id'], 'name' => $data[0]['parent_name']);
$link_self = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'id' => $project_id);
$project_name = formatText($data[0]['project_name'], '2HTML');
$project_parent = formatText($data[0]['parent_name'], '2HTML');
$project_scale = formatText($data[0]['scale_denomination'], '2HTML');
$project_priority = formatText($data[0]['project_priority'], '2HTML');
$project_begin_date = formatText(empty_nc($data[0]['project_begin_date_display']), '2HTML');
$project_estimated_date = formatText(empty_nc($data[0]['project_estimated_date_display']), '2HTML');
$project_progression = $data[0]['project_completed'];
$scale_id = $data[0]['project_scale_id'];
$project_theme_id = $data[0]['project_theme_id'];
if($project_theme_id != 0) {
$project_theme = formatText($data[0]['sdtheme_name'], '2HTML');
$link_theme = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'filter' => $GLOBALS['filters'][U_L]['theme']['linkvalue'], 'id' => $data[0]['theme_sd_theme'], 'name' => $project_theme);
$schedule_table = getScheduleTable($data[0]['project_begin_date_display'], $data[0]['project_estimated_date_display'], $data[0]['project_end_date_display']);
$project_posted_on = formatText($data[0]['project_published_date_display'], '2HTML');
$project_modify_on = formatText($data[0]['project_last_modify_display'], '2HTML');
$project_posted_by = formatText($data[0]['user_login'], '2HTML');
$project_status = $data[0]['project_statut'];
$content .= '<div id="anchor-comments">'. END_LINE;
$content .= '<h1>' . $project_name . '</h1>' . END_LINE;
$content .= '<p class="published_by">' . END_LINE;
$content .= _t('statut','published_on') . ' ' . $project_posted_on . ' ';
$content .= _t('divers','by'). ' <a href="' . HrefMaker($link_user) . '" title="' . $GLOBALS['links'][U_L]['user-profile']['desc'] . ' (' . $project_posted_by . ')">' . $project_posted_by . '</a>';
if ($project_status == 'PA') {
$content .= ' (' . _t('statut','archived_on') . ' ' . $project_modify_on . ')';
if($data[0]['project_parent_id'] != 0) {
$content .= '<div id="parent_project">' . END_LINE;
$content .= _t('project','parent') . ' : ';
$content .= '<a href="' . HrefMaker($link_parent) . '" title="' . _t('project','parent') . ' : ' . formatText($project_parent, '2ATT') . '" class="filter_info_parent">' . $project_parent . '</a> ';
$content .= '<div class="chapo">' . $project_description . '</div>' . END_LINE;
$content .= '<div class="schedule">' . $schedule_table . '</div>' . END_LINE;
$content .= '<div class="progression">'. _t('project','progression'). ' : ' . getProgressbar($project_progression, 100, '%'). '</div>' . END_LINE;
$content .= '<div class="body">' . $project_body . '</div>' . END_LINE;
$content .= '<p class="filter_info">' . END_LINE;
$content .= _t('project','priority') . ' : ';
$content .= '<a href="' . HrefMaker($link_priority) . '" title="' . $GLOBALS['filters'][U_L]['priority']['desc'] . ' : ' . formatText($project_priority, '2ATT') . '" class="filter_info_priority">' . $project_priority . '</a> ' . END_LINE;
$content .= ' ' . _t('divers','scale') . ' : ';
$content .= '<a href="' . HrefMaker($link_scale) . '" title="' . $GLOBALS['filters'][U_L]['scale']['desc'] . ' : ' . formatText($project_scale, '2ATT') . '" class="filter_info_scale">' . $project_scale . '</a>' . END_LINE;
if($project_theme_id != 0) {
$content .= ' ' . _t('divers','themeref') . ' : ';
$content .= '<a href="' . HrefMaker($link_theme) . '" title="' . $GLOBALS['filters'][U_L]['theme']['desc'] . ' : ' . formatText($project_theme, '2ATT') . '" class="filter_info_scale">' . $project_theme . '</a>' . END_LINE;
if (count($data) != 0 && $data[0]!= 0) {
$content .= '<div id="project_children">'. END_LINE;
$content .= '<p>'. _t('project','sub-projects'). ' : </p><ul>'. END_LINE;
for($i = 0; $i < count($data); $i++ ) {
$link = array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue'], 'id' => $data[$i]['project_id'], 'name' => $data[$i]['project_name']);
$name = formatText($data[$i]['project_name'], '2HTML');
$content .= '<li><a href="' . HrefMaker($link) . '" title="' . _t('project','parent') . ' : ' . formatText($name, '2ATT') . '" class="filter_info_parent">' . $name . '</a></li>' . END_LINE;
* @return $stat Status name
* @return string $content
$es_date_class = 'nothing';
$e_date_class = 'nothing';
else $es_date_class = date_compare(date("Y-m-d"), $es_date, '>') ? 'bad' : 'good';
else $e_date_class = 'good';
$e_date_class = date_compare(date("Y-m-d"), $es_date, '>') ? 'warn' : 'nothing';
$content = '<table class="project" summary="">'. END_LINE;
$content .= '<th>'. _t('project','begin_date'). '</th>'. END_LINE;
$content .= '<th>'. _t('project','estimated_date'). '</th>'. END_LINE;
$content .= '<th>'. _t('project','end_date'). '</th>'. END_LINE;
* getAssociatedWorkshop()
$link = array('rub' => $GLOBALS['links'][U_L]['workgroup']['linkvalue'], 'id' => $wid, 'name' => $wname);
$content .= '<div id="project_workshop">'. END_LINE;
$content .= '<p>'. ucfirst(_t('project','workshop')). ' : <a href="' . HrefMaker($link) . '" title="' . _t('project','workshop') . ' : ' . formatText($wname, '2ATT') . '">' . $wname . '</a></p>' . END_LINE;
* getAssociatedWorkshop()
if (count($data) != 0 && $data[0]!= 0) {
$content .= '<div id="project_indicators">'. END_LINE;
for($i = 0; $i < count($data); $i++ ) {
$link = array('rub' => $GLOBALS['links'][U_L]['dashboard']['linkvalue'], 'id' => $data[$i]['sdii_id'], 'parentid' => $scale_id, 'name' => $data[$i]['sdii_name']);
$name = formatText($data[$i]['sdii_name'], '2HTML');
$content .= '<li><a href="' . HrefMaker($link) . '" title="' . _t('project','sdi') . ' : ' . formatText($name, '2ATT') . '">' . $name . '</a></li>' . END_LINE;
|