Anniversary
|
After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
@@ -1,12 +1,12 @@
|
||||
/* ========================================================= */
|
||||
/* Styles généraux page Christmas list */
|
||||
/* Styles généraux page gift list */
|
||||
/* ========================================================= */
|
||||
|
||||
.pf-christmas-list h1 {
|
||||
.pf-gift-list h1 {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.pf-christmas-list p {
|
||||
.pf-gift-list p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 12px;
|
||||
font-size: 13px;
|
||||
@@ -42,6 +42,18 @@
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
/* Désactiver la grille uniquement pour la vue Anniversary */
|
||||
.pf-gift-list .cl-view-anniversary .cl-occasion-children-tables {
|
||||
display: block; /* remplace la grid */
|
||||
}
|
||||
|
||||
.pf-gift-list .cl-view-anniversary .cl-child-table {
|
||||
width: 100%;
|
||||
min-width: 720px; /* ajuste si nécessaire avec 6 colonnes */
|
||||
margin-bottom: 12px; /* espacement entre tables */
|
||||
overflow-x: auto; /* sécurité si ça déborde sur petit écran */
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.cl-occasion-children-tables {
|
||||
grid-template-columns: repeat(2, minmax(280px, 1fr));
|
||||
@@ -504,3 +516,28 @@
|
||||
.cl-gift-delete {
|
||||
color: #b91c1c !important;
|
||||
} /* poubelle rouge forcé */
|
||||
|
||||
.cl-titlebar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.cl-view-switch {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
.cl-view-btn {
|
||||
padding: 6px 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 6px;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
.cl-view-btn.is-active {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
border-color: #333;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../../includes/auth.php';
|
||||
require_login('/christmas-list.php');
|
||||
require_login('/gift-list.php');
|
||||
|
||||
require __DIR__ . '/../../includes/db.php';
|
||||
|
||||
@@ -10,11 +10,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if ($action === 'delete') {
|
||||
$gift_id = (int)($_POST['gift_id'] ?? 0);
|
||||
if ($gift_id > 0) {
|
||||
$stmt = $pdo->prepare("DELETE FROM pf_christmas_gifts WHERE id = :id");
|
||||
$stmt = $pdo->prepare("DELETE FROM pf_gift_gifts WHERE id = :id");
|
||||
$stmt->execute(['id' => $gift_id]);
|
||||
}
|
||||
|
||||
header('Location: /christmas-list.php');
|
||||
header('Location: /gift-list.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$gift_id = (int)($_POST['gift_id'] ?? 0);
|
||||
if ($gift_id > 0 && $adult_name && $payer_name && $child_name && $occasion && $gift_desc) {
|
||||
$stmt = $pdo->prepare("
|
||||
UPDATE pf_christmas_gifts
|
||||
UPDATE pf_gift_gifts
|
||||
SET year = :year,
|
||||
adult_name = :adult_name,
|
||||
payer_name = :payer_name,
|
||||
@@ -60,14 +60,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
]);
|
||||
}
|
||||
|
||||
header('Location: /christmas-list.php');
|
||||
header('Location: /gift-list.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
// create (par défaut)
|
||||
if ($adult_name && $payer_name && $child_name && $occasion && $gift_desc) {
|
||||
$stmt = $pdo->prepare("
|
||||
INSERT INTO pf_christmas_gifts
|
||||
INSERT INTO pf_gift_gifts
|
||||
(year, adult_name, payer_name, child_name, occasion, gift_description, product_link, amount)
|
||||
VALUES
|
||||
(:year, :adult_name, :payer_name, :child_name, :occasion, :gift_description, :product_link, :amount)
|
||||
@@ -84,6 +84,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
]);
|
||||
}
|
||||
|
||||
header('Location: /christmas-list.php');
|
||||
header('Location: /gift-list.php');
|
||||
exit;
|
||||
}
|
||||