sandwitches 2.5.1__tar.gz → 2.5.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sandwitches-2.5.1 → sandwitches-2.5.3}/PKG-INFO +2 -1
- {sandwitches-2.5.1 → sandwitches-2.5.3}/pyproject.toml +3 -2
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/admin_base.html +25 -32
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/dashboard.html +32 -222
- sandwitches-2.5.3/src/sandwitches/templates/admin/partials/order_rows.html +41 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/recipe_list.html +22 -31
- sandwitches-2.5.3/src/sandwitches/templates/admin/settings.html +41 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/tag_list.html +5 -9
- sandwitches-2.5.3/src/sandwitches/templates/admin/user_list.html +60 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/cart.html +15 -16
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/ingredients_section.html +1 -1
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/navbar.html +3 -3
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/rating_section.html +1 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/recipe_header.html +1 -1
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/side_menu.html +0 -4
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/detail.html +22 -30
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/index.html +2 -3
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/partials/recipe_list.html +25 -20
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/profile.html +18 -18
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/urls.py +6 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/utils.py +3 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/views.py +59 -4
- sandwitches-2.5.1/src/sandwitches/templates/admin/partials/order_rows.html +0 -28
- sandwitches-2.5.1/src/sandwitches/templates/admin/user_list.html +0 -60
- {sandwitches-2.5.1 → sandwitches-2.5.3}/README.md +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/__init__.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/admin.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/api.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/asgi.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/feeds.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/forms.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/locale/nl/LC_MESSAGES/django.mo +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/locale/nl/LC_MESSAGES/django.po +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/management/__init__.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/management/commands/__init__.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/management/commands/reset_daily_orders.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0001_initial.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0002_historicalrecipe_servings_recipe_servings.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0003_setting.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0004_alter_setting_ai_api_key_and_more.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0005_rating_comment.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0006_historicalrecipe_is_highlighted_and_more.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0007_historicalrecipe_price_recipe_price_order.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0008_historicalrecipe_daily_orders_count_and_more.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0009_historicalrecipe_is_approved_recipe_is_approved.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0010_rename_is_approved_historicalrecipe_is_community_made_and_more.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0011_alter_historicalrecipe_is_community_made_and_more.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0012_rename_is_community_made_historicalrecipe_is_approved_and_more.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0013_cartitem.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0014_ensure_groups_exist.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0015_order_completed_alter_order_status_and_more.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0016_user_theme.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/0017_setting_gotify_token_setting_gotify_url.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/migrations/__init__.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/models.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/settings.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/storage.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/tasks.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/confirm_delete.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/order_list.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/partials/dashboard_charts.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/rating_list.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/recipe_approval_list.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/recipe_form.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/tag_form.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/task_detail.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/task_list.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/admin/user_form.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/base.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/base_beer.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/community.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/carousel_scripts.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/favorites_search_form.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/footer.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/ingredients_scripts.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/instructions_section.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/search_form.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/search_scripts.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/components/user_menu.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/favorites.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/login.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/order_detail.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/settings.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/setup.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templates/signup.html +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templatetags/__init__.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templatetags/custom_filters.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/templatetags/markdown_extras.py +0 -0
- {sandwitches-2.5.1 → sandwitches-2.5.3}/src/sandwitches/wsgi.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sandwitches
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.3
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Author: Martyn van Dijke
|
|
6
6
|
Author-email: Martyn van Dijke <martijnvdijke600@gmail.com>
|
|
@@ -18,6 +18,7 @@ Requires-Dist: markdown>=3.10
|
|
|
18
18
|
Requires-Dist: pillow>=12.0.0
|
|
19
19
|
Requires-Dist: uvicorn>=0.40.0
|
|
20
20
|
Requires-Dist: whitenoise[brotli]>=6.11.0
|
|
21
|
+
Requires-Dist: requests>=2.32.5
|
|
21
22
|
Requires-Python: >=3.12
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sandwitches"
|
|
3
|
-
version = "2.5.
|
|
3
|
+
version = "2.5.3"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -24,11 +24,12 @@ dependencies = [
|
|
|
24
24
|
"pillow>=12.0.0",
|
|
25
25
|
"uvicorn>=0.40.0",
|
|
26
26
|
"whitenoise[brotli]>=6.11.0",
|
|
27
|
+
"requests>=2.32.5",
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
[build-system]
|
|
31
|
-
requires = ["uv_build>=0.
|
|
32
|
+
requires = ["uv_build>=0.9.27,<0.10.0"]
|
|
32
33
|
build-backend = "uv_build"
|
|
33
34
|
|
|
34
35
|
[dependency-groups]
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
<i>menu</i>
|
|
27
27
|
</button>
|
|
28
28
|
<a href="{% url 'admin_dashboard' %}" class="row align-center">
|
|
29
|
-
<img src="{% static 'icons/icon.svg' %}" class="circle
|
|
30
|
-
<h6 class="max">{% block admin_title %}{% trans "Sandwitches Admin" %}{% endblock %}</h6>
|
|
29
|
+
<img src="{% static 'icons/icon.svg' %}" class="circle">
|
|
31
30
|
</a>
|
|
32
31
|
<div class="max"></div>
|
|
33
32
|
|
|
@@ -45,48 +44,52 @@
|
|
|
45
44
|
<h5 class="max">{% trans "Admin" %}</h5>
|
|
46
45
|
</header>
|
|
47
46
|
<div class="space"></div>
|
|
48
|
-
<a href="{% url 'admin_dashboard' %}" class="{% if request.resolver_match.url_name == 'admin_dashboard' %}active{% endif %}">
|
|
47
|
+
<a href="{% url 'admin_dashboard' %}" class="padding {% if request.resolver_match.url_name == 'admin_dashboard' %}active{% endif %}">
|
|
49
48
|
<i>dashboard</i>
|
|
50
|
-
<span>{% trans "Dashboard" %}</span>
|
|
49
|
+
<span class="large-text">{% trans "Dashboard" %}</span>
|
|
51
50
|
</a>
|
|
52
|
-
<a href="{% url 'admin_recipe_list' %}" class="{% if request.resolver_match.url_name == 'admin_recipe_list' %}active{% endif %}">
|
|
51
|
+
<a href="{% url 'admin_recipe_list' %}" class="padding {% if request.resolver_match.url_name == 'admin_recipe_list' %}active{% endif %}">
|
|
53
52
|
<i>restaurant</i>
|
|
54
|
-
<span>{% trans "Recipes" %}</span>
|
|
53
|
+
<span class="large-text">{% trans "Recipes" %}</span>
|
|
55
54
|
</a>
|
|
56
|
-
<a href="{% url 'admin_recipe_approval_list' %}" class="{% if request.resolver_match.url_name == 'admin_recipe_approval_list' %}active{% endif %}">
|
|
55
|
+
<a href="{% url 'admin_recipe_approval_list' %}" class="padding {% if request.resolver_match.url_name == 'admin_recipe_approval_list' %}active{% endif %}">
|
|
57
56
|
<i>how_to_reg</i>
|
|
58
|
-
<span>{% trans "Approvals" %}</span>
|
|
57
|
+
<span class="large-text">{% trans "Approvals" %}</span>
|
|
59
58
|
</a>
|
|
60
|
-
<a href="{% url 'admin_user_list' %}" class="{% if request.resolver_match.url_name == 'admin_user_list' %}active{% endif %}">
|
|
59
|
+
<a href="{% url 'admin_user_list' %}" class="padding {% if request.resolver_match.url_name == 'admin_user_list' %}active{% endif %}">
|
|
61
60
|
<i>people</i>
|
|
62
|
-
<span>{% trans "Users" %}</span>
|
|
61
|
+
<span class="large-text">{% trans "Users" %}</span>
|
|
63
62
|
</a>
|
|
64
|
-
<a href="{% url 'admin_tag_list' %}" class="{% if request.resolver_match.url_name == 'admin_tag_list' %}active{% endif %}">
|
|
63
|
+
<a href="{% url 'admin_tag_list' %}" class="padding {% if request.resolver_match.url_name == 'admin_tag_list' %}active{% endif %}">
|
|
65
64
|
<i>label</i>
|
|
66
|
-
<span>{% trans "Tags" %}</span>
|
|
65
|
+
<span class="large-text">{% trans "Tags" %}</span>
|
|
67
66
|
</a>
|
|
68
|
-
<a href="{% url 'admin_rating_list' %}" class="{% if request.resolver_match.url_name == 'admin_rating_list' %}active{% endif %}">
|
|
67
|
+
<a href="{% url 'admin_rating_list' %}" class="padding {% if request.resolver_match.url_name == 'admin_rating_list' %}active{% endif %}">
|
|
69
68
|
<i>star</i>
|
|
70
|
-
<span>{% trans "Ratings" %}</span>
|
|
69
|
+
<span class="large-text">{% trans "Ratings" %}</span>
|
|
71
70
|
</a>
|
|
72
|
-
<a href="{% url 'admin_order_list' %}" class="{% if request.resolver_match.url_name == 'admin_order_list' %}active{% endif %}">
|
|
71
|
+
<a href="{% url 'admin_order_list' %}" class="padding {% if request.resolver_match.url_name == 'admin_order_list' %}active{% endif %}">
|
|
73
72
|
<i>shopping_cart</i>
|
|
74
|
-
<span>{% trans "Orders" %}</span>
|
|
73
|
+
<span class="large-text">{% trans "Orders" %}</span>
|
|
75
74
|
</a>
|
|
76
|
-
<a href="{% url '
|
|
75
|
+
<a href="{% url 'admin_settings' %}" class="padding {% if request.resolver_match.url_name == 'admin_settings' %}active{% endif %}">
|
|
76
|
+
<i>settings</i>
|
|
77
|
+
<span class="large-text">{% trans "Site Settings" %}</span>
|
|
78
|
+
</a>
|
|
79
|
+
<a href="{% url 'admin_task_list' %}" class="padding {% if request.resolver_match.url_name == 'admin_task_list' %}active{% endif %}">
|
|
77
80
|
<i>assignment</i>
|
|
78
|
-
<span>{% trans "Tasks" %}</span>
|
|
81
|
+
<span class="large-text">{% trans "Tasks" %}</span>
|
|
79
82
|
</a>
|
|
80
83
|
<div class="divider"></div>
|
|
81
|
-
<a href="{% url 'index' %}">
|
|
84
|
+
<a href="{% url 'index' %}" class="padding">
|
|
82
85
|
<i>home</i>
|
|
83
|
-
<span>{% trans "Public Site" %}</span>
|
|
86
|
+
<span class="large-text">{% trans "Public Site" %}</span>
|
|
84
87
|
</a>
|
|
85
88
|
</nav>
|
|
86
89
|
</dialog>
|
|
87
90
|
|
|
88
91
|
{% if user.is_authenticated %}
|
|
89
|
-
<menu id="user-menu" class="
|
|
92
|
+
<menu id="user-menu" class="left">
|
|
90
93
|
<a href="{% url 'admin:logout' %}" class="row"><i>logout</i>{% trans "Logout" %}</a>
|
|
91
94
|
</menu>
|
|
92
95
|
{% endif %}
|
|
@@ -104,17 +107,7 @@
|
|
|
104
107
|
{% endblock %}
|
|
105
108
|
|
|
106
109
|
{% block footer %}
|
|
107
|
-
|
|
108
|
-
<div class="row align-center">
|
|
109
|
-
<div class="max">
|
|
110
|
-
<h6 class="small">Sandwitches Admin</h6>
|
|
111
|
-
<div class="small-text">© {% now "Y" %} Sandwitches Inc.</div>
|
|
112
|
-
</div>
|
|
113
|
-
<nav>
|
|
114
|
-
version {{ version }}
|
|
115
|
-
</nav>
|
|
116
|
-
</div>
|
|
117
|
-
</footer>
|
|
110
|
+
{% include "components/footer.html" %}
|
|
118
111
|
{% endblock %}
|
|
119
112
|
|
|
120
113
|
{% block extra_scripts %}
|
|
@@ -13,313 +13,123 @@
|
|
|
13
13
|
{% block content %}
|
|
14
14
|
|
|
15
15
|
<div class="row align-center mb-2">
|
|
16
|
-
|
|
17
16
|
<div class="max"></div>
|
|
18
|
-
|
|
19
17
|
<form method="get" class="row no-space border round padding surface-variant">
|
|
20
|
-
|
|
21
18
|
<div class="field label small transparent">
|
|
22
|
-
|
|
23
19
|
<input type="date" name="start_date" value="{{ start_date }}">
|
|
24
|
-
|
|
25
20
|
<label>{% trans "Start Date" %}</label>
|
|
26
|
-
|
|
27
21
|
</div>
|
|
28
|
-
|
|
29
22
|
<div class="divider vertical"></div>
|
|
30
|
-
|
|
31
23
|
<div class="field label small transparent">
|
|
32
|
-
|
|
33
24
|
<input type="date" name="end_date" value="{{ end_date }}">
|
|
34
|
-
|
|
35
25
|
<label>{% trans "End Date" %}</label>
|
|
36
|
-
|
|
37
26
|
</div>
|
|
38
|
-
|
|
39
27
|
<button type="submit" class="button primary square"><i>refresh</i></button>
|
|
40
|
-
|
|
41
28
|
</form>
|
|
42
|
-
|
|
43
29
|
</div>
|
|
44
30
|
|
|
45
31
|
|
|
46
32
|
|
|
47
33
|
<div class="grid">
|
|
48
|
-
|
|
49
34
|
<div class="s12 m4">
|
|
50
|
-
|
|
51
35
|
<article class="round primary-container padding">
|
|
52
|
-
|
|
53
36
|
<div class="row align-center">
|
|
54
|
-
|
|
55
37
|
<i class="extra">restaurant</i>
|
|
56
|
-
|
|
57
38
|
<div class="max">
|
|
58
|
-
|
|
59
39
|
<h4 class="bold">{{ recipe_count }}</h4>
|
|
60
|
-
|
|
61
40
|
<div>{% trans "Recipes" %}</div>
|
|
62
|
-
|
|
63
41
|
</div>
|
|
64
|
-
|
|
65
42
|
</div>
|
|
66
|
-
|
|
67
43
|
<nav class="right-align">
|
|
68
|
-
|
|
69
44
|
<a href="{% url 'admin_recipe_list' %}" class="button transparent">{% trans "View all" %}</a>
|
|
70
|
-
|
|
71
45
|
</nav>
|
|
72
|
-
|
|
73
46
|
</article>
|
|
74
|
-
|
|
75
47
|
</div>
|
|
76
48
|
|
|
77
49
|
<div class="s12 m4">
|
|
78
|
-
|
|
79
50
|
<article class="round secondary-container padding">
|
|
80
|
-
|
|
81
51
|
<div class="row align-center">
|
|
82
|
-
|
|
83
52
|
<i class="extra">people</i>
|
|
84
|
-
|
|
85
53
|
<div class="max">
|
|
86
|
-
|
|
87
54
|
<h4 class="bold">{{ user_count }}</h4>
|
|
88
|
-
|
|
89
55
|
<div>{% trans "Users" %}</div>
|
|
90
|
-
|
|
91
56
|
</div>
|
|
92
|
-
|
|
93
57
|
</div>
|
|
94
|
-
|
|
95
58
|
<nav class="right-align">
|
|
96
|
-
|
|
97
59
|
<a href="{% url 'admin_user_list' %}" class="button transparent">{% trans "View all" %}</a>
|
|
98
|
-
|
|
99
60
|
</nav>
|
|
100
|
-
|
|
101
61
|
</article>
|
|
102
|
-
|
|
103
62
|
</div>
|
|
104
63
|
|
|
105
64
|
<div class="s12 m4">
|
|
106
|
-
|
|
107
65
|
<article class="round tertiary-container padding">
|
|
108
|
-
|
|
109
66
|
<div class="row align-center">
|
|
110
|
-
|
|
111
67
|
<i class="extra">label</i>
|
|
112
|
-
|
|
113
68
|
<div class="max">
|
|
114
|
-
|
|
115
69
|
<h4 class="bold">{{ tag_count }}</h4>
|
|
116
|
-
|
|
117
70
|
<div>{% trans "Tags" %}</div>
|
|
118
|
-
|
|
119
71
|
</div>
|
|
120
|
-
|
|
121
72
|
</div>
|
|
122
|
-
|
|
123
73
|
<nav class="right-align">
|
|
124
|
-
|
|
125
74
|
<a href="{% url 'admin_tag_list' %}" class="button transparent">{% trans "View all" %}</a>
|
|
126
|
-
|
|
127
75
|
</nav>
|
|
128
|
-
|
|
129
76
|
</article>
|
|
130
|
-
|
|
77
|
+
</div>
|
|
78
|
+
<div class="s12">
|
|
79
|
+
{% include "admin/partials/dashboard_charts.html" %}
|
|
131
80
|
</div>
|
|
132
81
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<!-- Charts Section -->
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<div class="s12">
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
{% include "admin/partials/dashboard_charts.html" %}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
</div>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
{% if pending_recipes %}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<div class="s12">
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<h5 class="bold error-text">{% trans "Pending Approvals" %}</h5>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
<table class="border striped no-space">
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<thead>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<tr>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<th>{% trans "Title" %}</th>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<th>{% trans "Uploader" %}</th>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<th>{% trans "Created At" %}</th>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<th class="right-align">{% trans "Actions" %}</th>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
</tr>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
</thead>
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
<tbody>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{% for recipe in pending_recipes %}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
<td>{{ recipe.title }}</td>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<td>{{ recipe.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<td class="right-align">
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
<a href="{% url 'admin_recipe_approve' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Approve' %}"><i>check</i></a>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<a href="{% url 'admin_recipe_edit' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();"><i>edit</i></a>
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
</td>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
</tr>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
{% endfor %}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</tbody>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
</table>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
</div>
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
{% endif %}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
<div class="s12">
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<h5 class="bold">{% trans "Recent Recipes" %}</h5>
|
|
276
|
-
|
|
82
|
+
<div class="s12">
|
|
83
|
+
<h5 class="bold error-text">{% trans "Pending Approvals" %}</h5>
|
|
277
84
|
<table class="border striped no-space">
|
|
278
|
-
|
|
279
85
|
<thead>
|
|
280
|
-
|
|
281
86
|
<tr>
|
|
282
|
-
|
|
283
87
|
<th>{% trans "Title" %}</th>
|
|
284
|
-
|
|
285
88
|
<th>{% trans "Uploader" %}</th>
|
|
286
|
-
|
|
287
89
|
<th>{% trans "Created At" %}</th>
|
|
288
|
-
|
|
289
90
|
<th class="right-align">{% trans "Actions" %}</th>
|
|
290
|
-
|
|
291
91
|
</tr>
|
|
292
|
-
|
|
293
92
|
</thead>
|
|
294
|
-
|
|
295
93
|
<tbody>
|
|
296
|
-
|
|
297
|
-
{% for recipe in recent_recipes %}
|
|
298
|
-
|
|
94
|
+
{% for recipe in pending_recipes %}
|
|
299
95
|
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
300
|
-
|
|
301
96
|
<td>{{ recipe.title }}</td>
|
|
302
|
-
|
|
303
97
|
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
304
|
-
|
|
305
98
|
<td>{{ recipe.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
|
|
306
|
-
|
|
307
99
|
<td class="right-align">
|
|
308
|
-
|
|
100
|
+
<a href="{% url 'admin_recipe_approve' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Approve' %}"><i>check</i></a>
|
|
101
|
+
<a href="{% url 'admin_recipe_edit' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();"><i>edit</i></a>
|
|
102
|
+
</td>
|
|
103
|
+
</tr>
|
|
104
|
+
{% endfor %}
|
|
105
|
+
</tbody>
|
|
106
|
+
</table>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="s12">
|
|
109
|
+
<h5 class="bold">{% trans "Recent Recipes" %}</h5>
|
|
110
|
+
<table class="border striped scroll surface">
|
|
111
|
+
<thead>
|
|
112
|
+
<tr>
|
|
113
|
+
<th>{% trans "Title" %}</th>
|
|
114
|
+
<th>{% trans "Uploader" %}</th>
|
|
115
|
+
<th>{% trans "Created At" %}</th>
|
|
116
|
+
<th >{% trans "Actions" %}</th>
|
|
117
|
+
</tr>
|
|
118
|
+
</thead>
|
|
119
|
+
<tbody>
|
|
120
|
+
{% for recipe in recent_recipes %}
|
|
121
|
+
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
122
|
+
<td>{{ recipe.title }}</td>
|
|
123
|
+
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
124
|
+
<td>{{ recipe.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
|
|
125
|
+
<td>
|
|
309
126
|
<a href="{% url 'admin_recipe_edit' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();"><i>edit</i></a>
|
|
310
|
-
|
|
311
127
|
</td>
|
|
312
|
-
|
|
313
128
|
</tr>
|
|
314
|
-
|
|
315
129
|
{% endfor %}
|
|
316
|
-
|
|
317
130
|
</tbody>
|
|
318
|
-
|
|
319
131
|
</table>
|
|
320
|
-
|
|
321
132
|
</div>
|
|
322
|
-
|
|
323
133
|
</div>
|
|
324
134
|
|
|
325
135
|
{% endblock %}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{% load i18n %}
|
|
2
|
+
{% for order in orders %}
|
|
3
|
+
<tr>
|
|
4
|
+
<td>{{ order.id }}</td>
|
|
5
|
+
<td>
|
|
6
|
+
<div class="row align-center">
|
|
7
|
+
{% if order.user.avatar %}
|
|
8
|
+
<img src="{{ order.user.avatar.url }}" class="circle tiny">
|
|
9
|
+
{% else %}
|
|
10
|
+
<i class="circle tiny">person</i>
|
|
11
|
+
{% endif %}
|
|
12
|
+
<span class="max">{{ order.user.username }}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</td>
|
|
15
|
+
<td>{{ order.recipe.title }}</td>
|
|
16
|
+
<td>€ {{ order.total_price }} </td>
|
|
17
|
+
<td>
|
|
18
|
+
<form method="post" action="{% url 'admin_order_update_status' order.pk %}" class="row align-center no-space">
|
|
19
|
+
{% csrf_token %}
|
|
20
|
+
<div class="field border round small no-margin">
|
|
21
|
+
<select name="status" onchange="this.form.submit()" {% if order.status == 'COMPLETED' or order.status == 'CANCELLED' %}disabled{% endif %}>
|
|
22
|
+
{% for val, label in status_choices %}
|
|
23
|
+
<option value="{{ val }}" {% if order.status == val %}selected{% endif %}>{{ label }}</option>
|
|
24
|
+
{% endfor %}
|
|
25
|
+
</select>
|
|
26
|
+
<i>arrow_drop_down</i>
|
|
27
|
+
</div>
|
|
28
|
+
{% if order.status == 'COMPLETED' or order.status == 'CANCELLED' %}
|
|
29
|
+
<span class="chip {% if order.status == 'COMPLETED' %}primary{% else %}error{% endif %} margin">
|
|
30
|
+
{{ order.get_status_display }}
|
|
31
|
+
</span>
|
|
32
|
+
{% endif %}
|
|
33
|
+
</form>
|
|
34
|
+
</td>
|
|
35
|
+
<td>{{ order.created_at|date:"d/m/Y H:i" }}</td>
|
|
36
|
+
</tr>
|
|
37
|
+
{% empty %}
|
|
38
|
+
<tr>
|
|
39
|
+
<td colspan="6" class="center-align">{% trans "No orders found." %}</td>
|
|
40
|
+
</tr>
|
|
41
|
+
{% endfor %}
|
|
@@ -12,32 +12,33 @@
|
|
|
12
12
|
</a>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<table class="border
|
|
15
|
+
<table class="border scroll surface large-space">
|
|
16
16
|
<thead>
|
|
17
17
|
<tr>
|
|
18
|
-
<th
|
|
19
|
-
<th
|
|
20
|
-
<th class="max">
|
|
18
|
+
<th>{% trans "Image" %}</th>
|
|
19
|
+
<th>
|
|
21
20
|
<a href="?sort={% if current_sort == 'title' %}-title{% else %}title{% endif %}" class="row align-center">
|
|
22
21
|
{% trans "Title" %}
|
|
23
22
|
{% if current_sort == 'title' %}<i>arrow_upward</i>{% elif current_sort == '-title' %}<i>arrow_downward</i>{% endif %}
|
|
24
23
|
</a>
|
|
25
24
|
</th>
|
|
26
|
-
<th
|
|
25
|
+
<th>
|
|
27
26
|
<a href="?sort={% if current_sort == 'price' %}-price{% else %}price{% endif %}" class="row align-center">
|
|
28
27
|
{% trans "Price" %}
|
|
29
28
|
{% if current_sort == 'price' %}<i>arrow_upward</i>{% elif current_sort == '-price' %}<i>arrow_downward</i>{% endif %}
|
|
30
29
|
</a>
|
|
31
30
|
</th>
|
|
32
|
-
<th
|
|
31
|
+
<th>
|
|
33
32
|
<a href="?sort={% if current_sort == 'orders' %}-orders{% else %}orders{% endif %}" class="row align-center">
|
|
34
33
|
{% trans "Orders" %}
|
|
34
|
+
<i class="primary-text">orders</i>
|
|
35
35
|
{% if current_sort == 'orders' %}<i>arrow_upward</i>{% elif current_sort == '-orders' %}<i>arrow_downward</i>{% endif %}
|
|
36
36
|
</a>
|
|
37
37
|
</th>
|
|
38
|
-
<th
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
<th>{% trans "Rating" %}
|
|
39
|
+
<i class="primary-text">star</i>
|
|
40
|
+
</th>
|
|
41
|
+
<th>{% trans "Tags" %}</th>
|
|
41
42
|
<th>
|
|
42
43
|
<a href="?sort={% if current_sort == 'uploader' %}-uploader{% else %}uploader{% endif %}" class="row align-center">
|
|
43
44
|
{% trans "Uploader" %}
|
|
@@ -50,61 +51,51 @@
|
|
|
50
51
|
{% if current_sort == 'created_at' %}<i>arrow_upward</i>{% elif current_sort == '-created_at' %}<i>arrow_downward</i>{% endif %}
|
|
51
52
|
</a>
|
|
52
53
|
</th>
|
|
53
|
-
<th
|
|
54
|
+
<th>{% trans "Actions" %}</th>
|
|
54
55
|
</tr>
|
|
55
56
|
</thead>
|
|
56
|
-
<tbody>
|
|
57
|
+
<tbody>
|
|
58
|
+
{% for recipe in recipes %}
|
|
57
59
|
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
58
|
-
<td
|
|
59
|
-
<td class="min">
|
|
60
|
+
<td>
|
|
60
61
|
{% if recipe.image %}
|
|
61
62
|
<img src="{{ recipe.image_thumbnail.url }}" class="admin-thumb round">
|
|
62
63
|
{% else %}
|
|
63
64
|
<div class="admin-thumb round gray1 middle-align center-align">
|
|
64
|
-
<i class="extra">
|
|
65
|
+
<i class="extra">image</i>
|
|
65
66
|
</div>
|
|
66
67
|
{% endif %}
|
|
67
68
|
</td>
|
|
68
|
-
<td
|
|
69
|
+
<td>
|
|
69
70
|
{% if recipe.is_highlighted %}
|
|
70
71
|
<i class="tiny amber-text">star</i>
|
|
71
72
|
{% endif %}
|
|
72
73
|
<b>{{ recipe.title }}</b>
|
|
73
74
|
</td>
|
|
74
|
-
<td
|
|
75
|
+
<td>
|
|
75
76
|
{% if recipe.price %}
|
|
76
|
-
{{ recipe.price }}
|
|
77
|
+
€ {{ recipe.price }}
|
|
77
78
|
{% else %}
|
|
78
79
|
-
|
|
79
80
|
{% endif %}
|
|
80
81
|
</td>
|
|
81
|
-
<td
|
|
82
|
+
<td>
|
|
82
83
|
{{ recipe.daily_orders_count }} / {{ recipe.max_daily_orders|default:"∞" }}
|
|
83
84
|
</td>
|
|
84
|
-
<td class="
|
|
85
|
+
<td class="center-align">
|
|
85
86
|
<div class="row align-center">
|
|
86
87
|
<i class="primary-text">star</i>
|
|
87
88
|
<span>{{ recipe.avg_rating|default:0|floatformat:1 }}</span>
|
|
88
89
|
</div>
|
|
89
90
|
</td>
|
|
90
|
-
<td
|
|
91
|
-
{% if recipe.is_approved %}
|
|
92
|
-
<i class="primary-text">check_circle</i>
|
|
93
|
-
{% else %}
|
|
94
|
-
<a href="{% url 'admin_recipe_approve' recipe.pk %}" class="button tiny primary round" onclick="event.stopPropagation();">
|
|
95
|
-
<i>check</i>
|
|
96
|
-
<span>{% trans "Approve" %}</span>
|
|
97
|
-
</a>
|
|
98
|
-
{% endif %}
|
|
99
|
-
</td>
|
|
100
|
-
<td class="m l">
|
|
91
|
+
<td>
|
|
101
92
|
{% for tag in recipe.tags.all %}
|
|
102
93
|
<span class="chip tiny">{{ tag.name }}</span>
|
|
103
94
|
{% endfor %}
|
|
104
95
|
</td>
|
|
105
96
|
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
106
97
|
<td>{{ recipe.created_at|date:"SHORT_DATE_FORMAT" }}</td>
|
|
107
|
-
<td
|
|
98
|
+
<td>
|
|
108
99
|
<a href="{% url 'admin_recipe_delete' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Delete' %}"><i>delete</i></a>
|
|
109
100
|
</td>
|
|
110
101
|
</tr>
|