aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-29 01:28:38 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-29 01:28:38 +0200
commit35e428c077dac7e57e6f6833562c88ae4a9867da (patch)
treeff4dae3dbd993ccf9e7af2807e007a8943ee8062 /app/view/templates
parent1e6eb30dbb3cb546f30650edd6c1db43167fdb53 (diff)
downloadwcms-35e428c077dac7e57e6f6833562c88ae4a9867da.tar.gz
wcms-35e428c077dac7e57e6f6833562c88ae4a9867da.zip
feature : rename media fix #82
Diffstat (limited to 'app/view/templates')
-rw-r--r--app/view/templates/media.php19
-rw-r--r--app/view/templates/mediamenu.php1
2 files changed, 18 insertions, 2 deletions
diff --git a/app/view/templates/media.php b/app/view/templates/media.php
index 960ff33..d0caaf2 100644
--- a/app/view/templates/media.php
+++ b/app/view/templates/media.php
@@ -95,7 +95,7 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css'
<input type="checkbox" name="id[]" value="<?= $media->getfulldir() ?>" form="mediaedit" id="media_<?= $media->id() ?>">
<label for="media_<?= $media->id() ?>"><?= $media->id() ?></label>
<a href="<?= $media->getfullpath() ?>" target="_blank">⧉</a>
- <code><?= $media->getcode() ?></code>
+ <input readonly class="code select-all" value="<?= $media->getcode() ?>" />
</div>
</li>
@@ -130,7 +130,22 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css'
?>
<tr>
<td><input type="checkbox" name="id[]" value="<?= $media->getfulldir() ?>" form="mediaedit" id="media_<?= $media->id() ?>"></td>
- <td><label for="media_<?= $media->id() ?>"><?= $media->id() ?></label></td>
+ <td>
+ <details>
+ <summary>
+ <label for="newid"><?= $media->id() ?></label>
+ </summary>
+ <form action="<?= $this->url('mediarename') ?>" method="post">
+ <input type="hidden" name="route" value="<?= $mediaopt->getadress() ?>">
+ <input type="hidden" name="path" value="<?= $media->path() ?>">
+ <input type="hidden" name="oldid" value="<?= $media->id() ?>">
+ <input type="hidden" name="oldextension" value="<?= $media->extension() ?>">
+ <input type="text" name="newid" value="<?= $media->id() ?>" id="newid" maxlength="<?= Wcms\Model::MAX_ID_LENGTH ?>">
+ <input type="text" name="newextension" value="<?= $media->extension() ?>" id="" style="width: 30px" maxlength="16">
+ <input type="submit" value="rename">
+ </form>
+ </details>
+ </td>
<td><?= $media->extension() ?></td>
<td class="nowrap"><a href="<?= $media->getfullpath() ?>" target="_blank"><?= $media->type() == 'image' ? '<span class="thumbnail">' . $media->getsymbol() . '<img src="' . $media->getfullpath() . '"></span>' : $media->getsymbol() ?></a></td>
<td class="nowrap"><?= $media->size('hr') ?></td>
diff --git a/app/view/templates/mediamenu.php b/app/view/templates/mediamenu.php
index b64bd25..f79b2bc 100644
--- a/app/view/templates/mediamenu.php
+++ b/app/view/templates/mediamenu.php
@@ -39,6 +39,7 @@
<h2>Move</h2>
<form action="<?= $this->url('mediaedit') ?>" method="post" id="mediaedit">
+ <input type="hidden" name="route" value="<?= $mediaopt->getadress() ?>">
<input type="hidden" name="path" value="<?= $mediaopt->dir() ?>">
<label for="moveto">Move selected medias to a new directory</label>
</br>