"MDL-23920, added prompt message to user/files.php"
This commit is contained in:
@@ -26,4 +26,3 @@
|
||||
$string['managemyfiles'] = 'Manage my files';
|
||||
$string['pluginname'] = 'User private files';
|
||||
$string['privatefiles'] = 'Private files';
|
||||
$string['nofiles'] = 'There are no files added yet, please click "Manage my private file" button to add files';
|
||||
|
||||
@@ -40,7 +40,7 @@ class block_private_files_renderer extends plugin_renderer_base {
|
||||
public function render_private_files_tree(private_files_tree $tree) {
|
||||
$module = array('name'=>'block_private_files', 'fullpath'=>'/blocks/private_files/module.js', 'requires'=>array('yui2-treeview'));
|
||||
if (empty($tree->dir['subdirs']) && empty($tree->dir['files'])) {
|
||||
$html = $this->output->box(get_string('nofiles', 'block_private_files'));
|
||||
$html = $this->output->box(get_string('nofilesavailable', 'repository'));
|
||||
} else {
|
||||
$htmlid = 'private_files_tree_'.uniqid();
|
||||
$this->page->requires->js_init_call('M.block_private_files.init_tree', array(false, $htmlid));
|
||||
|
||||
+10
-7
@@ -38,13 +38,16 @@ class core_user_renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
public function render_user_files_tree(user_files_tree $tree) {
|
||||
$htmlid = 'user_files_tree_'.uniqid();
|
||||
$module = array('name'=>'core_user', 'fullpath'=>'/user/module.js');
|
||||
$this->page->requires->js_init_call('M.core_user.init_tree', array(false, $htmlid), false, $module);
|
||||
|
||||
$html = '<div id="'.$htmlid.'">';
|
||||
$html .= $this->htmllize_tree($tree, $tree->dir);
|
||||
$html .= '</div>';
|
||||
if (empty($tree->dir['subdirs']) && empty($tree->dir['files'])) {
|
||||
$html = $this->output->box(get_string('nofilesavailable', 'repository'));
|
||||
} else {
|
||||
$htmlid = 'user_files_tree_'.uniqid();
|
||||
$module = array('name'=>'core_user', 'fullpath'=>'/user/module.js');
|
||||
$this->page->requires->js_init_call('M.core_user.init_tree', array(false, $htmlid), false, $module);
|
||||
$html = '<div id="'.$htmlid.'">';
|
||||
$html .= $this->htmllize_tree($tree, $tree->dir);
|
||||
$html .= '</div>';
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user