$context_status_id = is_null($dashboard) ? 'contextStatusBook' : 'contextDashboard_Status' . $dashboard;
$context_view_id = is_null($dashboard) ? 'contextViewBook' : 'contextView_Status' . $dashboard;
+ $report = THEME === 'ysl';
+
if (isset($settings['search']) && !is_null($settings['search'])) {
$dao->setSearch($settings['search']);
}
$res .= '<th>' . commonUrl::orderby(sprintf(__('Date de%smodification'), '<br>'), 'changedate', $settings, 'sort' . $change) . '</th>';
$res .= '<th>' . commonUrl::orderby(__(''), 'lang', $settings, 'sort' . $change) . '</th>';
$res .= '<th>' . __('Pages') . '</th>';
- if ($droits->admin) {
- $res .= '<th>' . commonUrl::orderby('C', 'demo_counter', $settings, 'sort' . $change, __('Compteur de démos')) . '</th>';
- }
- if ($droits->revendeur) {
- $res .= '<th>' . commonUrl::orderby(__('Proprietaire'), 'proprietaire_nom', $settings, 'sort' . $change) . '</th>';
- } else {
- $res .= '<th>' . commonUrl::orderby(__('Proprietaire'), 'proprietaire_utilisateur', $settings, 'sort' . $change) . '</th>';
- }
- if ($droits->admin) {
- $res .= '<th>' . commonUrl::orderby(__('Facturation'), 'facturable', $settings, 'sort' . $change) . '</th>';
- }
- if ($droits->revendeur) {
- $res .= '<th>' . commonUrl::orderby(__('Status'), 'status', $settings, 'sort' . $change) . '</th>';
- $res .= '<th>' . __('V') . '</th>';
+
+ if (!$report) {
+ if ($droits->admin) {
+ $res .= '<th>' . commonUrl::orderby('C', 'demo_counter', $settings, 'sort' . $change, __('Compteur de démos')) . '</th>';
+ }
+ if ($droits->revendeur) {
+ $res .= '<th>' . commonUrl::orderby(__('Proprietaire'), 'proprietaire_nom', $settings, 'sort' . $change) . '</th>';
+ } else {
+ $res .= '<th>' . commonUrl::orderby(__('Proprietaire'), 'proprietaire_utilisateur', $settings, 'sort' . $change) . '</th>';
+ }
+ if ($droits->admin) {
+ $res .= '<th>' . commonUrl::orderby(__('Facturation'), 'facturable', $settings, 'sort' . $change) . '</th>';
+ }
+ if ($droits->revendeur) {
+ $res .= '<th>' . commonUrl::orderby(__('Status'), 'status', $settings, 'sort' . $change) . '</th>';
+ $res .= '<th>' . __('V') . '</th>';
+ }
}
$res .= str_repeat('<th class="min"></th>', 5);
$res .= '</tr>';
$btVoir = '<div></div><span>' . __('voir') . '</span>';
$btEdit = '<div></div><span>' . __('éditer') . '</span>';
$btStats = '<div></div><span>' . __('stats') . '</span>';
+
+ $btReport = '<div></div><span>' . __('report') . '</span>';
$btDownload = '<div></div><span>' . __('télécharger') . '</span>';
if ($droits->creation) {
$btDel = '<div></div><span>' . __('suppr.') . '</span>';
$res .= '<td>' . date('Y-m-d', $book->changedate) . '</td>';
$res .= '<td>' . mb_strtoupper($book->lang) . '</td>';
$res .= '<td>' . $book->parametres->pages . '</td>';
- if ($droits->admin) {
- $res .= '<td>' . $book->demo_counter . '</td>';
- }
+ if (!$report) {
+ if ($droits->admin) {
+ $res .= '<td>' . $book->demo_counter . '</td>';
+ }
- if ($droits->revendeur) {
- $p = str_replace(" (", '<br /><em>', html::escapeHTML($book->proprietaire));
- $p = str_replace(')', '</em>', $p);
- $res .= '<td><a href="#" class="popup" rel="formChangeBookProprietaire/' . $book->book_id . '" title="' . __('Modifier le proprietaire') . '">' . $p . '</a></td>';
- } else {
- $res .= '<td>' . html::escapeHTML($book->proprietaire_utilisateur) . '</td>';
- }
- if ($droits->admin) {
- $res .= '<td>' . html::escapeHTML($book->facturable) . '</td>';
- }
- if ($droits->revendeur) {
- if ($droits->admin || $book->status < 1) {
- $p = '';
- if (!is_null($book->projet)) {
- $p = ' <a href="' . EXTRANET_URL . '/projet/' . $book->projet . '" title="' . __('Voir les détails du projet') . '" class="blank icon">' . cubeMedia::silk('arrow_right.png') . '</a>';
- }
- $res .= '<td><a href="#" class="openContextMenu" rel="' . $context_status_id . '" rev="' . $book->book_id . '">' . $core->books_status[$book->status] . '</a>' . $p . '</td>';
+ if ($droits->revendeur) {
+ $p = str_replace(" (", '<br /><em>', html::escapeHTML($book->proprietaire));
+ $p = str_replace(')', '</em>', $p);
+ $res .= '<td><a href="#" class="popup" rel="formChangeBookProprietaire/' . $book->book_id . '" title="' . __('Modifier le proprietaire') . '">' . $p . '</a></td>';
} else {
- $res .= '<td>' . $core->books_status[1] . '</td>';
+ $res .= '<td>' . html::escapeHTML($book->proprietaire_utilisateur) . '</td>';
+ }
+ if ($droits->admin) {
+ $res .= '<td>' . html::escapeHTML($book->facturable) . '</td>';
+ }
+ if ($droits->revendeur) {
+ if ($droits->admin || $book->status < 1) {
+ $p = '';
+ if (!is_null($book->projet)) {
+ $p = ' <a href="' . EXTRANET_URL . '/projet/' . $book->projet . '" title="' . __('Voir les détails du projet') . '" class="blank icon">' . cubeMedia::silk('arrow_right.png') . '</a>';
+ }
+ $res .= '<td><a href="#" class="openContextMenu" rel="' . $context_status_id . '" rev="' . $book->book_id . '">' . $core->books_status[$book->status] . '</a>' . $p . '</td>';
+ } else {
+ $res .= '<td>' . $core->books_status[1] . '</td>';
+ }
+ $res .= '<td>' . $book->version . '</td>';
}
- $res .= '<td>' . $book->version . '</td>';
}
- if ($book->version > 1 || $droits->admin) {
+ if (!$report && ($book->version > 1 || $droits->admin)) {
$types = ['html5'];
$defaultPlayer = 'viewerh';
if ($book->parametres->scorm_enable) {
$res .= '<td></td><td></td>';
}
$res .= '<td class="bouton"><a href="' . SITE_PATH . 'stats/' . $book->book_id . '_' . $book->hash . '" class="normallink stats btbook">' . $btStats . '</a></td>';
- if ($book->version > 1) {
+ if ($report) {
+ $res .= '<td class="bouton"><a href="/yslReport/' . $book->book_id . '" class="download btbook">' . $btReport . '</a></td>';
+ } elseif ($book->version > 1) {
if ($droits->admin) {
$res .= '<td class="bouton"><a href="#" rel="exportbook/' . $book->book_id . '" class="popup download btbook">' . $btDownload . '</a></td>';
} else {
} else {
$res .= '<td></td>';
}
- if ($droits->creation && $book->status < 0) {
+ if (!$report && ($droits->creation && $book->status < 0)) {
$res .= '<td class="bouton"><a href="#" rel="supprimeBook/' . $book->book_id . '" class="ajax suppr btbook" title="' . __('Êtes-vous certain de vouloir supprimer cette publication ?') . '">' . $btDel . '</a></td>';
} else {
$res .= '<td></td>';
$data[] = [date('Y-m-d H:i:s', $r->date), $r->page, $r->rating, $r->country, $r->function, $r->suggestions];
}
- CubeIT_Excel::simple('Survey data #'.$bid, $data, $head, $tmp, 100);
+ CubeIT_Excel::simple('Survey data #' . $bid, $data, $head, $tmp, 100);
files::$mimeType['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
cubeHTTP::downloadFile($tmp, 'ysl_survey_' . $bid . '.xlsx');