- Added optional SEMSTORM domain input field in site creation and editing forms. - Introduced SEO panel links in site dashboard and edit pages. - Created a new cron job for SEMSTORM data synchronization. - Implemented database migrations for cron logs and site SEO metrics. - Developed SiteSeoSyncService to handle SEMSTORM data fetching and storage. - Added logging functionality for cron events. - Created a new LogController to display cron logs with filtering options. - Added SEO statistics dashboard with visual representation of metrics. - Implemented site SEO metrics model for data retrieval and manipulation.
90 lines
5.0 KiB
PHP
90 lines
5.0 KiB
PHP
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2>Strony WordPress</h2>
|
|
<a href="/sites/create" class="btn btn-primary">
|
|
<i class="bi bi-plus-lg me-1"></i>Dodaj stronę
|
|
</a>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body p-0">
|
|
<table class="table table-hover mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Nazwa</th>
|
|
<th>URL</th>
|
|
<th>Tematy</th>
|
|
<th>Opublikowane</th>
|
|
<th>Interwał</th>
|
|
<th>Ostatnia publikacja</th>
|
|
<th>Status</th>
|
|
<th>Akcje</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (empty($sites)): ?>
|
|
<tr><td colspan="8" class="text-center text-muted py-4">Brak stron. Dodaj pierwszą stronę WordPress.</td></tr>
|
|
<?php else: ?>
|
|
<?php foreach ($sites as $site): ?>
|
|
<tr>
|
|
<td>
|
|
<a href="/sites/<?= $site['id'] ?>/edit"><?= htmlspecialchars($site['name']) ?></a>
|
|
<?php if ($site['is_multisite']): ?>
|
|
<span class="badge bg-info">Multi</span>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td><a href="<?= htmlspecialchars($site['url']) ?>" target="_blank" class="text-muted small"><?= htmlspecialchars($site['url']) ?></a></td>
|
|
<td>
|
|
<a href="/sites/<?= $site['id'] ?>/topics" class="badge bg-secondary text-decoration-none">
|
|
<?= $site['topic_count'] ?> tematów
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="/articles?site_id=<?= $site['id'] ?>" class="badge bg-primary text-decoration-none" title="Pokaż artykuły tej strony">
|
|
<?= $site['published_article_count'] ?> opublikowanych
|
|
</a>
|
|
</td>
|
|
<td>co <?= $site['publish_interval_hours'] ?> h</td>
|
|
<td><?= $site['last_published_at'] ? date('d.m.Y H:i', strtotime($site['last_published_at'])) : '-' ?></td>
|
|
<td>
|
|
<?php if ($site['is_active']): ?>
|
|
<span class="badge bg-success">Aktywna</span>
|
|
<?php else: ?>
|
|
<span class="badge bg-secondary">Nieaktywna</span>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td>
|
|
<div class="btn-group btn-group-sm">
|
|
<a href="/sites/<?= $site['id'] ?>/edit" class="btn btn-outline-primary" title="Edytuj">
|
|
<i class="bi bi-pencil"></i>
|
|
</a>
|
|
<a href="/sites/<?= $site['id'] ?>/dashboard" class="btn btn-outline-dark" title="WP Dashboard">
|
|
<i class="bi bi-sliders"></i>
|
|
</a>
|
|
<a href="/sites/<?= $site['id'] ?>/seo" class="btn btn-outline-primary" title="SEO Panel">
|
|
<i class="bi bi-graph-up"></i>
|
|
</a>
|
|
<a href="/sites/<?= $site['id'] ?>/topics" class="btn btn-outline-info" title="Tematy">
|
|
<i class="bi bi-tags"></i>
|
|
</a>
|
|
<a href="/sites/<?= $site['id'] ?>/categories" class="btn btn-outline-warning" title="Kategorie">
|
|
<i class="bi bi-folder"></i>
|
|
</a>
|
|
<button class="btn btn-outline-success btn-test-connection" data-site-id="<?= $site['id'] ?>" title="Test połączenia">
|
|
<i class="bi bi-wifi"></i>
|
|
</button>
|
|
<form method="post" action="/sites/<?= $site['id'] ?>/delete" class="d-inline" data-confirm="Na pewno usunac te strone?">
|
|
<button type="submit" class="btn btn-outline-danger" title="Usuń">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|