Survey: Add style to page separators in questions list - refs BT#16553

pull/3285/head
Yannick Warnier 6 years ago
parent 420c264332
commit f340bbb74f
  1. 8
      app/Resources/public/css/base.css
  2. 16
      main/survey/survey.php

@ -3273,7 +3273,13 @@ form .formw .freeze {
}
.data_table tr.row_even {
background-color: #fff;
background-color: #fdfdfd;
}
.data_table tr.highlight {
font-style: italic;
font-weight: bolder;
color: #777;
}
.attendance-calendar-table .data_table tr.row_odd {

@ -226,7 +226,7 @@ if ($survey_data['survey_type'] == 0) {
}
// Displaying the table header with all the questions
echo '<table class="table table-bordered">';
echo '<table class="table table-bordered data_table">';
echo '<thead>';
echo '<tr>';
echo ' <th width="5%">'.get_lang('NumberAbbreviation').'</th>';
@ -265,8 +265,20 @@ $sql = "SELECT survey_question.*, count(survey_question_option.question_option_i
$result = Database::query($sql);
$question_counter_max = Database::num_rows($result);
$questionsGroupClass = '';
while ($row = Database::fetch_array($result, 'ASSOC')) {
echo '<tr>';
$breakClass = '';
// Visually impact questions between page breaks by changing the bg color
if ($row['type'] == 'pagebreak') {
$breakClass = ' highlight';
if (empty($questionsGroupClass)) {
$questionsGroupClass = 'row_even';
} else {
$questionsGroupClass = '';
}
}
echo '<tr class="'.$questionsGroupClass.$breakClass.'">';
echo ' <td>'.$question_counter.'</td>';
echo ' <td>';

Loading…
Cancel
Save