?> "> <?php echo Icon::create('trash', 'clickable')->asImg(16, ["alt" => _('löschen')]); ?> </a> <? endif; ?> </td> <? else: ?> <td class="document-icon" data-sort-value="1"> <a href="<?php echo $file->getDownloadLink(true); ?> "> <?php echo Icon::create(get_icon_for_mimetype($file->file->mime_type), 'clickable')->asImg(24); ?> </a> </td> <td> <a href="<?php echo $file->getDownloadLink(); ?> "> <?php echo htmlReady($file->name); ?> </a> <? if ($file->file->restricted): ?> <?php echo Icon::create('lock-locked', 'clickable', ['title' => _('Diese Datei ist nicht frei von Rechten Dritter.')])->asImg(['class' => 'text-top']);
/** * Edits a file. * * @param String $entry_id Directory entry id of the file */ public function edit_action($entry_id) { if (!$this->full_access) { throw new AccessDeniedException(); } PageLayout::setTitle(_('Datei bearbeiten')); $entry = new DirectoryEntry($entry_id); $entry->checkAccess(); if (Request::isPost()) { $name = Request::get('filename'); $name = $entry->directory->ensureUniqueFilename($name, $entry->file); $entry->file->filename = $name; $entry->file->restricted = Request::int('restricted', 0); $entry->name = $name; $entry->description = Request::get('description'); if ($entry->file->isDirty() || $entry->isDirty()) { $entry->store(); $entry->file->store(); $message = sprintf(_('Die Datei "%s" wurde bearbeitet.'), $entry->name); PageLayout::postMessage(MessageBox::success($message)); } $this->redirect($this->url_for_parent_directory($entry)); return; } $this->setDialogLayout(Icon::create(get_icon_for_mimetype($entry->file->mime_type), 'navigation')); $this->entry = $entry; }