Skip to content

Commit

Permalink
Merge branch 'wip-MDL-41231-master' of git://github.com/abgreeve/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese committed Sep 2, 2013
2 parents 6b25e62 + db22e31 commit 80032fe
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions mod/data/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,16 @@
$records = array();
}

if ($mode != 'single' && $canmanageentries) {
echo html_writer::empty_tag('input', array('type' => 'button', 'id' => 'checkall', 'value' => get_string('selectall')));
echo html_writer::empty_tag('input', array('type' => 'button', 'id' => 'checknone', 'value' => get_string('deselectall')));
echo html_writer::empty_tag('input', array('class' => 'form-submit', 'type' => 'submit', 'value' => get_string('deleteselected')));

$module = array('name'=>'mod_data', 'fullpath'=>'/mod/data/module.js');
$PAGE->requires->js_init_call('M.mod_data.init_view', null, false, $module);
}
echo html_writer::end_tag('form');

if ($mode == '' && !empty($CFG->enableportfolios) && !empty($records)) {
require_once($CFG->libdir . '/portfoliolib.php');
$button = new portfolio_add_button();
Expand All @@ -802,20 +812,8 @@
echo $button->to_html(PORTFOLIO_ADD_FULL_FORM);
}


//Advanced search form doesn't make sense for single (redirects list view)
if (($maxcount || $mode == 'asearch') && $mode != 'single') {
if ($canmanageentries) {
echo html_writer::start_tag('div', array('class' => 'form-buttons'));
echo html_writer::empty_tag('input', array('type' => 'button', 'id' => 'checkall', 'value' => get_string('selectall')));
echo html_writer::empty_tag('input', array('type' => 'button', 'id' => 'checknone', 'value' => get_string('deselectall')));
echo html_writer::empty_tag('input', array('class' => 'form-submit', 'type' => 'submit', 'value' => get_string('deleteselected')));
echo html_writer::end_tag('div');

$module = array('name'=>'mod_data', 'fullpath'=>'/mod/data/module.js');
$PAGE->requires->js_init_call('M.mod_data.init_view', null, false, $module);
}
echo html_writer::end_tag('form');
data_print_preference_form($data, $perpage, $search, $sort, $order, $search_array, $advanced, $mode);
}
}
Expand Down

0 comments on commit 80032fe

Please sign in to comment.