- Create SQL migration for prompt templates used in article and image generation. - Add migration to change publish interval from days to hours in the sites table. - Implement InstallerController to handle installation requests and validation. - Develop FtpService for FTP connections and file uploads. - Create InstallerService to manage the WordPress installation process, including downloading, extracting, and configuring WordPress. - Add index view for the installer with form inputs for FTP, database, and WordPress admin settings. - Implement progress tracking for the installation process with AJAX polling.
77 lines
4.1 KiB
PHP
77 lines
4.1 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>Interwał</th>
|
|
<th>Ostatnia publikacja</th>
|
|
<th>Status</th>
|
|
<th>Akcje</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (empty($sites)): ?>
|
|
<tr><td colspan="7" 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>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'] ?>/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" onsubmit="return confirm('Na pewno usunąć tę stronę?')">
|
|
<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>
|