summaryrefslogtreecommitdiff
path: root/src/application/views
diff options
context:
space:
mode:
authorJonas Kohl2024-09-17 13:39:12 +0200
committerJonas Kohl2024-09-17 13:39:12 +0200
commitf6dd78734f86f8daed7c5d472e7a199301095ff8 (patch)
treeef173ed502e189b25c6b5af08db982943adca718 /src/application/views
parente8ab5cbddd018f311e2d942c048203b8b3221e4e (diff)
More theme and i18n stuff
Diffstat (limited to 'src/application/views')
-rw-r--r--src/application/views/template_end.php41
-rw-r--r--src/application/views/view_logintoreply.php7
2 files changed, 46 insertions, 2 deletions
diff --git a/src/application/views/template_end.php b/src/application/views/template_end.php
index d12e2ff..f322b36 100644
--- a/src/application/views/template_end.php
+++ b/src/application/views/template_end.php
@@ -3,8 +3,41 @@
<div class="container">
<div class="panel panel-default">
<div class="panel-body">
- &copy; <?= date("Y") ?> <?= htmlentities(env("MYSTIC_FORUM_COPYRIGHT") ?? env("MYSTIC_FORUM_TITLE") ?? "Forum") ?>.
- Powered by <a href="https://git.jkohl.link/mystic-forum.git/">Mystic Forum</a>
+ <table style="border-collapse: collapse; width: 100%; background: none">
+ <tbody>
+ <tr>
+ <td style="padding: 0; vertical-align: middle; text-align: left; width: 100%" class="text-normal">
+ &copy; <?= date("Y") ?> <?= htmlentities(env("MYSTIC_FORUM_COPYRIGHT") ?? env("MYSTIC_FORUM_TITLE") ?? "Forum") ?>.
+ Powered by <a href="https://git.jkohl.link/mystic-forum.git/">mysticBB</a>.
+ </td>
+ <td style="padding: 0; vertical-align: middle; text-align: right; white-space: nowrap" class="text-normal">
+ <form action="?_action=settheme" class="form-inline seamless-inline" method="post">
+ <input type="hidden" name="next" value="<?= htmlentities($_SERVER["REQUEST_URI"]) ?>">
+ <div class="form-group">
+ <label for="theme-select"><?= __("Theme:") ?></label>
+ <select class="form-control input-sm auto-submit" id="theme-select" name="theme">
+ <?php foreach ($availableThemes as $themeKey => $themeInfo): ?>
+ <option value="<?= htmlentities($themeKey) ?>" <?= $themeKey === $currentTheme ? " selected" : "" ?>><?= htmlentities($themeInfo->name) ?></option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </form>
+ &nbsp;&nbsp;&nbsp;
+ <form action="?_action=setlang" class="form-inline seamless-inline" method="post">
+ <input type="hidden" name="next" value="<?= htmlentities($_SERVER["REQUEST_URI"]) ?>">
+ <div class="form-group">
+ <label for="lang-select"><?= __("Language:") ?></label>
+ <select class="form-control input-sm auto-submit" id="lang-select" name="lang">
+ <?php foreach ($availableLangs as $langKey => $langName): ?>
+ <option value="<?= htmlentities($langKey) ?>" <?= $langKey === $currentLang ? " selected" : "" ?>><?= htmlentities($langName) ?></option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </form>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</div>
</div>
</div>
@@ -24,6 +57,10 @@ $(function() {
],
]) ?>
+ $(".auto-submit").on("change", function() {
+ $(this)[0].form.submit();
+ });
+
$("._time").each(function(i, e) {
var date = new Date($(e).text());
$(e).text(date.toLocaleString());
diff --git a/src/application/views/view_logintoreply.php b/src/application/views/view_logintoreply.php
new file mode 100644
index 0000000..11e0e1e
--- /dev/null
+++ b/src/application/views/view_logintoreply.php
@@ -0,0 +1,7 @@
+<div class="well margin-top-4x text-center">
+ <div class="h3 margin-top-0"><?= __("Log in to reply to this topic") ?></div>
+ <a href="?_action=auth&amp;next=<?= htmlentities(urlencode($_SERVER["REQUEST_URI"])) ?>" class="btn btn-success">
+ <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
+ <?= __("Log in") ?>
+ </a>
+</div> \ No newline at end of file