Enhance UI and functionality for admin dashboard and user management
- Update `_base_context` to include `active_nav` for dynamic navigation highlighting. - Revamp `base.html` to improve header layout and navigation links for better user experience. - Redesign `dashboard.html` to include statistics for new and edited articles, enhancing visibility of content changes. - Improve `users.html` layout for user management, adding detailed user roles and status indicators. - Update CSS styles for a cohesive design across the application, introducing new color variables and layout adjustments.
This commit is contained in:
@@ -93,10 +93,15 @@ def _bootstrap_admin() -> None:
|
||||
|
||||
|
||||
def _base_context(request: Request, user: User, db: Session) -> dict:
|
||||
path = request.url.path
|
||||
active_nav = "dashboard"
|
||||
if path.startswith("/admin/users"):
|
||||
active_nav = "users"
|
||||
return {
|
||||
"user": user,
|
||||
"csrf_token": request.cookies.get(CSRF_COOKIE_NAME) or ensure_csrf_cookie(request),
|
||||
"smtp": get_smtp_settings(db),
|
||||
"active_nav": active_nav,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,17 +10,24 @@ LINE = "=" * 78
|
||||
SUBLINE = "-" * 78
|
||||
|
||||
FONT = "Arial, Helvetica, sans-serif"
|
||||
# Thomas-Krenn.AG Corporate Design (Orange + Anthrazit)
|
||||
COLOR_TK_ORANGE = "#ED6B06"
|
||||
COLOR_TK_ORANGE_DARK = "#C95605"
|
||||
COLOR_TK_ORANGE_LIGHT = "#FFF4ED"
|
||||
COLOR_TK_GRAY_DARK = "#4A4A4A"
|
||||
COLOR_TK_GRAY = "#6B6B6B"
|
||||
COLOR_TK_GRAY_LIGHT = "#F5F5F5"
|
||||
COLOR_TEXT = "#1A1A1A"
|
||||
COLOR_MUTED = "#5C6670"
|
||||
COLOR_HEADING = "#003366"
|
||||
COLOR_LINK = "#0055A4"
|
||||
COLOR_BORDER = "#D7DEE8"
|
||||
COLOR_BG = "#EEF2F7"
|
||||
COLOR_MUTED = COLOR_TK_GRAY
|
||||
COLOR_HEADING = COLOR_TK_GRAY_DARK
|
||||
COLOR_LINK = COLOR_TK_ORANGE
|
||||
COLOR_BORDER = "#E0E0E0"
|
||||
COLOR_BG = COLOR_TK_GRAY_LIGHT
|
||||
COLOR_WHITE = "#FFFFFF"
|
||||
COLOR_ACCENT_NEW = "#1F7A4D"
|
||||
COLOR_ACCENT_NEW_BG = "#E8F6EE"
|
||||
COLOR_ACCENT_EDIT = "#0055A4"
|
||||
COLOR_ACCENT_EDIT_BG = "#E8F1FA"
|
||||
COLOR_ACCENT_NEW = COLOR_TK_ORANGE
|
||||
COLOR_ACCENT_NEW_BG = COLOR_TK_ORANGE_LIGHT
|
||||
COLOR_ACCENT_EDIT = COLOR_TK_GRAY_DARK
|
||||
COLOR_ACCENT_EDIT_BG = "#EEEEEE"
|
||||
|
||||
|
||||
class DisplayOptions(TypedDict):
|
||||
@@ -204,18 +211,18 @@ def create_html(
|
||||
<td align="center" style="padding:28px 16px;font-family:{FONT};">
|
||||
<table role="presentation" width="680" cellpadding="0" cellspacing="0" border="0" style="width:680px;max-width:680px;background:{COLOR_WHITE};border:1px solid {COLOR_BORDER};font-family:{FONT};">
|
||||
<tr>
|
||||
<td style="height:5px;background:{COLOR_LINK};font-size:0;line-height:0;"> </td>
|
||||
<td style="height:5px;background:{COLOR_TK_ORANGE};font-size:0;line-height:0;"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background:{COLOR_HEADING};padding:30px 36px 28px;font-family:{FONT};">
|
||||
<p style="margin:0;font-family:{FONT};font-size:11px;line-height:16px;letter-spacing:1.2px;text-transform:uppercase;color:#A9C6E8;">Interner Newsletter</p>
|
||||
<td style="background:{COLOR_TK_GRAY_DARK};padding:30px 36px 28px;font-family:{FONT};">
|
||||
<p style="margin:0;font-family:{FONT};font-size:11px;line-height:16px;letter-spacing:1.2px;text-transform:uppercase;color:{COLOR_TK_ORANGE};">Interner Newsletter</p>
|
||||
<h1 style="margin:10px 0 0;font-family:{FONT};font-size:28px;line-height:34px;font-weight:bold;color:{COLOR_WHITE};">Thomas-Krenn Wiki Update</h1>
|
||||
<p style="margin:10px 0 0;font-family:{FONT};font-size:14px;line-height:21px;color:#D9E8F8;">{escape(ORG_NAME)}</p>
|
||||
<p style="margin:10px 0 0;font-family:{FONT};font-size:14px;line-height:21px;color:#CCCCCC;">{escape(ORG_NAME)}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:28px 36px 0;font-family:{FONT};">
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="background:{COLOR_BG};border-left:4px solid {COLOR_LINK};font-family:{FONT};">
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="background:{COLOR_TK_ORANGE_LIGHT};border-left:4px solid {COLOR_TK_ORANGE};font-family:{FONT};">
|
||||
<tr>
|
||||
<td style="padding:18px 20px;font-family:{FONT};font-size:15px;line-height:24px;color:{COLOR_TEXT};">
|
||||
<p style="margin:0 0 10px;font-family:{FONT};font-size:15px;line-height:24px;">Liebe Kolleginnen und Kollegen,</p>
|
||||
@@ -237,7 +244,7 @@ def create_html(
|
||||
{summary}
|
||||
<table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin:32px auto 0;font-family:{FONT};">
|
||||
<tr>
|
||||
<td align="center" style="background:{COLOR_HEADING};padding:14px 28px;font-family:{FONT};">
|
||||
<td align="center" style="background:{COLOR_TK_ORANGE};padding:14px 28px;font-family:{FONT};">
|
||||
<a href="{WIKI_HOME_URL}" style="font-family:{FONT};font-size:14px;line-height:20px;font-weight:bold;color:{COLOR_WHITE};text-decoration:none;">Zum Thomas-Krenn-Wiki →</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -258,12 +265,37 @@ def create_html(
|
||||
|
||||
|
||||
OUTLOOK_FONT = "Arial, sans-serif"
|
||||
OUTLOOK_TEXT = "#000000"
|
||||
OUTLOOK_MUTED = "#666666"
|
||||
OUTLOOK_LINK = "#0563C1"
|
||||
OUTLOOK_HEADING = "#003366"
|
||||
OUTLOOK_BORDER = "#DDDDDD"
|
||||
OUTLOOK_WHITE = "#FFFFFF"
|
||||
OUTLOOK_TEXT = COLOR_TEXT
|
||||
OUTLOOK_MUTED = COLOR_TK_GRAY
|
||||
OUTLOOK_LINK = COLOR_TK_ORANGE
|
||||
OUTLOOK_HEADING = COLOR_TK_GRAY_DARK
|
||||
OUTLOOK_BORDER = COLOR_BORDER
|
||||
OUTLOOK_WHITE = COLOR_WHITE
|
||||
OUTLOOK_ORANGE = COLOR_TK_ORANGE
|
||||
OUTLOOK_GRAY_DARK = COLOR_TK_GRAY_DARK
|
||||
|
||||
|
||||
def _outlook_td_attrs(
|
||||
bg: str = OUTLOOK_WHITE,
|
||||
*,
|
||||
colspan: int | None = None,
|
||||
width: str | None = None,
|
||||
valign: str | None = None,
|
||||
extra_style: str = "",
|
||||
) -> str:
|
||||
"""Tabellen-Zelle mit Outlook-Dunkelmodus-Schutz (data-ogsb/data-ogsc)."""
|
||||
parts = [
|
||||
f'bgcolor="{bg}"',
|
||||
f'style="background-color:{bg} !important;color:{OUTLOOK_TEXT} !important;{extra_style}"',
|
||||
f'data-ogsb="{bg}"',
|
||||
]
|
||||
if colspan:
|
||||
parts.insert(0, f'colspan="{colspan}"')
|
||||
if width:
|
||||
parts.append(f'width="{width}"')
|
||||
if valign:
|
||||
parts.append(f'valign="{valign}"')
|
||||
return " ".join(parts)
|
||||
|
||||
|
||||
def _outlook_font(
|
||||
@@ -276,14 +308,23 @@ def _outlook_font(
|
||||
inner = escape(text)
|
||||
if bold:
|
||||
inner = f"<b>{inner}</b>"
|
||||
return f'<font face="Arial" color="{color}" size="{size}">{inner}</font>'
|
||||
|
||||
|
||||
def _outlook_link(title: str, url: str) -> str:
|
||||
return (
|
||||
f'<a href="{escape(url)}">'
|
||||
f'<font face="Arial" color="{OUTLOOK_LINK}" size="2">{escape(title)}</font>'
|
||||
f"</a>"
|
||||
f'<span style="color:{color} !important;" data-ogsc="{color}">'
|
||||
f'<font face="Arial" color="{color}" size="{size}">{inner}</font>'
|
||||
f"</span>"
|
||||
)
|
||||
|
||||
|
||||
def _outlook_link(title: str, url: str, *, bold: bool = True) -> str:
|
||||
weight = "<b>" if bold else ""
|
||||
weight_end = "</b>" if bold else ""
|
||||
return (
|
||||
f'<a href="{escape(url)}" '
|
||||
f'style="color:{OUTLOOK_LINK} !important;text-decoration:none !important;mso-style-priority:100 !important;">'
|
||||
f'<span style="color:{OUTLOOK_LINK} !important;" data-ogsc="{OUTLOOK_LINK}">'
|
||||
f'<font face="Arial" color="{OUTLOOK_LINK}" size="2">'
|
||||
f"{weight}{escape(title)}{weight_end}"
|
||||
f"</font></span></a>"
|
||||
)
|
||||
|
||||
|
||||
@@ -303,19 +344,20 @@ def create_outlook_html(
|
||||
|
||||
if not new_articles and not edited_articles:
|
||||
body_rows = f"""<tr>
|
||||
<td bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:12px 0;">
|
||||
<td {_outlook_td_attrs(colspan=2, extra_style="padding:12px 0;")}>
|
||||
{_outlook_font("Im gewählten Zeitraum wurden keine passenden Wiki-Änderungen gefunden.", color=OUTLOOK_MUTED)}
|
||||
</td>
|
||||
</tr>"""
|
||||
else:
|
||||
body_rows = "\n".join(
|
||||
[
|
||||
_outlook_section("Neue Artikel", new_articles, display, "Keine neuen Artikel im Zeitraum."),
|
||||
_outlook_section("Neue Artikel", new_articles, display, "Keine neuen Artikel im Zeitraum.", kind="new"),
|
||||
_outlook_section(
|
||||
"Bearbeitete Artikel",
|
||||
edited_articles,
|
||||
display,
|
||||
"Keine bearbeiteten Artikel im Zeitraum.",
|
||||
kind="edited",
|
||||
),
|
||||
]
|
||||
)
|
||||
@@ -331,7 +373,7 @@ def create_outlook_html(
|
||||
|
||||
total = len(new_articles) + len(edited_articles)
|
||||
summary_row = f"""<tr>
|
||||
<td bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:16px 0 0;border-top:1px solid {OUTLOOK_BORDER};">
|
||||
<td {_outlook_td_attrs(colspan=2, extra_style=f"padding:16px 0 0;border-top:1px solid {OUTLOOK_BORDER};")}>
|
||||
{_outlook_font("Zusammenfassung: ", color=OUTLOOK_HEADING, bold=True, size="1")}
|
||||
{_outlook_font(f"{len(new_articles)} neu · {len(edited_articles)} bearbeitet · {total} gesamt", color=OUTLOOK_MUTED, size="1")}
|
||||
</td>
|
||||
@@ -343,41 +385,55 @@ def create_outlook_html(
|
||||
<meta charset="utf-8">
|
||||
<meta name="ProgId" content="Word.Document">
|
||||
<meta name="Generator" content="Microsoft Word 15">
|
||||
<meta name="color-scheme" content="light only">
|
||||
<meta name="supported-color-schemes" content="light">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="supported-color-schemes" content="light dark">
|
||||
<title>{subject}</title>
|
||||
<!--[if mso]>
|
||||
<style type="text/css">
|
||||
body, table, td, p, a, font, span, strong {{ font-family: Arial, sans-serif !important; }}
|
||||
a {{ color: {OUTLOOK_LINK} !important; }}
|
||||
body, table, td, p, font, span, strong {{ font-family: Arial, sans-serif !important; }}
|
||||
a, span.MsoHyperlink, span.MsoHyperlinkFollowed {{
|
||||
color: {OUTLOOK_LINK} !important;
|
||||
text-decoration: none !important;
|
||||
}}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<style type="text/css">
|
||||
:root {{ color-scheme: light dark; supported-color-schemes: light dark; }}
|
||||
body {{ background-color: {OUTLOOK_WHITE} !important; color: {OUTLOOK_TEXT} !important; }}
|
||||
a, a:link, a:visited, a:hover, a:active {{
|
||||
color: {OUTLOOK_LINK} !important;
|
||||
text-decoration: none !important;
|
||||
}}
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="{OUTLOOK_WHITE}" style="margin:0;padding:16px;background-color:{OUTLOOK_WHITE};">
|
||||
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="{OUTLOOK_WHITE}" style="width:600px;background-color:{OUTLOOK_WHITE};">
|
||||
<body bgcolor="{OUTLOOK_WHITE}" style="margin:0;padding:16px;background-color:{OUTLOOK_WHITE} !important;color:{OUTLOOK_TEXT} !important;" data-ogsb="{OUTLOOK_WHITE}">
|
||||
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="{OUTLOOK_WHITE}" style="width:600px;background-color:{OUTLOOK_WHITE} !important;" data-ogsb="{OUTLOOK_WHITE}">
|
||||
<tr>
|
||||
<td bgcolor="{OUTLOOK_HEADING}" style="background-color:{OUTLOOK_HEADING};padding:16px 20px;">
|
||||
{_outlook_font("Interner Newsletter", color="#A9C6E8", size="1")}<br>
|
||||
<td {_outlook_td_attrs(bg=OUTLOOK_ORANGE, extra_style="height:5px;font-size:0;line-height:0;")}> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td {_outlook_td_attrs(bg=OUTLOOK_GRAY_DARK, extra_style="padding:16px 20px;")}>
|
||||
{_outlook_font("Interner Newsletter", color=OUTLOOK_ORANGE, size="1")}<br>
|
||||
{_outlook_font("Thomas-Krenn Wiki Update", color=OUTLOOK_WHITE, size="5", bold=True)}<br>
|
||||
{_outlook_font(ORG_NAME, color="#D9E8F8", size="2")}
|
||||
{_outlook_font(ORG_NAME, color="#CCCCCC", size="2")}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:20px;">
|
||||
<td {_outlook_td_attrs(extra_style="padding:20px;")}>
|
||||
<p style="margin:0 0 8px;">{_outlook_font("Liebe Kolleginnen und Kollegen,")}</p>
|
||||
<p style="margin:0 0 12px;">{_outlook_font(intro)}</p>
|
||||
<p style="margin:0 0 16px;">{_outlook_font(f"Erstellt am: {created_at}", color=OUTLOOK_MUTED, size="1")}</p>
|
||||
{category_block}
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE} !important;" data-ogsb="{OUTLOOK_WHITE}">
|
||||
{body_rows}
|
||||
{summary_row}
|
||||
<tr>
|
||||
<td bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:20px 0 0;">
|
||||
<a href="{WIKI_HOME_URL}"><font face="Arial" color="{OUTLOOK_LINK}" size="2"><b>Zum Thomas-Krenn-Wiki →</b></font></a>
|
||||
<td {_outlook_td_attrs(colspan=2, extra_style="padding:20px 0 0;")}>
|
||||
{_outlook_link("Zum Thomas-Krenn-Wiki →", WIKI_HOME_URL)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:16px 0 0;border-top:1px solid {OUTLOOK_BORDER};">
|
||||
<td {_outlook_td_attrs(colspan=2, extra_style=f"padding:16px 0 0;border-top:1px solid {OUTLOOK_BORDER};")}>
|
||||
{_outlook_font(f"Automatisch erstellter interner Newsletter · Nur für den Gebrauch bei {ORG_NAME}", color=OUTLOOK_MUTED, size="1")}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -412,10 +468,10 @@ def _outlook_article_rows(items: list[dict[str, Any]], display: DisplayOptions)
|
||||
meta_html = f"<br>{_outlook_font(meta, color=OUTLOOK_MUTED, size='1')}"
|
||||
rows.append(
|
||||
f"""<tr>
|
||||
<td width="28" valign="top" bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:8px 8px 10px 0;border-bottom:1px solid {OUTLOOK_BORDER};">
|
||||
<td {_outlook_td_attrs(width="28", valign="top", extra_style=f"padding:8px 8px 10px 0;border-bottom:1px solid {OUTLOOK_BORDER};")}>
|
||||
{_outlook_font(f"{idx}.")}
|
||||
</td>
|
||||
<td valign="top" bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:8px 0 10px;border-bottom:1px solid {OUTLOOK_BORDER};">
|
||||
<td {_outlook_td_attrs(valign="top", extra_style=f"padding:8px 0 10px;border-bottom:1px solid {OUTLOOK_BORDER};")}>
|
||||
{_outlook_link(title, url)}{meta_html}
|
||||
</td>
|
||||
</tr>"""
|
||||
@@ -428,15 +484,17 @@ def _outlook_section(
|
||||
items: list[dict[str, Any]],
|
||||
display: DisplayOptions,
|
||||
empty_text: str,
|
||||
kind: str = "edited",
|
||||
) -> str:
|
||||
accent = OUTLOOK_ORANGE if kind == "new" else OUTLOOK_GRAY_DARK
|
||||
header = f"""<tr>
|
||||
<td colspan="2" bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:18px 0 8px;border-bottom:2px solid {OUTLOOK_HEADING};">
|
||||
{_outlook_font(f"{heading} ({len(items)})", color=OUTLOOK_HEADING, size="3", bold=True)}
|
||||
<td {_outlook_td_attrs(colspan=2, extra_style=f"padding:18px 0 8px;border-bottom:2px solid {accent};")}>
|
||||
{_outlook_font(f"{heading} ({len(items)})", color=accent, size="3", bold=True)}
|
||||
</td>
|
||||
</tr>"""
|
||||
if not items:
|
||||
return header + f"""<tr>
|
||||
<td colspan="2" bgcolor="{OUTLOOK_WHITE}" style="background-color:{OUTLOOK_WHITE};padding:8px 0;">
|
||||
<td {_outlook_td_attrs(colspan=2, extra_style="padding:8px 0;")}>
|
||||
{_outlook_font(empty_text, color=OUTLOOK_MUTED)}
|
||||
</td>
|
||||
</tr>"""
|
||||
@@ -593,7 +651,7 @@ def _html_item_row(idx: int, item: dict[str, Any], display: DisplayOptions, acce
|
||||
<tr>
|
||||
<td style="width:26px;vertical-align:top;font-family:{FONT};font-size:13px;line-height:20px;font-weight:bold;color:{accent};">{idx}.</td>
|
||||
<td style="vertical-align:top;font-family:{FONT};">
|
||||
<a href="{url}" style="font-family:{FONT};font-size:15px;line-height:22px;font-weight:bold;color:{COLOR_LINK};text-decoration:underline;">{title}</a>
|
||||
<a href="{url}" style="font-family:{FONT};font-size:15px;line-height:22px;font-weight:bold;color:{COLOR_LINK};text-decoration:none;">{title}</a>
|
||||
{meta_html}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,33 +1,659 @@
|
||||
:root {
|
||||
--tk-orange: #ED6B06;
|
||||
--tk-orange-dark: #C95605;
|
||||
--tk-orange-light: #FFF4ED;
|
||||
--tk-gray-dark: #4A4A4A;
|
||||
--tk-gray: #6B6B6B;
|
||||
--tk-gray-light: #F5F5F5;
|
||||
--tk-border: #E0E0E0;
|
||||
--tk-text: #1A1A1A;
|
||||
--tk-white: #FFFFFF;
|
||||
--tk-success: #027A48;
|
||||
--tk-success-bg: #ECFDF3;
|
||||
--tk-error: #B42318;
|
||||
--tk-error-bg: #FEF3F2;
|
||||
--tk-warning: #B54708;
|
||||
--tk-warning-bg: #FFFAEB;
|
||||
--shadow-sm: 0 1px 3px rgba(74, 74, 74, 0.08);
|
||||
--shadow-md: 0 4px 16px rgba(74, 74, 74, 0.1);
|
||||
--radius: 8px;
|
||||
--radius-lg: 12px;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
body { margin: 0; font-family: Arial, sans-serif; background: #f5f7fb; color: #1f2430; }
|
||||
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: #0c2c5a; color: #fff; }
|
||||
.container { max-width: 1100px; margin: 1rem auto; padding: 0 1rem; }
|
||||
.card { background: #fff; border: 1px solid #dde3ef; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
|
||||
.narrow { max-width: 420px; margin: 2rem auto; }
|
||||
.form-grid { display: grid; gap: 0.75rem; }
|
||||
label { display: grid; gap: 0.3rem; font-weight: 600; }
|
||||
input, button, textarea { font: inherit; padding: 0.55rem; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--tk-gray-light);
|
||||
color: var(--tk-text);
|
||||
line-height: 1.5;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
a { color: var(--tk-orange); text-decoration: none; }
|
||||
a:hover { color: var(--tk-orange-dark); text-decoration: underline; }
|
||||
|
||||
/* ── Header ── */
|
||||
.topbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 0.85rem 1.5rem;
|
||||
background: var(--tk-gray-dark);
|
||||
color: var(--tk-white);
|
||||
border-bottom: 4px solid var(--tk-orange);
|
||||
}
|
||||
|
||||
.topbar-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.topbar-logo {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: var(--tk-orange);
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.topbar h1 {
|
||||
margin: 0;
|
||||
font-size: 1.05rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.topbar-sub {
|
||||
margin: 0;
|
||||
font-size: 0.78rem;
|
||||
color: #BBBBBB;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.topbar-nav {
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.topbar-nav a {
|
||||
color: #DDDDDD;
|
||||
padding: 0.35rem 0.65rem;
|
||||
border-radius: 4px;
|
||||
font-size: 0.88rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.topbar-nav a:hover,
|
||||
.topbar-nav a.active {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: var(--tk-white);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.user-chip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.85rem;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.topbar .btn-logout {
|
||||
background: transparent;
|
||||
border: 1px solid rgba(255, 255, 255, 0.35);
|
||||
color: var(--tk-white);
|
||||
padding: 0.35rem 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.topbar .btn-logout:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
/* ── Layout ── */
|
||||
.container {
|
||||
max-width: 1140px;
|
||||
margin: 0 auto;
|
||||
padding: 1.5rem 1rem 2.5rem;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.page-header h2 {
|
||||
margin: 0 0 0.35rem;
|
||||
font-size: 1.65rem;
|
||||
color: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
.page-lead {
|
||||
margin: 0;
|
||||
color: var(--tk-gray);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.stats-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: var(--tk-white);
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1rem 1.15rem;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.stat-card.accent-new { border-left: 4px solid var(--tk-orange); }
|
||||
.stat-card.accent-edit { border-left: 4px solid var(--tk-gray-dark); }
|
||||
.stat-card.accent-total { border-left: 4px solid var(--tk-gray); }
|
||||
|
||||
.stat-value {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
color: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
.stat-card.accent-new .stat-value { color: var(--tk-orange); }
|
||||
|
||||
.stat-label {
|
||||
margin-top: 0.25rem;
|
||||
font-size: 0.85rem;
|
||||
color: var(--tk-gray);
|
||||
}
|
||||
|
||||
.layout-2col {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 280px;
|
||||
gap: 1rem;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.layout-2col { grid-template-columns: 1fr; }
|
||||
.topbar { flex-wrap: wrap; }
|
||||
}
|
||||
|
||||
/* ── Cards ── */
|
||||
.card {
|
||||
background: var(--tk-white);
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 1.25rem 1.35rem;
|
||||
margin-bottom: 1rem;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.85rem;
|
||||
border-bottom: 1px solid var(--tk-border);
|
||||
}
|
||||
|
||||
.card-header h2,
|
||||
.card-header h3,
|
||||
.card > h2,
|
||||
.card > h3 {
|
||||
margin: 0;
|
||||
color: var(--tk-gray-dark);
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.card > h2 { font-size: 1.2rem; margin-bottom: 1rem; }
|
||||
|
||||
.card-desc {
|
||||
margin: 0.35rem 0 0;
|
||||
font-size: 0.88rem;
|
||||
color: var(--tk-gray);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.card-accent-orange { border-top: 3px solid var(--tk-orange); }
|
||||
.card-accent-gray { border-top: 3px solid var(--tk-gray-dark); }
|
||||
|
||||
.sidebar-card {
|
||||
background: var(--tk-orange-light);
|
||||
border: 1px solid #F5D5BC;
|
||||
border-radius: var(--radius);
|
||||
padding: 1rem;
|
||||
margin-bottom: 0.75rem;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.sidebar-card h4 {
|
||||
margin: 0 0 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
.sidebar-card ul {
|
||||
margin: 0;
|
||||
padding-left: 1.1rem;
|
||||
color: var(--tk-gray);
|
||||
}
|
||||
|
||||
.sidebar-card li { margin-bottom: 0.3rem; }
|
||||
|
||||
.narrow { max-width: 420px; margin: 3rem auto; }
|
||||
|
||||
/* ── Forms ── */
|
||||
.form-grid { display: grid; gap: 0.85rem; }
|
||||
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.85rem;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.form-row { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
label {
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
font-weight: 600;
|
||||
font-size: 0.88rem;
|
||||
color: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
input, select, textarea, button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
padding: 0.6rem 0.75rem;
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: 6px;
|
||||
background: var(--tk-white);
|
||||
color: var(--tk-text);
|
||||
transition: border-color 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
|
||||
input:focus, select:focus, textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--tk-orange);
|
||||
box-shadow: 0 0 0 3px rgba(237, 107, 6, 0.15);
|
||||
}
|
||||
|
||||
textarea { width: 100%; resize: vertical; }
|
||||
button { width: fit-content; background: #1b5dbf; color: #fff; border: 0; border-radius: 4px; cursor: pointer; }
|
||||
.btn-secondary { background: #334155; }
|
||||
.copy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
|
||||
.copy-status { font-size: 0.92rem; color: #64748b; }
|
||||
.copy-status.success { color: #027a48; }
|
||||
.copy-status.error { color: #b42318; }
|
||||
.newsletter-preview-frame { width: 100%; min-height: 720px; border: 1px solid #D7DEE8; border-radius: 6px; background: #EEF2F7; box-shadow: 0 2px 8px rgba(0, 51, 102, 0.08); }
|
||||
.card h3 { color: #003366; margin-top: 0; }
|
||||
|
||||
.checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.checkbox input[type="checkbox"] {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
accent-color: var(--tk-orange);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.display-options {
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.85rem 1rem;
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
background: var(--tk-gray-light);
|
||||
}
|
||||
|
||||
.display-options legend {
|
||||
font-weight: 600;
|
||||
padding: 0 0.35rem;
|
||||
color: var(--tk-gray-dark);
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
/* ── Buttons ── */
|
||||
button {
|
||||
width: fit-content;
|
||||
background: var(--tk-orange);
|
||||
color: var(--tk-white);
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
padding: 0.6rem 1.1rem;
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
transition: background 0.15s, transform 0.1s;
|
||||
}
|
||||
|
||||
button:hover { background: var(--tk-orange-dark); }
|
||||
button:active { transform: scale(0.98); }
|
||||
|
||||
.btn-primary {
|
||||
background: var(--tk-orange);
|
||||
padding: 0.7rem 1.4rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.btn-block { width: 100%; }
|
||||
|
||||
.btn-secondary {
|
||||
background: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
.btn-secondary:hover { background: #3A3A3A; }
|
||||
|
||||
.btn-outline {
|
||||
background: transparent;
|
||||
border: 1px solid var(--tk-border);
|
||||
color: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
.btn-outline:hover {
|
||||
background: var(--tk-gray-light);
|
||||
border-color: var(--tk-gray);
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* ── Badges ── */
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 0.2rem 0.55rem;
|
||||
border-radius: 999px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
.badge-admin { background: var(--tk-orange-light); color: var(--tk-orange-dark); }
|
||||
.badge-editor { background: #EEEEEE; color: var(--tk-gray-dark); }
|
||||
.badge-reader { background: var(--tk-gray-light); color: var(--tk-gray); }
|
||||
|
||||
.badge-sent { background: var(--tk-success-bg); color: var(--tk-success); }
|
||||
.badge-failed { background: var(--tk-error-bg); color: var(--tk-error); }
|
||||
.badge-skipped { background: var(--tk-warning-bg); color: var(--tk-warning); }
|
||||
|
||||
.count-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 1.6rem;
|
||||
padding: 0.15rem 0.5rem;
|
||||
background: var(--tk-gray-light);
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: 999px;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
color: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
.count-badge.orange {
|
||||
background: var(--tk-orange-light);
|
||||
border-color: #F5D5BC;
|
||||
color: var(--tk-orange-dark);
|
||||
}
|
||||
|
||||
/* ── Tables ── */
|
||||
.table-wrap { overflow-x: auto; }
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
th {
|
||||
background: var(--tk-gray-light);
|
||||
color: var(--tk-gray-dark);
|
||||
font-weight: 600;
|
||||
font-size: 0.82rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
padding: 0.65rem 0.75rem;
|
||||
text-align: left;
|
||||
border-bottom: 2px solid var(--tk-border);
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0.65rem 0.75rem;
|
||||
border-bottom: 1px solid var(--tk-border);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
tbody tr:hover { background: #FAFAFA; }
|
||||
|
||||
.empty-row td {
|
||||
color: var(--tk-gray);
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
/* ── Preview & Copy ── */
|
||||
.copy-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.85rem;
|
||||
background: var(--tk-gray-light);
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid var(--tk-border);
|
||||
}
|
||||
|
||||
.copy-status {
|
||||
font-size: 0.88rem;
|
||||
color: var(--tk-gray);
|
||||
flex: 1 1 100%;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
.copy-status { flex: 1 1 auto; margin-top: 0; margin-left: 0.5rem; }
|
||||
}
|
||||
|
||||
.copy-status.success { color: var(--tk-success); }
|
||||
.copy-status.error { color: var(--tk-error); }
|
||||
|
||||
.newsletter-preview-frame {
|
||||
width: 100%;
|
||||
min-height: 640px;
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--tk-gray-light);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
.textarea-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.readonly-output {
|
||||
font-family: Consolas, "Courier New", monospace;
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.45;
|
||||
background: var(--tk-gray-light);
|
||||
}
|
||||
|
||||
.hidden-source { display: none; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th, td { border-bottom: 1px solid #e6ebf4; text-align: left; padding: 0.55rem; vertical-align: top; }
|
||||
.checkbox { display: flex; align-items: center; gap: 0.45rem; font-weight: 500; }
|
||||
.display-options { border: 1px solid #dde3ef; border-radius: 6px; padding: 0.75rem; display: grid; gap: 0.45rem; }
|
||||
.display-options legend { font-weight: 600; padding: 0 0.25rem; }
|
||||
.error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; padding: 0.6rem; border-radius: 4px; margin: 0 0 0.75rem; }
|
||||
.hint { color: #64748b; font-size: 0.92rem; margin: 0 0 0.6rem; }
|
||||
.copy-dialog-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, 0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
|
||||
.copy-dialog { width: min(900px, 100%); max-height: 90vh; background: #fff; border-radius: 8px; padding: 1rem 1.25rem; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); display: grid; gap: 0.75rem; }
|
||||
.copy-dialog h4 { margin: 0; color: #003366; }
|
||||
.copy-dialog-hint { margin: 0; color: #334155; }
|
||||
.copy-dialog-textarea { width: 100%; min-height: 320px; font-family: Consolas, "Courier New", monospace; font-size: 0.85rem; line-height: 1.4; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0.75rem; resize: vertical; }
|
||||
.copy-dialog-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
|
||||
.textarea-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
|
||||
|
||||
/* ── Collapsible ── */
|
||||
details.card-details {
|
||||
background: var(--tk-white);
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: var(--radius-lg);
|
||||
margin-bottom: 1rem;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
details.card-details > summary {
|
||||
padding: 1rem 1.35rem;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
color: var(--tk-gray-dark);
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
details.card-details > summary::-webkit-details-marker { display: none; }
|
||||
|
||||
details.card-details > summary::after {
|
||||
content: "▸";
|
||||
color: var(--tk-gray);
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
details.card-details[open] > summary::after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
details.card-details > summary:hover { background: var(--tk-gray-light); }
|
||||
|
||||
details.card-details .details-body {
|
||||
padding: 0 1.35rem 1.25rem;
|
||||
border-top: 1px solid var(--tk-border);
|
||||
}
|
||||
|
||||
/* ── Alerts ── */
|
||||
.error, .alert-error {
|
||||
color: var(--tk-error);
|
||||
background: var(--tk-error-bg);
|
||||
border: 1px solid #FECDCA;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: var(--radius);
|
||||
margin: 0 0 0.85rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.hint {
|
||||
color: var(--tk-gray);
|
||||
font-size: 0.88rem;
|
||||
margin: 0 0 0.75rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* ── Login ── */
|
||||
body.login-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
body.login-page .topbar { flex-shrink: 0; }
|
||||
|
||||
body.login-page .container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem 1rem;
|
||||
}
|
||||
|
||||
.login-card {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
border-top: 4px solid var(--tk-orange);
|
||||
}
|
||||
|
||||
.login-card h2 {
|
||||
margin: 0 0 0.35rem;
|
||||
color: var(--tk-gray-dark);
|
||||
}
|
||||
|
||||
.login-subtitle {
|
||||
margin: 0 0 1.25rem;
|
||||
color: var(--tk-gray);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* ── Copy dialog ── */
|
||||
.copy-dialog-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(26, 26, 26, 0.55);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.copy-dialog {
|
||||
width: min(900px, 100%);
|
||||
max-height: 90vh;
|
||||
background: var(--tk-white);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 1.25rem 1.5rem;
|
||||
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
|
||||
border-top: 4px solid var(--tk-orange);
|
||||
display: grid;
|
||||
gap: 0.85rem;
|
||||
}
|
||||
|
||||
.copy-dialog h4 { margin: 0; color: var(--tk-gray-dark); }
|
||||
.copy-dialog-hint { margin: 0; color: var(--tk-gray); }
|
||||
.copy-dialog-textarea {
|
||||
width: 100%;
|
||||
min-height: 320px;
|
||||
font-family: Consolas, "Courier New", monospace;
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.4;
|
||||
border: 1px solid var(--tk-border);
|
||||
border-radius: 6px;
|
||||
padding: 0.75rem;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.copy-dialog-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* ── Footer ── */
|
||||
.site-footer {
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--tk-gray);
|
||||
border-top: 1px solid var(--tk-border);
|
||||
background: var(--tk-white);
|
||||
}
|
||||
|
||||
@@ -3,22 +3,43 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ title if title else "TK Wiki Newsletter Admin" }}</title>
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
<title>{% block title %}{{ title if title else "Wiki Newsletter Admin" }}{% endblock %} · Thomas-Krenn.AG</title>
|
||||
<link rel="stylesheet" href="/static/css/main.css?v=3">
|
||||
</head>
|
||||
<body>
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
<header class="topbar">
|
||||
<h1>TK Wiki Newsletter Admin</h1>
|
||||
<div class="topbar-brand">
|
||||
<div class="topbar-logo" aria-hidden="true">TK</div>
|
||||
<div>
|
||||
<h1>Wiki Newsletter Admin</h1>
|
||||
<p class="topbar-sub">Thomas-Krenn.AG · Intern</p>
|
||||
</div>
|
||||
</div>
|
||||
{% if user %}
|
||||
<div class="topbar-actions">
|
||||
<nav class="topbar-nav" aria-label="Hauptnavigation">
|
||||
<a href="/dashboard" class="{% if active_nav == 'dashboard' %}active{% endif %}">Dashboard</a>
|
||||
{% if user.role == "admin" %}
|
||||
<a href="/admin/users" class="{% if active_nav == 'users' %}active{% endif %}">Benutzer</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<div class="user-chip">
|
||||
<span>{{ user.full_name }}</span>
|
||||
<span class="badge badge-{{ user.role }}">{{ user.role }}</span>
|
||||
</div>
|
||||
<form method="post" action="/logout">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button type="submit">Logout</button>
|
||||
<button type="submit" class="btn-logout">Abmelden</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</header>
|
||||
<main class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer class="site-footer">
|
||||
Thomas-Krenn.AG · Interner Wiki-Newsletter · Nur für den internen Gebrauch
|
||||
</footer>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,21 +1,53 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
{% block content %}
|
||||
<section class="card">
|
||||
<h2>Newsletter erstellen</h2>
|
||||
|
||||
<div class="page-header">
|
||||
<h2>Wiki Newsletter</h2>
|
||||
<p class="page-lead">Wiki-Änderungen filtern, Newsletter generieren und für Outlook aufbereiten.</p>
|
||||
</div>
|
||||
|
||||
<div class="stats-row">
|
||||
<div class="stat-card accent-new">
|
||||
<div class="stat-value">{{ articles_new|length }}</div>
|
||||
<div class="stat-label">Neue Artikel</div>
|
||||
</div>
|
||||
<div class="stat-card accent-edit">
|
||||
<div class="stat-value">{{ articles_edited|length }}</div>
|
||||
<div class="stat-label">Bearbeitete Artikel</div>
|
||||
</div>
|
||||
<div class="stat-card accent-total">
|
||||
<div class="stat-value">{{ articles_new|length + articles_edited|length }}</div>
|
||||
<div class="stat-label">Gesamt</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layout-2col">
|
||||
<div class="main-col">
|
||||
|
||||
<section class="card card-accent-orange">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<h3>Newsletter erstellen</h3>
|
||||
<p class="card-desc">Zeitraum und Filter wählen, dann generieren.</p>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" action="/dashboard" class="form-grid">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<div class="form-row">
|
||||
<label>Zeitraum (Tage)
|
||||
<input type="number" name="days" min="1" max="90" value="{{ filters.days }}">
|
||||
</label>
|
||||
<label>Kategorie (optional)
|
||||
<input type="text" name="category" value="{{ filters.category }}">
|
||||
<input type="text" name="category" value="{{ filters.category }}" placeholder="z. B. Linux">
|
||||
</label>
|
||||
</div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="only_edited" value="true" {% if filters.only_edited %}checked{% endif %}>
|
||||
Nur bearbeitete Artikel (keine neu erstellten)
|
||||
</label>
|
||||
<fieldset class="display-options">
|
||||
<legend>Anzeige im Output</legend>
|
||||
<legend>Anzeige im Newsletter</legend>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="show_date" value="true" {% if filters.display.show_date %}checked{% endif %}>
|
||||
Datum anzeigen
|
||||
@@ -29,81 +61,30 @@
|
||||
Kategorie anzeigen
|
||||
</label>
|
||||
</fieldset>
|
||||
{% if user.role in ["admin", "editor"] %}
|
||||
<button type="submit">Newsletter generieren</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% if user.role == "admin" %}
|
||||
<p><a href="/admin/users">Zur Benutzerverwaltung</a></p>
|
||||
{% endif %}
|
||||
{% if wiki_error %}
|
||||
<p class="error">{{ wiki_error }}</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
{% if user.role in ["admin", "editor"] %}
|
||||
<section class="card">
|
||||
<h3>Optionaler SMTP-Versand</h3>
|
||||
<form method="post" action="/newsletter/send-now" class="form-grid">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<input type="hidden" name="days" value="{{ filters.days }}">
|
||||
<input type="hidden" name="category" value="{{ filters.category }}">
|
||||
<input type="hidden" name="only_edited" value="{{ 'true' if filters.only_edited else 'false' }}">
|
||||
<input type="hidden" name="show_date" value="{{ 'true' if filters.display.show_date else 'false' }}">
|
||||
<input type="hidden" name="show_user" value="{{ 'true' if filters.display.show_user else 'false' }}">
|
||||
<input type="hidden" name="show_category" value="{{ 'true' if filters.display.show_category else 'false' }}">
|
||||
<button type="submit">Newsletter jetzt senden</button>
|
||||
<button type="submit" class="btn-primary">Newsletter generieren</button>
|
||||
{% else %}
|
||||
<p class="hint">Sie haben Leserechte. Bitte einen Editor oder Admin bitten, den Newsletter zu generieren.</p>
|
||||
{% endif %}
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if user.role == "admin" %}
|
||||
<section class="card">
|
||||
<h3>SMTP-Konfiguration (optional)</h3>
|
||||
<form method="post" action="/admin/smtp" class="form-grid">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="enabled" value="true" {% if smtp.enabled == "true" %}checked{% endif %}>
|
||||
SMTP Versand aktivieren
|
||||
</label>
|
||||
<label>SMTP Host
|
||||
<input type="text" name="host" value="{{ smtp.host }}">
|
||||
</label>
|
||||
<label>SMTP Port
|
||||
<input type="number" name="port" value="{{ smtp.port }}">
|
||||
</label>
|
||||
<label>Benutzername
|
||||
<input type="text" name="username" value="{{ smtp.username }}">
|
||||
</label>
|
||||
<label>Passwort
|
||||
<input type="password" name="password" value="{{ smtp.password }}">
|
||||
</label>
|
||||
<label>Absender E-Mail
|
||||
<input type="email" name="from_email" value="{{ smtp.from_email }}">
|
||||
</label>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="use_tls" value="true" {% if smtp.use_tls == "true" %}checked{% endif %}>
|
||||
STARTTLS verwenden
|
||||
</label>
|
||||
<label>Verteilerliste (Komma-separiert)
|
||||
<textarea rows="3" name="recipients">{{ smtp.recipients }}</textarea>
|
||||
</label>
|
||||
<label>Geplanter täglicher Versand (HH:MM)
|
||||
<input type="time" name="schedule_time" value="{{ smtp.schedule_time }}">
|
||||
</label>
|
||||
<button type="submit">SMTP Einstellungen speichern</button>
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="card">
|
||||
<h3>Newsletter-Vorschau (mit Hyperlinks)</h3>
|
||||
<p class="hint"><strong>Empfohlen für Outlook:</strong> „Im Browser öffnen“ → dort <strong>Strg+A</strong>, <strong>Strg+C</strong> → in Outlook <strong>Strg+V</strong>. Alternativ „Für Outlook kopieren“ und mit Rechtsklick → „Format beibehalten“ einfügen.</p>
|
||||
<section class="card card-accent-orange">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<h3>Vorschau & Export</h3>
|
||||
<p class="card-desc">Formatierten Newsletter ansehen und für Outlook kopieren.</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="hint"><strong>Empfohlen:</strong> „Im Browser öffnen“ → <strong>Strg+A</strong>, <strong>Strg+C</strong> → in Outlook <strong>Strg+V</strong>.</p>
|
||||
<div class="copy-actions">
|
||||
<button type="button" id="open-outlook-btn" class="btn-secondary">Im Browser öffnen</button>
|
||||
<button type="button" id="open-outlook-btn" class="btn-primary">Im Browser öffnen</button>
|
||||
<button type="button" id="copy-outlook-btn" class="btn-secondary">Für Outlook kopieren</button>
|
||||
<button type="button" id="copy-html-source-btn" class="btn-secondary">HTML-Quelltext kopieren</button>
|
||||
<button type="button" id="download-html-btn" class="btn-secondary">HTML herunterladen</button>
|
||||
<button type="button" id="copy-html-source-btn" class="btn-outline">HTML-Quelltext</button>
|
||||
<span id="copy-status" class="copy-status" aria-live="polite"></span>
|
||||
</div>
|
||||
<iframe id="newsletter-preview-frame" class="newsletter-preview-frame" title="Newsletter Vorschau"></iframe>
|
||||
@@ -112,24 +93,11 @@
|
||||
<textarea id="newsletter-plain-source" class="hidden-source" hidden readonly>{{ plain_text }}</textarea>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h3>Output: Nur-Text (Fallback)</h3>
|
||||
<p class="hint">Enthält URLs als Text. Für klickbare Links bitte die Vorschau bzw. „Für Outlook kopieren“ verwenden.</p>
|
||||
<textarea rows="16" readonly>{{ plain_text }}</textarea>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h3>Output: HTML-Quelltext</h3>
|
||||
<p class="hint">Öffnet ein Fenster mit markiertem Text – dort <strong>Strg+C</strong> drücken. Funktioniert auch ohne HTTPS.</p>
|
||||
<div class="textarea-actions">
|
||||
<button type="button" id="copy-html-source-btn-2" class="btn-secondary">HTML-Quelltext kopieren</button>
|
||||
<button type="button" id="download-html-source-btn" class="btn-secondary">HTML-Quelltext herunterladen</button>
|
||||
<section class="card card-accent-gray">
|
||||
<div class="card-header">
|
||||
<h3>Neue Artikel <span class="count-badge orange">{{ articles_new|length }}</span></h3>
|
||||
</div>
|
||||
<textarea id="newsletter-html-display" rows="12" readonly>{{ raw_html }}</textarea>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h3>Neue Artikel ({{ articles_new|length }})</h3>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -148,14 +116,18 @@
|
||||
{% if filters.display.show_category %}<td>{{ item.categories|join(", ") }}</td>{% endif %}
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="4">Keine neuen Artikel im gewählten Zeitraum.</td></tr>
|
||||
<tr class="empty-row"><td colspan="4">Keine neuen Artikel im gewählten Zeitraum.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h3>Bearbeitete Artikel ({{ articles_edited|length }})</h3>
|
||||
<section class="card card-accent-gray">
|
||||
<div class="card-header">
|
||||
<h3>Bearbeitete Artikel <span class="count-badge">{{ articles_edited|length }}</span></h3>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -174,31 +146,156 @@
|
||||
{% if filters.display.show_category %}<td>{{ item.categories|join(", ") }}</td>{% endif %}
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="4">Keine bearbeiteten Artikel im gewählten Zeitraum.</td></tr>
|
||||
<tr class="empty-row"><td colspan="4">Keine bearbeiteten Artikel im gewählten Zeitraum.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<details class="card-details">
|
||||
<summary>Weitere Ausgabeformate</summary>
|
||||
<div class="details-body">
|
||||
<h4 style="margin:1rem 0 0.5rem;font-size:0.95rem;">Nur-Text (Fallback)</h4>
|
||||
<p class="hint">URLs als Klartext – für klickbare Links die Vorschau nutzen.</p>
|
||||
<textarea class="readonly-output" rows="10" readonly>{{ plain_text }}</textarea>
|
||||
|
||||
<h4 style="margin:1.25rem 0 0.5rem;font-size:0.95rem;">HTML-Quelltext</h4>
|
||||
<p class="hint">Öffnet ein Fenster mit markiertem Text – dort <strong>Strg+C</strong> drücken.</p>
|
||||
<div class="textarea-actions">
|
||||
<button type="button" id="copy-html-source-btn-2" class="btn-secondary">HTML-Quelltext kopieren</button>
|
||||
<button type="button" id="download-html-source-btn" class="btn-outline">Herunterladen</button>
|
||||
</div>
|
||||
<textarea id="newsletter-html-display" class="readonly-output" rows="8" readonly>{{ raw_html }}</textarea>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
{% if user.role in ["admin", "editor"] %}
|
||||
<details class="card-details">
|
||||
<summary>SMTP-Versand</summary>
|
||||
<div class="details-body">
|
||||
<p class="hint">Newsletter direkt per E-Mail versenden (aktuell gewählte Filter).</p>
|
||||
<form method="post" action="/newsletter/send-now">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<input type="hidden" name="days" value="{{ filters.days }}">
|
||||
<input type="hidden" name="category" value="{{ filters.category }}">
|
||||
<input type="hidden" name="only_edited" value="{{ 'true' if filters.only_edited else 'false' }}">
|
||||
<input type="hidden" name="show_date" value="{{ 'true' if filters.display.show_date else 'false' }}">
|
||||
<input type="hidden" name="show_user" value="{{ 'true' if filters.display.show_user else 'false' }}">
|
||||
<input type="hidden" name="show_category" value="{{ 'true' if filters.display.show_category else 'false' }}">
|
||||
<button type="submit" class="btn-secondary">Newsletter jetzt senden</button>
|
||||
</form>
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
|
||||
{% if user.role == "admin" %}
|
||||
<details class="card-details">
|
||||
<summary>SMTP-Konfiguration</summary>
|
||||
<div class="details-body">
|
||||
<form method="post" action="/admin/smtp" class="form-grid">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="enabled" value="true" {% if smtp.enabled == "true" %}checked{% endif %}>
|
||||
SMTP-Versand aktivieren
|
||||
</label>
|
||||
<div class="form-row">
|
||||
<label>SMTP-Host
|
||||
<input type="text" name="host" value="{{ smtp.host }}" placeholder="mail.example.com">
|
||||
</label>
|
||||
<label>SMTP-Port
|
||||
<input type="number" name="port" value="{{ smtp.port }}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Benutzername
|
||||
<input type="text" name="username" value="{{ smtp.username }}">
|
||||
</label>
|
||||
<label>Passwort
|
||||
<input type="password" name="password" value="{{ smtp.password }}">
|
||||
</label>
|
||||
</div>
|
||||
<label>Absender E-Mail
|
||||
<input type="email" name="from_email" value="{{ smtp.from_email }}">
|
||||
</label>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="use_tls" value="true" {% if smtp.use_tls == "true" %}checked{% endif %}>
|
||||
STARTTLS verwenden
|
||||
</label>
|
||||
<label>Verteilerliste (kommagetrennt)
|
||||
<textarea rows="3" name="recipients" placeholder="kollege@firma.de, team@firma.de">{{ smtp.recipients }}</textarea>
|
||||
</label>
|
||||
<label>Geplanter täglicher Versand (HH:MM)
|
||||
<input type="time" name="schedule_time" value="{{ smtp.schedule_time }}">
|
||||
</label>
|
||||
<button type="submit">Einstellungen speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
|
||||
<section class="card">
|
||||
<h3>Versandprotokoll (letzte 20)</h3>
|
||||
<div class="card-header">
|
||||
<h3>Versandprotokoll</h3>
|
||||
<span class="hint" style="margin:0;">Letzte 20 Einträge</span>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>Zeit</th><th>Status</th><th>Betreff</th><th>Empfänger</th><th>Details</th></tr></thead>
|
||||
<thead>
|
||||
<tr><th>Zeit</th><th>Status</th><th>Betreff</th><th>Empfänger</th><th>Details</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in send_logs %}
|
||||
<tr>
|
||||
<td>{{ log.created_at }}</td>
|
||||
<td>{{ log.status }}</td>
|
||||
<td><span class="badge badge-{{ log.status }}">{{ log.status }}</span></td>
|
||||
<td>{{ log.subject }}</td>
|
||||
<td>{{ log.recipients }}</td>
|
||||
<td>{{ log.detail }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="empty-row"><td colspan="5">Noch keine Versände protokolliert.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<aside class="sidebar-col">
|
||||
<div class="sidebar-card">
|
||||
<h4>Workflow</h4>
|
||||
<ol style="margin:0;padding-left:1.1rem;color:var(--tk-gray);">
|
||||
<li>Filter setzen</li>
|
||||
<li>Newsletter generieren</li>
|
||||
<li>Vorschau prüfen</li>
|
||||
<li>Für Outlook exportieren</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="sidebar-card">
|
||||
<h4>Outlook-Tipp</h4>
|
||||
<ul>
|
||||
<li>„Im Browser öffnen“ nutzen</li>
|
||||
<li>Alles markieren (Strg+A)</li>
|
||||
<li>Kopieren (Strg+C)</li>
|
||||
<li>In Outlook einfügen</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% if user.role == "admin" %}
|
||||
<div class="sidebar-card">
|
||||
<h4>Administration</h4>
|
||||
<ul>
|
||||
<li><a href="/admin/users">Benutzerverwaltung</a></li>
|
||||
<li>SMTP unter „SMTP-Konfiguration“</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="/static/js/newsletter.js?v=5"></script>
|
||||
<script src="/static/js/newsletter.js?v=6"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Anmelden{% endblock %}
|
||||
{% block body_class %}login-page{% endblock %}
|
||||
{% block content %}
|
||||
<section class="card narrow">
|
||||
<h2>Login</h2>
|
||||
<section class="card login-card">
|
||||
<h2>Anmelden</h2>
|
||||
<p class="login-subtitle">Thomas-Krenn Wiki Newsletter Admin</p>
|
||||
{% if error_message %}
|
||||
<p class="error">{{ error_message }}</p>
|
||||
{% endif %}
|
||||
<form method="post" action="/login" class="form-grid">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<label>E-Mail
|
||||
<input type="email" name="email" required>
|
||||
<input type="email" name="email" required autocomplete="username" placeholder="name@firma.de">
|
||||
</label>
|
||||
<label>Passwort
|
||||
<input type="password" name="password" required>
|
||||
<input type="password" name="password" required autocomplete="current-password">
|
||||
</label>
|
||||
<button type="submit">Anmelden</button>
|
||||
<button type="submit" class="btn-primary btn-block">Anmelden</button>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,43 +1,78 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Benutzerverwaltung{% endblock %}
|
||||
{% block content %}
|
||||
<section class="card">
|
||||
|
||||
<div class="page-header">
|
||||
<h2>Benutzerverwaltung</h2>
|
||||
<p class="page-lead"><a href="/dashboard">← Zurück zum Dashboard</a></p>
|
||||
</div>
|
||||
|
||||
<div class="layout-2col">
|
||||
<div class="main-col">
|
||||
<section class="card card-accent-orange">
|
||||
<div class="card-header">
|
||||
<h3>Neuen Benutzer anlegen</h3>
|
||||
</div>
|
||||
<form method="post" action="/admin/users" class="form-grid">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<div class="form-row">
|
||||
<label>E-Mail
|
||||
<input type="email" name="email" required>
|
||||
<input type="email" name="email" required placeholder="name@firma.de">
|
||||
</label>
|
||||
<label>Vollständiger Name
|
||||
<input type="text" name="full_name" required>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Passwort
|
||||
<input type="password" name="password" required minlength="10">
|
||||
</label>
|
||||
<label>Rolle
|
||||
<select name="role">
|
||||
<option value="reader">Reader</option>
|
||||
<option value="editor">Editor</option>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="reader">Leser (nur ansehen)</option>
|
||||
<option value="editor">Editor (generieren & senden)</option>
|
||||
<option value="admin">Admin (voller Zugriff)</option>
|
||||
</select>
|
||||
</label>
|
||||
<button type="submit">Benutzer erstellen</button>
|
||||
</div>
|
||||
<button type="submit" class="btn-primary">Benutzer erstellen</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h3>Bestehende Benutzer</h3>
|
||||
<div class="card-header">
|
||||
<h3>Bestehende Benutzer <span class="count-badge">{{ users|length }}</span></h3>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>E-Mail</th><th>Name</th><th>Rolle</th><th>Aktiv</th></tr></thead>
|
||||
<thead>
|
||||
<tr><th>E-Mail</th><th>Name</th><th>Rolle</th><th>Status</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for u in users %}
|
||||
<tr>
|
||||
<td>{{ u.email }}</td>
|
||||
<td>{{ u.full_name }}</td>
|
||||
<td>{{ u.role }}</td>
|
||||
<td>{{ "Ja" if u.is_active else "Nein" }}</td>
|
||||
<td><span class="badge badge-{{ u.role }}">{{ u.role }}</span></td>
|
||||
<td>{{ "Aktiv" if u.is_active else "Inaktiv" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<aside class="sidebar-col">
|
||||
<div class="sidebar-card">
|
||||
<h4>Rollen</h4>
|
||||
<ul>
|
||||
<li><strong>Leser</strong> – Newsletter ansehen</li>
|
||||
<li><strong>Editor</strong> – Generieren & senden</li>
|
||||
<li><strong>Admin</strong> – Benutzer & SMTP</li>
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user