Update plugin.php

This commit is contained in:
Edi 2021-09-14 11:22:59 +02:00 committed by GitHub
parent bd5f724503
commit 19d1b7a694
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ class pluginLatestPages extends Plugin {
global $pages; global $pages;
$html = '<div class="pluginLatestPages mt-4 mb-4 pb-4 border-bottom">'; $html = '<div class="pluginLatestPages mt-4 mb-4 pb-4 border-bottom">';
$html .= '<h3 class="m-0 p-0 pb-3"><i class="bi bi-pencil-square"></i>Latest pages</h3>'; $html .= '<h3 class="m-0 p-0 pb-3"><i class="bi bi-pencil-square"></i>' . $L->g('Latest pages') . '</h3>';
$html .= '<div class="list-group">'; $html .= '<div class="list-group">';
$tmp = $pages->getList(1, 5); $tmp = $pages->getList(1, 5);
foreach ($tmp as $key) { foreach ($tmp as $key) {
@ -17,7 +17,7 @@ class pluginLatestPages extends Plugin {
$html .= '<div class="d-flex gap-2 w-100 justify-content-between">'; $html .= '<div class="d-flex gap-2 w-100 justify-content-between">';
$html .= '<div>'; $html .= '<div>';
$html .= '<h6 class="mb-0">'.($page->title() ? $page->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ').'</h6>'; $html .= '<h6 class="mb-0">'.($page->title() ? $page->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ').'</h6>';
$html .= '<p class="mb-0 opacity-75">Category: '.($page->category() ? $page->category() : $L->get('uncategorized')).'</p>'; $html .= '<p class="mb-0 opacity-75">' . $L->g('Category') . ': '.($page->category() ? $page->category() : $L->get('uncategorized')).'</p>';
$html .= '</div>'; $html .= '</div>';
$html .= '<small class="opacity-50 text-nowrap">'.$page->relativeTime().'</small>'; $html .= '<small class="opacity-50 text-nowrap">'.$page->relativeTime().'</small>';
$html .= '</div>'; $html .= '</div>';
@ -29,4 +29,4 @@ class pluginLatestPages extends Plugin {
return $html; return $html;
} }
} }