VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/webtrees/resources/views/modules/gedcom_news/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/webtrees/resources/views/modules/gedcom_news/list.phtml
<?php

declare(strict_types=1);

use Fisharebest\Webtrees\Auth;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Tree;
use Illuminate\Support\Collection;

/**
 * @var Collection<int,object> $articles
 * @var int                    $block_id
 * @var int                    $limit
 * @var Tree                   $tree
 */

?>

<?php if ($articles->isEmpty()) : ?>
    <?= I18N::translate('No news articles have been submitted.') ?>
<?php endif ?>

<?php foreach ($articles as $n => $article) : ?>
    <?php if ($n === $limit && count($articles) > $limit) : ?>
    <p>
        <button class="btn btn-sm btn-secondary" data-bs-toggle="collapse" data-bs-target="#more-news-<?= e($block_id) ?>" role="button" aria-expanded="false" aria-controls="more-news-<?= e($block_id) ?>">
            <?= view('icons/add') ?>
            <?= I18N::translate('show more') ?>
        </button>
    </p>
<div class="collapse" id="more-news-<?= e($block_id) ?>">
    <?php endif ?>

    <div class="news_box">
        <div class="news_title" dir="auto"><?= $article->subject ?></div>
        <div class="news_date"><?= view('components/datetime', ['timestamp' => $article->updated]) ?></div>
        <div dir="auto"><?= $article->body ?></div>

        <?php if (Auth::isManager($tree)) : ?>
            <hr>
            <form method="post" action="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'DeleteNews', 'news_id' => $article->news_id, 'tree' => $tree->name()])) ?>">
                <a class="btn btn-link" href="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'EditNews', 'news_id' => $article->news_id, 'tree' => $tree->name()])) ?>">
                    <?= I18N::translate('Edit') ?>
                </a>
                |
                <button class="btn btn-link" type="submit" data-wt-confirm="<?= I18N::translate('Are you sure you want to delete ā€œ%sā€?', e($article->subject)) ?>">
                    <?= I18N::translate('Delete') ?>
                </button>

                <?= csrf_field() ?>
            </form>
        <?php endif ?>
    </div>
<?php endforeach ?>

    <?php if (count($articles) > $limit) : ?>
</div>
    <?php endif ?>

<?php if (Auth::isManager($tree)) : ?>
    <p>
        <a class="btn btn-link" href="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'EditNews', 'tree' => $tree->name()])) ?>">
            <?= I18N::translate('Add a news article') ?>
        </a>
    </p>
<?php endif ?>

VaKeR 2022