forked from data.coop/membersystem
Adding some titles
This commit is contained in:
parent
88e15974dc
commit
f42101c476
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -5,3 +5,5 @@ db.sqlite3
|
|||
.pytest_cache
|
||||
.idea/
|
||||
*.mo
|
||||
.env
|
||||
venv/
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}
|
||||
{% trans "Member detail" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}
|
||||
{% trans "Membership" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if not current_membership %}
|
||||
|
|
|
@ -39,6 +39,8 @@ def members_admin(request):
|
|||
users = get_members()
|
||||
|
||||
return render_list(
|
||||
entity_name="member",
|
||||
entity_name_plural="members",
|
||||
request=request,
|
||||
paginate_by=20,
|
||||
objects=users,
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block head_title %}
|
||||
{% trans "Home" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from django.shortcuts import render
|
||||
from utils.view_utils import render
|
||||
|
||||
|
||||
def index(request):
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}
|
||||
{{ entity_name_plural|capfirst }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>
|
||||
Users <small class="text-muted">{{ total_count }}</small>
|
||||
{{ entity_name_plural|capfirst }} <small class="text-muted">{{ total_count }}</small>
|
||||
</h1>
|
||||
|
||||
<table class="table table-striped">
|
||||
|
|
|
@ -46,6 +46,8 @@ class RowAction:
|
|||
|
||||
def render_list(
|
||||
request: HttpRequest,
|
||||
entity_name: str,
|
||||
entity_name_plural: str,
|
||||
objects: list["Model"],
|
||||
columns: list[tuple[str, str]],
|
||||
row_actions: list[RowAction] = None,
|
||||
|
@ -87,6 +89,8 @@ def render_list(
|
|||
"list_actions": list_actions,
|
||||
"total_count": total_count,
|
||||
"order_by": order_by,
|
||||
"entity_name": entity_name,
|
||||
"entity_name_plural": entity_name_plural,
|
||||
}
|
||||
|
||||
if paginate_by:
|
||||
|
|
Loading…
Reference in a new issue