aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
authorDennis Benz <dennis.benz@uni-osnabrueck.de>2023-09-28 13:20:17 +0200
committerDennis Benz <dennis.benz@uni-osnabrueck.de>2023-09-28 13:31:54 +0200
commit3872927485cd6a60bac61a6e6700c17a0f28e78f (patch)
tree4a1b8230511e8a1840c4abede77a51503e7d0495 /app/views/admin
parent2bbcfb7bbda30fc0588c1093c9eef36f27d22a60 (diff)
Additional banner for mobile view, ref #3231tic-3231
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/banner/edit.php18
-rw-r--r--app/views/admin/banner/info.php17
2 files changed, 33 insertions, 2 deletions
diff --git a/app/views/admin/banner/edit.php b/app/views/admin/banner/edit.php
index 9bf48f5..b99e108 100644
--- a/app/views/admin/banner/edit.php
+++ b/app/views/admin/banner/edit.php
@@ -18,6 +18,8 @@
<fieldset>
<label>
+ <?= _('Banner:') ?><br>
+
<? if ($banner['banner_path']) : ?>
<?= $banner->toImg(['style' => 'max-width:500px']) ?>
<? else : ?>
@@ -32,6 +34,22 @@
</label>
<label>
+ <?= _('Mobiles Banner (optional):') ?><br>
+
+ <? if ($banner['banner_mobile_path']) : ?>
+ <?= $banner->toImg(['style' => 'max-width:500px'], true) ?>
+ <? else : ?>
+ <?= _('Noch kein Bild hochgeladen') ?>
+ <? endif; ?><br>
+
+ <label class="file-upload">
+ <?= _('Bilddatei auswählen') ?>
+ <input id="imgfile_mobile" name="imgfile_mobile" type="file" accept="image/*">
+ <input type="hidden" name="banner_mobile_path" value="<?= $banner['banner_mobile_path'] ?>">
+ </label>
+ </label>
+
+ <label>
<?= _('Beschreibung:') ?>
<input type="text" id="description" name="description" value="<?= htmlReady($banner['description']) ?>" size="40" maxlength="254">
</label>
diff --git a/app/views/admin/banner/info.php b/app/views/admin/banner/info.php
index be5df97..8fa4cbe 100644
--- a/app/views/admin/banner/info.php
+++ b/app/views/admin/banner/info.php
@@ -10,14 +10,27 @@
<table class="default">
<tbody>
<tr>
- <td rowspan="9" colspan="2" style="text-align: center;">
+ <td><?= _("Banner:") ?></td>
+ <td style="text-align: left;">
<? if ($banner['banner_path']): ?>
- <?= $banner->toImg() ?>
+ <?= $banner->toImg(['style' => 'max-width:100%']) ?>
<? else: ?>
<?= _('noch kein Bild hochgeladen') ?>
<? endif; ?>
</td>
</tr>
+ <? if ($banner['banner_mobile_path']) : ?>
+ <tr>
+ <td><?= _("Mobiles Banner:") ?></td>
+ <td style="text-align: left;">
+ <? if ($banner['banner_mobile_path']): ?>
+ <?= $banner->toImg(['style' => 'max-width:100%'], true) ?>
+ <? else: ?>
+ <?= _('noch kein Bild hochgeladen') ?>
+ <? endif; ?>
+ </td>
+ </tr>
+ <? endif; ?>
<tr>
<td><?= _("Beschreibung:") ?></td>
<td>