bug fix and implement alt

This commit is contained in:
Dennis Eichhorn 2020-09-19 21:24:36 +02:00
parent f6e0533909
commit d90344486f
3 changed files with 2 additions and 10 deletions

View File

@ -128,7 +128,7 @@ final class BackendController extends Controller
$path = (string) ($request->getData('path') ?? '/');
/** @var Media[] $media */
$media = MediaMapper::getByVirtualPath($path);
$media = MediaMapper::getByVirtualPath(\str_replace('+', ' ', $path));
$collection = CollectionMapper::getParentCollection(\str_replace('+', ' ', $path));

View File

@ -40,14 +40,6 @@ class Collection extends Media implements \Iterator
*/
protected string $extension = 'collection';
/**
* Versioned.
*
* @var bool
* @since 1.0.0
*/
protected bool $versioned = false;
/**
* Constructor.
*

View File

@ -126,7 +126,7 @@ echo $this->getData('nav')->render();
if ($this->isImageFile($media, $path)) : ?>
<div class="h-overflow centerText">
<img src="<?= $media->getPath(); ?>">
<img src="<?= $media->getPath(); ?>" alt="<?= $media->getName(); ?>">
</div>
<?php elseif ($this->isTextFile($media, $path)) : ?>
<!-- if markdown show markdown editor, if image show image editor, if text file show textarea only on edit -->