Filemanager: Don't hide new document or new folder buttons in share UI

This commit is contained in:
nathan 2022-11-24 11:53:04 -07:00
parent 9f26cbf1e5
commit dd26311295
2 changed files with 15 additions and 1 deletions

View File

@ -60,7 +60,17 @@ class AnonymousList extends filemanager_ui
$content['nm']['no_filter'] = true; $content['nm']['no_filter'] = true;
$content['nm']['favorites'] = false; $content['nm']['favorites'] = false;
$this->etemplate->setElementAttribute("nm", "header_right", ''); if(!Vfs::is_writable($content['nm']['path']))
{
// share is read-only, we can just hide everything
$this->etemplate->setElementAttribute("nm", "header_right", '');
}
else
{
// Set some unwanted buttons readonly - hide via CSS
$this->etemplate->setElementAttribute("nm[button][edit]", "disabled", true);
$this->etemplate->setElementAttribute("nm[button][symlink]", "disabled", true);
}
return parent::listview($content, $msg); return parent::listview($content, $msg);
} }

View File

@ -68,6 +68,10 @@ div.nextmatch_header {
width: 50px; width: 50px;
} }
#filemanager-index_filemanager-index-header_right > et2-button:not([id*="createdir"]) {
display: none;
}
div.search { div.search {
width: 25%; width: 25%;
max-width: 98%; max-width: 98%;