mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-15 08:48:42 +00:00
bug fix and implement alt
This commit is contained in:
parent
f6e0533909
commit
d90344486f
|
|
@ -128,7 +128,7 @@ final class BackendController extends Controller
|
||||||
$path = (string) ($request->getData('path') ?? '/');
|
$path = (string) ($request->getData('path') ?? '/');
|
||||||
|
|
||||||
/** @var Media[] $media */
|
/** @var Media[] $media */
|
||||||
$media = MediaMapper::getByVirtualPath($path);
|
$media = MediaMapper::getByVirtualPath(\str_replace('+', ' ', $path));
|
||||||
|
|
||||||
$collection = CollectionMapper::getParentCollection(\str_replace('+', ' ', $path));
|
$collection = CollectionMapper::getParentCollection(\str_replace('+', ' ', $path));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,14 +40,6 @@ class Collection extends Media implements \Iterator
|
||||||
*/
|
*/
|
||||||
protected string $extension = 'collection';
|
protected string $extension = 'collection';
|
||||||
|
|
||||||
/**
|
|
||||||
* Versioned.
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected bool $versioned = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ echo $this->getData('nav')->render();
|
||||||
|
|
||||||
if ($this->isImageFile($media, $path)) : ?>
|
if ($this->isImageFile($media, $path)) : ?>
|
||||||
<div class="h-overflow centerText">
|
<div class="h-overflow centerText">
|
||||||
<img src="<?= $media->getPath(); ?>">
|
<img src="<?= $media->getPath(); ?>" alt="<?= $media->getName(); ?>">
|
||||||
</div>
|
</div>
|
||||||
<?php elseif ($this->isTextFile($media, $path)) : ?>
|
<?php elseif ($this->isTextFile($media, $path)) : ?>
|
||||||
<!-- if markdown show markdown editor, if image show image editor, if text file show textarea only on edit -->
|
<!-- if markdown show markdown editor, if image show image editor, if text file show textarea only on edit -->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user