Dateien nach "includes" hochladen
This commit is contained in:
40
includes/help-tab.php
Normal file
40
includes/help-tab.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
// Diese Datei wird in der Haupt-Admin-Datei included.
|
||||||
|
?>
|
||||||
|
<div class="teamcard-tab-content">
|
||||||
|
<h2>Hilfe & Dokumentation</h2>
|
||||||
|
<div class="help-section">
|
||||||
|
<h3>Shortcode verwenden</h3>
|
||||||
|
<p>Um alle Teammitglieder anzuzeigen, verwenden Sie:</p>
|
||||||
|
<code>[teamcards]</code>
|
||||||
|
|
||||||
|
<p>Um nur eine bestimmte Kategorie anzuzeigen:</p>
|
||||||
|
<code>[teamcards kategorie="management"]</code>
|
||||||
|
|
||||||
|
<p>Um einen bestimmten Card-Typ zu erzwingen (überschreibt die Einstellung des Mitglieds):</p>
|
||||||
|
<code>[teamcards type="featured"]</code>
|
||||||
|
|
||||||
|
<p>Um die Anzahl der Spalten zu ändern (überschreibt die globale Einstellung):</p>
|
||||||
|
<code>[teamcards columns="3"]</code>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="help-section">
|
||||||
|
<h3>Card-Typen</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>Standard Card:</strong> Die klassische Card mit Bild oben und Text darunter.</li>
|
||||||
|
<li><strong>Compact Card:</strong> Eine platzsparende Version, ideal für lange Listen.</li>
|
||||||
|
<li><strong>Featured Card:</strong> Eine hervorgehobene Card mit zentriertem Layout und besonderem Styling.</li>
|
||||||
|
<li><strong>Flip Card:</strong> Eine interaktive Card, die beim Hover gedreht wird, um zusätzliche Informationen (z.B. "Über mich") auf der Rückseite zu zeigen.</li>
|
||||||
|
<li><strong>Profile Card:</strong> Eine Card mit dem Bild als Hintergrund, ideal für ein modernes, visuelles Profil.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="help-section">
|
||||||
|
<h3>Support</h3>
|
||||||
|
<p>Für Support und Fragen kontaktieren Sie uns bitte über:</p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://discord.com/invite/FdRs4BRd8D" target="_blank">Discord Support</a></li>
|
||||||
|
<li><a href="https://t.me/M_Viper04" target="_blank">Telegram Support</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
12
includes/settings-tab.php
Normal file
12
includes/settings-tab.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
// Diese Datei wird in der Haupt-Admin-Datei included.
|
||||||
|
?>
|
||||||
|
<div class="teamcard-tab-content">
|
||||||
|
<form action="options.php" method="post">
|
||||||
|
<?php
|
||||||
|
settings_fields('teamcard_settings_group');
|
||||||
|
do_settings_sections('teamcard_settings');
|
||||||
|
submit_button('Einstellungen speichern');
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
93
includes/team-members-tab.php
Normal file
93
includes/team-members-tab.php
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
// Diese Datei wird in der Haupt-Admin-Datei included.
|
||||||
|
?>
|
||||||
|
<div class="teamcard-tab-content">
|
||||||
|
<p><strong>Hinweis:</strong> Beim Löschen des Plugins werden alle Teammitglieder und zugehörigen Daten unwiderruflich aus der Datenbank entfernt. Bitte erstellen Sie ein Backup, falls Sie die Daten behalten möchten.</p>
|
||||||
|
|
||||||
|
<div class="teamcard-add-new-form">
|
||||||
|
<h2>Neues Teammitglied hinzufügen</h2>
|
||||||
|
<div class="form-fields">
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="new-teamcard-name">Name:</label>
|
||||||
|
<input type="text" id="new-teamcard-name" placeholder="Name eingeben" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="new-teamcard-funktion">Funktion:</label>
|
||||||
|
<input type="text" id="new-teamcard-funktion" placeholder="Funktion eingeben">
|
||||||
|
</div>
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="new-teamcard-zustaendigkeit">Zuständigkeit / Über mich:</label>
|
||||||
|
<textarea id="new-teamcard-zustaendigkeit" placeholder="Zuständigkeit oder Text für die Rückseite der Flip-Card eingeben"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="new-teamcard-card-type">Card-Typ:</label>
|
||||||
|
<select id="new-teamcard-card-type">
|
||||||
|
<option value="standard">Standard Card</option>
|
||||||
|
<option value="compact">Compact Card</option>
|
||||||
|
<option value="featured">Featured Card</option>
|
||||||
|
<!-- NEUE OPTIONEN -->
|
||||||
|
<option value="flip">Flip Card</option>
|
||||||
|
<option value="profile">Profile Card</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-field">
|
||||||
|
<label>Bild:</label>
|
||||||
|
<div class="image-preview-container">
|
||||||
|
<img id="new-teamcard-bild-vorschau" src="" style="display:none; max-width:100px;">
|
||||||
|
</div>
|
||||||
|
<input type="hidden" id="new-teamcard-bild-id" value="">
|
||||||
|
<button type="button" class="button" id="new-teamcard-bild-button">Bild auswählen</button>
|
||||||
|
</div>
|
||||||
|
<div class="form-field">
|
||||||
|
<button type="button" id="add-teamcard-button" class="button button-primary">Teammitglied hinzufügen</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Vorhandene Teammitglieder</h2>
|
||||||
|
<p>Ziehe die Zeilen, um die Reihenfolge zu ändern. Klicke auf die Felder, um sie zu bearbeiten.</p>
|
||||||
|
|
||||||
|
<table class="wp-list-table widefat fixed striped teamcard-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="column-thumbnail">Bild</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Funktion</th>
|
||||||
|
<th>Zuständigkeit</th>
|
||||||
|
<th>Typ</th>
|
||||||
|
<th>Aktionen</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="teamcard-list">
|
||||||
|
<?php
|
||||||
|
$teamcards = get_posts(['post_type' => 'teamcard', 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC']);
|
||||||
|
foreach ($teamcards as $teamcard) {
|
||||||
|
$funktion = get_post_meta($teamcard->ID, '_teamcard_funktion', true);
|
||||||
|
$zustaendigkeit = get_post_meta($teamcard->ID, '_teamcard_zustaendigkeit', true);
|
||||||
|
$bild_id = get_post_meta($teamcard->ID, '_teamcard_bild_id', true);
|
||||||
|
$card_type = get_post_meta($teamcard->ID, '_teamcard_card_type', true);
|
||||||
|
$bild_url = $bild_id ? wp_get_attachment_image_url($bild_id, 'thumbnail') : '';
|
||||||
|
?>
|
||||||
|
<tr data-id="<?php echo $teamcard->ID; ?>" class="teamcard-item">
|
||||||
|
<td class="teamcard-bild-column">
|
||||||
|
<div class="image-preview-container">
|
||||||
|
<?php if ($bild_url): ?>
|
||||||
|
<img src="<?php echo esc_url($bild_url); ?>" class="teamcard-bild-vorschau">
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="button teamcard-bild-button" data-id="<?php echo $teamcard->ID; ?>">Ändern</button>
|
||||||
|
</td>
|
||||||
|
<td><div class="editable" data-field="title" data-id="<?php echo $teamcard->ID; ?>"><?php echo esc_html($teamcard->post_title); ?></div></td>
|
||||||
|
<td><div class="editable" data-field="funktion" data-id="<?php echo $teamcard->ID; ?>"><?php echo esc_html($funktion); ?></div></td>
|
||||||
|
<td><div class="editable" data-field="zustaendigkeit" data-id="<?php echo $teamcard->ID; ?>"><?php echo esc_html($zustaendigkeit); ?></div></td>
|
||||||
|
<td><?php echo esc_html(ucfirst($card_type ?: 'standard')); ?></td>
|
||||||
|
<td><button type="button" class="button button-small teamcard-delete" data-id="<?php echo $teamcard->ID; ?>">Löschen</button></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="teamcard-message" class="notice" style="display:none;"></div>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user