mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
"MDL-23065, non javascript filepicker, fixed maxfiles condition, improve ui"
This commit is contained in:
parent
b13842891f
commit
bf1873c60b
@ -275,7 +275,7 @@ default:
|
||||
if ($env == 'filepicker') {
|
||||
$maxfiles = 1;
|
||||
}
|
||||
if ($filecount < $maxfiles && $maxfiles != -1) {
|
||||
if ($filecount < $maxfiles || $maxfiles == -1) {
|
||||
echo ' <a href="'.$filepicker_url->out().'">'.get_string('addfile', 'repository').'</a>';
|
||||
}
|
||||
if ($env == 'filemanager') {
|
||||
|
@ -98,6 +98,7 @@ $params['draftpath'] = $draftpath;
|
||||
$home_url = new moodle_url('/repository/draftfiles_manager.php', $params);
|
||||
|
||||
$params['savepath'] = $savepath;
|
||||
$params['repo_id'] = $repo_id;
|
||||
$url = new moodle_url($CFG->httpswwwroot."/repository/filepicker.php", $params);
|
||||
$PAGE->set_url('/repository/filepicker.php', $params);
|
||||
|
||||
@ -168,14 +169,22 @@ case 'sign':
|
||||
} else {
|
||||
if (!empty($list['path'])) {
|
||||
foreach ($list['path'] as $p) {
|
||||
echo '<form method="post" style="display:inline">';
|
||||
echo '<input type="hidden" name="p" value="'.$p['path'].'"';
|
||||
echo '<input type="hidden" name="action" value="list"';
|
||||
echo '<input type="hidden" name="draftpath" value="'.$draftpath.'" /><br />';
|
||||
echo '<input type="hidden" name="savepath" value="'.$savepath.'" /><br />';
|
||||
echo '<input type="submit" value="'.$p['name'].'" />';
|
||||
echo '</form>';
|
||||
echo '<strong> / </strong>';
|
||||
//echo '<form method="post" style="display:inline">';
|
||||
//echo '<input type="hidden" name="p" value="'.$p['path'].'"';
|
||||
//echo '<input type="hidden" name="action" value="list"';
|
||||
//echo '<input type="hidden" name="draftpath" value="'.$draftpath.'" /><br />';
|
||||
//echo '<input type="hidden" name="savepath" value="'.$savepath.'" /><br />';
|
||||
//echo '<input style="display:inline" type="submit" value="'.$p['name'].'" />';
|
||||
//echo '</form>';
|
||||
|
||||
$pathurl = new moodle_url($url, array(
|
||||
'p'=>$p['path'],
|
||||
'action'=>'list',
|
||||
'draftpath'=>$draftpath,
|
||||
'savepath'=>$savepath
|
||||
));
|
||||
echo '<strong>' . html_writer::link($pathurl, $p['name']) . '</strong>';
|
||||
echo '<span> / </span>';
|
||||
}
|
||||
}
|
||||
if (!empty($list['page'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user