Navigation Menu

Skip to content

Commit

Permalink
MDL-41231 - mod_data: Export to portfolio and delete selected now wor…
Browse files Browse the repository at this point in the history
…k together.
  • Loading branch information
abgreeve committed Aug 20, 2013
1 parent 838d78a commit db22e31
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions mod/data/view.php
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 db22e31

Please sign in to comment.