55 lines
2.8 KiB
HTML
55 lines
2.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Accounts{% endblock %}
|
|
{% block page_title %}Accounts{% endblock %}
|
|
|
|
{% block topbar_actions %}
|
|
<a href="{{ url_for('accounts.new') }}" class="btn btn-sm btn-primary" style="font-size:12px;"><i class="bi bi-plus-lg me-1"></i>New Account</a>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if accounts %}
|
|
<div class="row g-3">
|
|
{% for acct in accounts %}
|
|
<div class="col-12 col-md-6 col-xl-4">
|
|
<div class="pcard" style="border-left: 4px solid {{ acct.color }};">
|
|
<div class="d-flex justify-content-between align-items-start mb-3">
|
|
<div class="d-flex align-items-center gap-2">
|
|
<div style="width:36px;height:36px;border-radius:9px;background:{{ acct.color }}22;color:{{ acct.color }};display:flex;align-items:center;justify-content:center;font-size:18px;">
|
|
<i class="bi {{ acct.icon }}"></i>
|
|
</div>
|
|
<div>
|
|
<div style="font-weight:600;font-size:14px;">{{ acct.name }}</div>
|
|
<div style="font-size:11px;color:var(--muted);">{{ acct.account_type | replace('_',' ') | title }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="dropdown">
|
|
<button class="btn btn-sm" style="background:none;border:none;color:var(--muted);padding:2px 6px;" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></button>
|
|
<ul class="dropdown-menu dropdown-menu-end" style="font-size:13px;">
|
|
<li><a class="dropdown-item" href="{{ url_for('accounts.edit', id=acct.id) }}"><i class="bi bi-pencil me-2"></i>Edit</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<form method="POST" action="{{ url_for('accounts.delete', id=acct.id) }}" onsubmit="return confirm('Remove this account?')">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit" class="dropdown-item text-danger"><i class="bi bi-trash me-2"></i>Remove</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% if acct.notes %}
|
|
<div style="font-size:12px;color:var(--muted);margin-top:8px;">{{ acct.notes }}</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="pcard text-center py-5">
|
|
<i class="bi bi-wallet2 text-muted" style="font-size:3rem;"></i>
|
|
<h5 class="mt-3 mb-1">No accounts yet</h5>
|
|
<p class="text-muted small mb-3">Add your bank accounts, cash, and credit cards.</p>
|
|
<a href="{{ url_for('accounts.new') }}" class="btn btn-primary btn-sm">Add Account</a>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|