|
|
|
|
@ -23,18 +23,12 @@ |
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/> |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
use OCA\Files\Event\LoadAdditionalScriptsEvent; |
|
|
|
|
use OCA\Files\Event\LoadSidebar; |
|
|
|
|
use OCA\Viewer\Event\LoadViewer; |
|
|
|
|
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as ResourcesLoadAdditionalScriptsEvent; |
|
|
|
|
use OCP\EventDispatcher\IEventDispatcher; |
|
|
|
|
use OCP\IConfig; |
|
|
|
|
use OCP\IUserSession; |
|
|
|
|
use OCP\Server; |
|
|
|
|
|
|
|
|
|
$config = Server::get(IConfig::class); |
|
|
|
|
$userSession = Server::get(IUserSession::class); |
|
|
|
|
$eventDispatcher = Server::get(IEventDispatcher::class); |
|
|
|
|
|
|
|
|
|
$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); |
|
|
|
|
|
|
|
|
|
@ -43,14 +37,4 @@ $tmpl = new OCP\Template('files_sharing', 'list', ''); |
|
|
|
|
// gridview not available for ie |
|
|
|
|
$tmpl->assign('showgridview', $showgridview); |
|
|
|
|
|
|
|
|
|
// fire script events |
|
|
|
|
$eventDispatcher->dispatchTyped(new ResourcesLoadAdditionalScriptsEvent()); |
|
|
|
|
$eventDispatcher->dispatchTyped(new LoadAdditionalScriptsEvent()); |
|
|
|
|
$eventDispatcher->dispatchTyped(new LoadSidebar()); |
|
|
|
|
|
|
|
|
|
// Load Viewer scripts |
|
|
|
|
if (class_exists(LoadViewer::class)) { |
|
|
|
|
$eventDispatcher->dispatchTyped(new LoadViewer()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$tmpl->printPage(); |
|
|
|
|
|