mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 06:30:07 +01:00
fix: use updated_at for paste updated cards
This commit is contained in:
parent
81fcaf65d6
commit
6c964cfe63
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
// This is cancer. I'm sorry.
|
// This is cancer. I'm sorry.
|
||||||
function outputPasteCard($paste) {
|
function outputPasteCard($paste, $use_updated = false) {
|
||||||
echo '<div class="column is-half">
|
echo '<div class="column is-half">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
|
@ -12,7 +12,7 @@ function outputPasteCard($paste) {
|
||||||
<p class="subtitle is-6">
|
<p class="subtitle is-6">
|
||||||
<a href="' . urlForMember($paste->user) . '">' . pp_html_escape($paste->user->username) . '</a>
|
<a href="' . urlForMember($paste->user) . '">' . pp_html_escape($paste->user->username) . '</a>
|
||||||
<br>
|
<br>
|
||||||
<time datetime="' . $paste->created_at . '">' . friendlyDateDifference(date_create(), date_create($paste->created_at)) . '</time>
|
<time datetime="' . $paste->created_at . '">' . friendlyDateDifference(date_create(), date_create($use_updated ? $paste->updated_at : $paste->created_at)) . '</time>
|
||||||
</p>' .
|
</p>' .
|
||||||
($paste->tags->isNotEmpty() ? tagsToHtml($paste->tags) : '<span class="tag is-warning">no tags</span>') . '
|
($paste->tags->isNotEmpty() ? tagsToHtml($paste->tags) : '<span class="tag is-warning">no tags</span>') . '
|
||||||
</div>
|
</div>
|
||||||
|
@ -83,7 +83,7 @@ function outputPasteCard($paste) {
|
||||||
<h1 class="title is-4">Recently Updated Pastes</h1>
|
<h1 class="title is-4">Recently Updated Pastes</h1>
|
||||||
<div class="columns is-multiline">
|
<div class="columns is-multiline">
|
||||||
<?php foreach ($updated_pastes as $paste): ?>
|
<?php foreach ($updated_pastes as $paste): ?>
|
||||||
<?php outputPasteCard($paste); ?>
|
<?php outputPasteCard($paste, true); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue