MDL-56988 report: attempt to improve styling of reports

This commit is contained in:
Dan Poltawski 2016-11-16 16:09:20 +00:00 committed by Simey Lameze
parent 0fbe41f4cd
commit 3fd840072f
5 changed files with 23 additions and 10 deletions

View File

@ -1680,7 +1680,7 @@ class html_writer {
$class = str_replace(']', '', $class);
$attributes['class'] = $class;
}
$attributes['class'] = 'select ' . $attributes['class']; // Add 'select' selector always
$attributes['class'] = 'select custom-select ' . $attributes['class']; // Add 'select' selector always
$attributes['name'] = $name;

View File

@ -186,7 +186,8 @@ class report_log_renderer extends plugin_renderer_base {
array('class' => 'accesshide'));
echo html_writer::select($readers, 'logreader', $reportlog->selectedlogreader, false);
}
echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('gettheselogs')));
echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('gettheselogs'),
'class' => 'btn btn-primary'));
}
echo html_writer::end_div();
echo html_writer::end_tag('form');

View File

@ -90,7 +90,8 @@ class report_loglive_renderer extends plugin_renderer_base {
public function toggle_liveupdate_button(report_loglive_renderable $reportloglive) {
// Add live log controls.
if ($reportloglive->page == 0 && $reportloglive->selectedlogreader) {
echo html_writer::tag('button' , get_string('pause', 'report_loglive'), array('id' => 'livelogs-pause-button'));
echo html_writer::tag('button' , get_string('pause', 'report_loglive'),
array('id' => 'livelogs-pause-button', 'class' => 'btn btn-secondary'));
$icon = new pix_icon('i/loading_small', 'loading', 'moodle', array('class' => 'spinner'));
return html_writer::tag('span', $this->output->render($icon), array('class' => 'spinner'));
}

View File

@ -370,19 +370,20 @@ if (!empty($instanceid) && !empty($roleid)) {
}
if (!empty($CFG->messaging)) {
echo '<div class="selectbuttons">';
echo '<input type="button" id="checkall" value="'.get_string('selectall').'" /> '."\n";
echo '<input type="button" id="checknone" value="'.get_string('deselectall').'" /> '."\n";
$buttonclasses = 'btn btn-secondary';
echo '<div class="selectbuttons btn-group">';
echo '<input type="button" id="checkall" value="'.get_string('selectall').'" class="'. $buttonclasses .'"> '."\n";
echo '<input type="button" id="checknone" value="'.get_string('deselectall').'" class="'. $buttonclasses .'"> '."\n";
if ($perpage >= $matchcount) {
echo '<input type="button" id="checknos" value="'.get_string('selectnos').'" />'."\n";
echo '<input type="button" id="checknos" value="'.get_string('selectnos').'" class="'. $buttonclasses .'">'."\n";
}
echo '</div>';
echo '<div>';
echo '<div class="p-y-1">';
echo html_writer::label(get_string('withselectedusers'), 'formactionselect');
$displaylist['messageselect.php'] = get_string('messageselectadd');
echo html_writer::select($displaylist, 'formaction', '', array('' => 'choosedots'), array('id' => 'formactionselect'));
echo $OUTPUT->help_icon('withselectedusers');
echo '<input type="submit" value="' . get_string('ok') . '" />'."\n";
echo '<input type="submit" value="' . get_string('ok') . '" class="'. $buttonclasses .'"/>'."\n";
echo '</div>';
echo '</div>'."\n";
echo '</form>'."\n";

View File

@ -222,13 +222,23 @@ function report_participation_print_filter_form($course, $timefrom, $minlog, $ac
echo '<form class="participationselectform" action="index.php" method="get"><div>'."\n".
'<input type="hidden" name="id" value="'.$course->id.'" />'."\n";
echo '<div class="form-group">'."\n";
echo '<label for="menuinstanceid">'.get_string('activitymodule').'</label>'."\n";
echo html_writer::select($instanceoptions, 'instanceid', $instanceid);
echo '</div>'."\n";
echo '<div class="form-group form-inline">'."\n";
echo '<div class="form-group">'."\n";
echo '<label for="menutimefrom">'.get_string('lookback').'</label>'."\n";
echo html_writer::select($timeoptions,'timefrom',$timefrom);
echo '</div>'."\n";
echo '<div class="form-group">'."\n";
echo '<label for="menuroleid">'.get_string('showonly').'</label>'."\n";
echo html_writer::select($roleoptions,'roleid',$roleid,false);
echo '</div>'."\n";
echo '<div class="form-group">'."\n";
echo '<label for="menuaction">'.get_string('showactions').'</label>'."\n";
echo html_writer::select($actionoptions,'action',$action,false);
echo '<input type="submit" value="'.get_string('go').'" />'."\n</div></form>\n";
echo '</div>'."\n";
echo '</div>'."\n";
echo '<input type="submit" value="'.get_string('go').'" class="btn btn-primary" />'."\n</div></form>\n";
}