Skip to content

Commit

Permalink
Show additional info in pages, posts, tags and users pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Usbac committed Feb 3, 2024
1 parent e3eeecc commit f723eff
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/views/admin/link.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
<button class="slider" onclick="get('#status').click()"></button>
</div>
</div>
<div class="extra-data">
<span><?= t('id') ?>: <?= e($link['id']) ?></span>
</div>
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion app/views/admin/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
<a id="page-link" target="_blank"></a>
</div>
<?php if (\Aurora\System\Helper::isValidId($page['id'] ?? false)): ?>
<span class="form-extra-data"><?= t('number_views') ?>: <?= e($page['views']) ?></span>
<div class="extra-data">
<span><?= t('id') ?>: <?= e($page['id']) ?></span>
<span><?= t('number_views') ?>: <?= e($page['views']) ?></span>
</div>
<?php endif ?>
</div>
<div class="card v-spacing">
Expand Down
5 changes: 4 additions & 1 deletion app/views/admin/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
<textarea id="description" name="description" char-count><?= e($post['description'] ?? '') ?></textarea>
</div>
<?php if (\Aurora\System\Helper::isValidId($post['id'] ?? false)): ?>
<span class="form-extra-data"><?= t('number_views') ?>: <?= e($post['views']) ?></span>
<div class="extra-data">
<span><?= t('id') ?>: <?= e($post['id']) ?></span>
<span><?= t('number_views') ?>: <?= e($post['views']) ?></span>
</div>
<?php endif ?>
</div>
<div class="card v-spacing">
Expand Down
5 changes: 4 additions & 1 deletion app/views/admin/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
<textarea id="description" name="description" char-count><?= e($tag['description'] ?? '') ?></textarea>
</div>
<?php if (\Aurora\System\Helper::isValidId($tag['id'] ?? false)): ?>
<span class="form-extra-data"><?= t('number_posts') ?>: <?= e($tag['posts']) ?></span>
<div class="extra-data">
<span><?= t('id') ?>: <?= e($tag['id']) ?></span>
<span><?= t('number_posts') ?>: <?= e($tag['posts']) ?></span>
</div>
<?php endif ?>
</div>
<div class="card v-spacing">
Expand Down
1 change: 1 addition & 0 deletions app/views/admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<input id="user-image-input" type="hidden" name="image" value="<?= e($user['image'] ?? '') ?>"/>
<?php if (\Aurora\System\Helper::isValidId($user['id'] ?? false)): ?>
<div class="extra-info">
<p><?= t('id') ?>: <?= e($user['id']) ?></p>
<p><?= t('number_posts') ?>: <?= e($user['posts']) ?></p>
<p><?= t('last_active') ?>: <?= e($this->dateFormat($user['last_active'])) ?></p>
</div>
Expand Down
7 changes: 5 additions & 2 deletions public/assets/css/admin/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,10 @@ textarea.code {
fill: #54aeff;
}

.form-extra-data {
.extra-data {
display: flex;
flex-direction: column;
gap: 10px;
font-weight: var(--font-semibold);
}

Expand Down Expand Up @@ -1256,7 +1259,7 @@ textarea.code {
text-align: center;
font-weight: var(--font-semibold);
margin-top: 14px;
gap: 14px;
gap: 10px;
}

#user-form .extra-info * {
Expand Down

0 comments on commit f723eff

Please sign in to comment.