zmiany w wygladzie i nowe funkcje
This commit is contained in:
parent
79d777d9b3
commit
0669d1ba6b
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ __pycache__
|
||||
data/
|
||||
instance/
|
||||
venv/
|
||||
config.py
|
33
app.py
33
app.py
@ -8,14 +8,8 @@ import markdown as md
|
||||
from flask import abort
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///baza.db'
|
||||
|
||||
app.config['SECRET_KEY'] = 'tajny_klucz'
|
||||
|
||||
# Konfiguracja rejestracji i admina
|
||||
app.config['ALLOW_REGISTRATION'] = False
|
||||
app.config['MAIN_ADMIN_USERNAME'] = 'admin'
|
||||
app.config['MAIN_ADMIN_PASSWORD'] = 'admin'
|
||||
# Ładujemy konfigurację z pliku config.py
|
||||
app.config.from_object('config.Config')
|
||||
|
||||
db = SQLAlchemy(app)
|
||||
login_manager = LoginManager(app)
|
||||
@ -264,8 +258,31 @@ def create_admin_account():
|
||||
db.session.add(main_admin)
|
||||
db.session.commit()
|
||||
|
||||
@app.after_request
|
||||
def add_security_headers(response):
|
||||
if app.config.get("BLOCK_BOTS", False):
|
||||
cache_control = app.config.get("CACHE_CONTROL_HEADER")
|
||||
if cache_control:
|
||||
response.headers["Cache-Control"] = cache_control
|
||||
# Jeśli Cache-Control jest ustawiony, usuwamy Pragma
|
||||
response.headers.pop("Pragma", None)
|
||||
else:
|
||||
response.headers["Cache-Control"] = "no-store, no-cache, must-revalidate, max-age=0"
|
||||
response.headers["Pragma"] = app.config.get("PRAGMA_HEADER", "no-cache")
|
||||
response.headers["X-Robots-Tag"] = app.config.get("ROBOTS_TAG", "noindex, nofollow, nosnippet, noarchive")
|
||||
return response
|
||||
|
||||
|
||||
@app.route('/robots.txt')
|
||||
def robots():
|
||||
if app.config.get("BLOCK_BOTS", False):
|
||||
# Instrukcje dla robotów – blokujemy indeksowanie całej witryny
|
||||
robots_txt = "User-agent: *\nDisallow: /"
|
||||
else:
|
||||
# Jeśli blokowanie botów wyłączone, można zwrócić pusty plik lub inne ustawienia
|
||||
robots_txt = "User-agent: *\nAllow: /"
|
||||
return robots_txt, 200, {'Content-Type': 'text/plain'}
|
||||
|
||||
if __name__ == '__main__':
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
|
14
config.example.py
Normal file
14
config.example.py
Normal file
@ -0,0 +1,14 @@
|
||||
# config.py
|
||||
|
||||
class Config:
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:///baza.db'
|
||||
SECRET_KEY = 'tajny_klucz'
|
||||
|
||||
# Konfiguracja rejestracji i admina
|
||||
ALLOW_REGISTRATION = False
|
||||
MAIN_ADMIN_USERNAME = 'admin'
|
||||
MAIN_ADMIN_PASSWORD = 'admin'
|
||||
# Konfiguracja ochrony przed indeksowaniem
|
||||
BLOCK_BOTS = True
|
||||
CACHE_CONTROL_HEADER = "max-age=10"
|
||||
ROBOTS_TAG = "noindex, nofollow, nosnippet, noarchive"
|
@ -1,31 +1,154 @@
|
||||
/* custom.css */
|
||||
/* Import czcionki Roboto */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
|
||||
|
||||
/* Dodatkowy odstęp od góry strony */
|
||||
/* Ustawienia globalne */
|
||||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
background-color: #121212;
|
||||
color: #dcdcdc;
|
||||
padding-top: 60px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Zwiększona wysokość progress baru */
|
||||
/* Nawigacja */
|
||||
.navbar {
|
||||
background-color: #1c1c1c;
|
||||
border-bottom: 1px solid #444;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
color: #f5f5f5;
|
||||
font-weight: bold;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
color: #cccccc;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: #ffc107;
|
||||
}
|
||||
|
||||
/* Karty */
|
||||
.card {
|
||||
background-color: #1c1c1c;
|
||||
border: none;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.6);
|
||||
margin-bottom: 20px;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background-color: #272727;
|
||||
border-bottom: 1px solid #444;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
/* Przyciski */
|
||||
.btn {
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
transition: background-color 0.3s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #333333;
|
||||
border-color: #444444;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #444444;
|
||||
border-color: #555555;
|
||||
}
|
||||
|
||||
/* Linki */
|
||||
a {
|
||||
color: #ffc107;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #ffeb3b;
|
||||
}
|
||||
|
||||
/* Progress Bar */
|
||||
.progress {
|
||||
background-color: #2a2a2a;
|
||||
border-radius: 0.5rem;
|
||||
height: 35px;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
/* Ujednolicenie wyglądu kart */
|
||||
.card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Drobne poprawki przycisków */
|
||||
.btn {
|
||||
text-transform: uppercase;
|
||||
.progress-bar {
|
||||
background: linear-gradient(90deg, #ffc107, #ffeb3b);
|
||||
font-weight: bold;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
/* Ewentualne zmiany przy linkach */
|
||||
a {
|
||||
color: #ffc107;
|
||||
/* Alerty (flash messages) */
|
||||
.alert {
|
||||
opacity: 0;
|
||||
animation: fadeIn 0.5s forwards;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
a:hover {
|
||||
color: #ffeb3b;
|
||||
|
||||
@keyframes fadeIn {
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
/* Dodatkowe marginesy */
|
||||
.container {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
/* Responsywność */
|
||||
@media (max-width: 767px) {
|
||||
.card {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.card-title {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.btn {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.7rem;
|
||||
margin-bottom: 0.9rem;
|
||||
}
|
||||
|
||||
/* Style dla bloku "Wspomóż" */
|
||||
.card.wspomoz-card {
|
||||
border: 1px solid #ffc107 !important; /* Akcentujące obramowanie */
|
||||
border-radius: 0.2rem !important;
|
||||
}
|
||||
|
||||
.card.wspomoz-card .card-body,
|
||||
.card.wspomoz-card .card-title,
|
||||
.card.wspomoz-card .card-text {
|
||||
color: #ffffff !important; /* Bardzo ciemny kolor tekstu */
|
||||
}
|
||||
|
@ -1,8 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Dodaj wpłatę{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Dodaj wpłatę do zbiórki: {{ zbiorka.nazwa }}</h1>
|
||||
<form method="post">
|
||||
<div class="container my-4">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-warning text-dark">
|
||||
<h3 class="card-title mb-0">Dodaj wpłatę do zbiórki: {{ zbiorka.nazwa }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="kwota" class="form-label">Kwota wpłaty (PLN)</label>
|
||||
<input type="number" step="0.01" class="form-control" id="kwota" name="kwota" required>
|
||||
@ -12,5 +17,8 @@
|
||||
<textarea class="form-control" id="opis" name="opis" rows="3"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success">Dodaj wpłatę</button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,9 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Dodaj zbiórkę{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Dodaj nową zbiórkę</h1>
|
||||
<form method="post">
|
||||
<!-- Pozostałe pola formularza -->
|
||||
<div class="container my-4">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-success text-white">
|
||||
<h3 class="card-title mb-0">Dodaj nową zbiórkę</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="nazwa" class="form-label">Nazwa zbiórki</label>
|
||||
<input type="text" class="form-control" id="nazwa" name="nazwa" required>
|
||||
@ -29,8 +33,10 @@
|
||||
<label class="form-check-label" for="ukryj_kwote">Ukryj kwoty (cel i stan)</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success">Dodaj zbiórkę</button>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Inicjalizacja edytora Markdown (SimpleMDE) -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||
|
@ -1,11 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Panel Admina{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Panel Admina</h1>
|
||||
<div class="mb-3">
|
||||
<div class="container my-4">
|
||||
<h3 class="mb-4">Panel Admina</h3>
|
||||
<div class="mb-3">
|
||||
<a href="{{ url_for('dodaj_zbiorka') }}" class="btn btn-success">Dodaj zbiórkę</a>
|
||||
</div>
|
||||
<table class="table table-dark table-striped">
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
@ -42,9 +44,11 @@
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">Brak zbiórek</td>
|
||||
<td colspan="4" class="text-center">Brak zbiórek</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,9 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Edytuj zbiórkę{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Edytuj zbiórkę</h1>
|
||||
<form method="post">
|
||||
<!-- Pozostałe pola formularza -->
|
||||
<div class="container my-4">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h3 class="card-title mb-0">Edytuj zbiórkę</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="nazwa" class="form-label">Nazwa zbiórki</label>
|
||||
<input type="text" class="form-control" id="nazwa" name="nazwa" value="{{ zbiorka.nazwa }}" required>
|
||||
@ -29,8 +33,10 @@
|
||||
<label class="form-check-label" for="ukryj_kwote">Ukryj kwoty (cel i stan)</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Zaktualizuj zbiórkę</button>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Inicjalizacja edytora Markdown (SimpleMDE) -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||
|
@ -1,13 +1,24 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Edytuj stan zbiórki{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Edytuj stan zbiórki: {{ zbiorka.nazwa }}</h1>
|
||||
<form method="post">
|
||||
<div class="container my-4">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-info text-white">
|
||||
<h3 class="card-title mb-0">Edytuj stan zbiórki: {{ zbiorka.nazwa }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="stan" class="form-label">Nowy stan zbiórki (PLN)</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">PLN</span>
|
||||
<input type="number" step="0.01" class="form-control" id="stan" name="stan" value="{{ zbiorka.stan }}" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Aktualizuj stan</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-info">Aktualizuj stan</button>
|
||||
<a href="{{ url_for('admin_dashboard') }}" class="btn btn-secondary">Powrót</a>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -2,6 +2,7 @@
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{% block title %}Aplikacja Zbiórek{% endblock %}</title>
|
||||
<!-- Bootswatch Darkly - atrakcyjny ciemny motyw -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.0/dist/darkly/bootstrap.min.css">
|
||||
|
@ -1,12 +1,23 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Lista Zbiórek{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Lista Zbiórek</h1>
|
||||
<div class="list-group">
|
||||
<h1 class="mb-4">Lista Zbiórek</h1>
|
||||
<div class="row">
|
||||
{% for z in zbiorki %}
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=z.id) }}" class="list-group-item list-group-item-action bg-secondary text-light">
|
||||
{{ z.nazwa }}
|
||||
</a>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ z.nazwa }}</h5>
|
||||
{% set progress = (z.stan / z.cel * 100) if z.cel > 0 else 0 %}
|
||||
<div class="progress mb-3" style="height: 20px;">
|
||||
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: {{ progress if progress < 100 else 100 }}%;" aria-valuenow="{{ progress }}" aria-valuemin="0" aria-valuemax="100">
|
||||
{{ progress|round(2) }}%
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=z.id) }}" class="btn btn-primary btn-sm">Wejdź do zbiórki</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Brak zbiórek</p>
|
||||
{% endfor %}
|
||||
|
@ -1,8 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Logowanie{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Logowanie</h1>
|
||||
<form method="post">
|
||||
<div class="container my-4">
|
||||
<h3 class="mb-4">Logowanie</h3>
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Nazwa użytkownika</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required>
|
||||
@ -12,6 +13,7 @@
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Zaloguj</button>
|
||||
</form>
|
||||
<p class="mt-3">Nie masz konta? <a href="{{ url_for('register') }}">Zarejestruj się</a></p>
|
||||
</form>
|
||||
<p class="mt-3">Nie masz konta? <a href="{{ url_for('register') }}">Zarejestruj się</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,8 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Rejestracja{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Rejestracja</h1>
|
||||
<form method="post">
|
||||
<div class="container my-4">
|
||||
<h3 class="mb-4">Rejestracja</h3>
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Nazwa użytkownika</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required>
|
||||
@ -12,5 +13,6 @@
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Zarejestruj się</button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -2,23 +2,19 @@
|
||||
{% block title %}{{ zbiorka.nazwa }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container my-4">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h1 class="card-title">{{ zbiorka.nazwa }}</h1>
|
||||
<!-- Główna karta zbiórki -->
|
||||
<div class="card mb-4 shadow-sm">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h2 class="card-title mb-0">{{ zbiorka.nazwa }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Opis zbiórki renderowany przy użyciu Markdown -->
|
||||
<div class="row">
|
||||
<!-- Lewa kolumna: opis i postęp -->
|
||||
<div class="col-md-8">
|
||||
<h5>Opis zbiórki</h5>
|
||||
<div class="mb-3">
|
||||
{{ zbiorka.opis | markdown }}
|
||||
</div>
|
||||
<ul class="list-group list-group-flush mb-3">
|
||||
<li class="list-group-item"><strong>Numer konta:</strong> {{ zbiorka.numer_konta }}</li>
|
||||
<li class="list-group-item"><strong>Numer telefonu BLIK:</strong> {{ zbiorka.numer_telefonu_blik }}</li>
|
||||
{% if not zbiorka.ukryj_kwote %}
|
||||
<li class="list-group-item"><strong>Cel zbiórki:</strong> {{ zbiorka.cel }} PLN</li>
|
||||
<li class="list-group-item"><strong>Stan zbiórki:</strong> {{ zbiorka.stan }} PLN</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% set progress = (zbiorka.stan / zbiorka.cel * 100) if zbiorka.cel > 0 else 0 %}
|
||||
<h5>Postęp zbiórki</h5>
|
||||
<div class="progress mb-3" style="height: 40px;">
|
||||
@ -28,6 +24,36 @@
|
||||
{{ progress|round(2) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Prawa kolumna: sekcja "Wspomóż" -->
|
||||
<div class="col-md-4">
|
||||
<div class="card wspomoz-card mb-3">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Wspomóż</h5>
|
||||
<p class="card-text">
|
||||
<strong>Numer konta:</strong>
|
||||
<span class="fs-4">{{ zbiorka.numer_konta }}</span>
|
||||
</p>
|
||||
<p class="card-text">
|
||||
<strong>Telefon BLIK:</strong>
|
||||
<span class="fs-4">{{ zbiorka.numer_telefonu_blik }}</span>
|
||||
</p>
|
||||
{% if not zbiorka.ukryj_kwote %}
|
||||
<p class="card-text">
|
||||
<strong>Cel zbiórki:</strong>
|
||||
<span class="fs-4">{{ zbiorka.cel }} PLN</span>
|
||||
</p>
|
||||
<p class="card-text">
|
||||
<strong>Stan zbiórki:</strong>
|
||||
<span class="fs-4">{{ zbiorka.stan }} PLN</span>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
{% if current_user.is_authenticated and current_user.is_admin %}
|
||||
<a href="{{ url_for('admin_dodaj_wplate', zbiorka_id=zbiorka.id) }}" class="btn btn-primary">Dodaj wpłatę</a>
|
||||
@ -37,22 +63,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Wpłaty</h2>
|
||||
<!-- Karta z historią wpłat -->
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-secondary text-white">
|
||||
<h3 class="card-title mb-0">Historia wpłat</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if zbiorka.wplaty|length > 0 %}
|
||||
<ul class="list-group">
|
||||
{% for w in zbiorka.wplaty %}
|
||||
<li class="list-group-item">
|
||||
<strong>{{ w.data.strftime('%Y-%m-%d %H:%M:%S') }}:</strong> {{ w.kwota }} PLN
|
||||
{% if w.opis %} – {{ w.opis }}{% endif %}
|
||||
<strong>{{ w.data.strftime('%Y-%m-%d %H:%M:%S') }}</strong> – {{ w.kwota }} PLN
|
||||
{% if w.opis %}
|
||||
<em class="text-muted">({{ w.opis }})</em>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>Brak wpłat</p>
|
||||
<p class="text-center">Brak wpłat</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user