removed unused stuff and fixed manifest
This commit is contained in:
parent
d464633c70
commit
bf16e61a1f
@ -37,12 +37,6 @@
|
|||||||
"short_name": "Shopping",
|
"short_name": "Shopping",
|
||||||
"description": "View your shopping lists",
|
"description": "View your shopping lists",
|
||||||
"url": "./list/shopping-list/"
|
"url": "./list/shopping-list/"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Latest Shopping List",
|
|
||||||
"short_name": "Shopping List",
|
|
||||||
"description": "View the latest shopping list",
|
|
||||||
"url": "./shopping/latest/"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -59,14 +59,13 @@ urlpatterns = [
|
|||||||
path('space-overview', views.space_overview, name='view_space_overview'),
|
path('space-overview', views.space_overview, name='view_space_overview'),
|
||||||
path('space-manage/<int:space_id>', views.space_manage, name='view_space_manage'),
|
path('space-manage/<int:space_id>', views.space_manage, name='view_space_manage'),
|
||||||
path('switch-space/<int:space_id>', views.switch_space, name='view_switch_space'),
|
path('switch-space/<int:space_id>', views.switch_space, name='view_switch_space'),
|
||||||
|
path('profile/<int:user_id>', views.view_profile, name='view_profile'),
|
||||||
path('no-perm', views.no_perm, name='view_no_perm'),
|
path('no-perm', views.no_perm, name='view_no_perm'),
|
||||||
path('invite/<slug:token>', views.invite_link, name='view_invite'),
|
path('invite/<slug:token>', views.invite_link, name='view_invite'),
|
||||||
path('system/', views.system, name='view_system'),
|
path('system/', views.system, name='view_system'),
|
||||||
path('search/', views.search, name='view_search'),
|
path('search/', views.search, name='view_search'),
|
||||||
path('books/', views.books, name='view_books'),
|
path('books/', views.books, name='view_books'),
|
||||||
path('plan/', views.meal_plan, name='view_plan'),
|
path('plan/', views.meal_plan, name='view_plan'),
|
||||||
path('plan/entry/<int:pk>', views.meal_plan_entry, name='view_plan_entry'),
|
|
||||||
path('shopping/latest/', lists.shopping_list, name='view_shopping_latest'),
|
|
||||||
path('shopping/', lists.shopping_list, name='view_shopping'),
|
path('shopping/', lists.shopping_list, name='view_shopping'),
|
||||||
path('settings/', views.user_settings, name='view_settings'),
|
path('settings/', views.user_settings, name='view_settings'),
|
||||||
path('history/', views.history, name='view_history'),
|
path('history/', views.history, name='view_history'),
|
||||||
|
@ -175,6 +175,10 @@ def meal_plan(request):
|
|||||||
def supermarket(request):
|
def supermarket(request):
|
||||||
return render(request, 'supermarket.html', {})
|
return render(request, 'supermarket.html', {})
|
||||||
|
|
||||||
|
@group_required('user')
|
||||||
|
def view_profile(request, user_id):
|
||||||
|
return render(request, 'supermarket.html', {})
|
||||||
|
|
||||||
|
|
||||||
@group_required('user')
|
@group_required('user')
|
||||||
def ingredient_editor(request):
|
def ingredient_editor(request):
|
||||||
@ -189,23 +193,6 @@ def ingredient_editor(request):
|
|||||||
return render(request, 'ingredient_editor.html', template_vars)
|
return render(request, 'ingredient_editor.html', template_vars)
|
||||||
|
|
||||||
|
|
||||||
@group_required('user')
|
|
||||||
def meal_plan_entry(request, pk):
|
|
||||||
plan = MealPlan.objects.filter(space=request.space).get(pk=pk)
|
|
||||||
|
|
||||||
if plan.created_by != request.user and plan.shared != request.user:
|
|
||||||
messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!'))
|
|
||||||
return HttpResponseRedirect(reverse_lazy('index'))
|
|
||||||
|
|
||||||
same_day_plan = MealPlan.objects \
|
|
||||||
.filter(date=plan.date, space=request.space) \
|
|
||||||
.exclude(pk=plan.pk) \
|
|
||||||
.filter(Q(created_by=request.user) | Q(shared=request.user)) \
|
|
||||||
.order_by('meal_type').all()
|
|
||||||
|
|
||||||
return render(request, 'meal_plan_entry.html', {'plan': plan, 'same_day_plan': same_day_plan})
|
|
||||||
|
|
||||||
|
|
||||||
@group_required('guest')
|
@group_required('guest')
|
||||||
def user_settings(request):
|
def user_settings(request):
|
||||||
if request.space.demo:
|
if request.space.demo:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<b-card no-body v-hover v-if="recipe">
|
<b-card no-body v-hover v-if="recipe">
|
||||||
<a :href="clickUrl()">
|
<a :href="this.recipe.id !== undefined ? resolveDjangoUrl('view_recipe', this.recipe.id) : null">
|
||||||
<b-card-img-lazy style="height: 15vh; object-fit: cover" class="" :src="recipe_image" v-bind:alt="$t('Recipe_Image')" top></b-card-img-lazy>
|
<b-card-img-lazy style="height: 15vh; object-fit: cover" class="" :src="recipe_image" v-bind:alt="$t('Recipe_Image')" top></b-card-img-lazy>
|
||||||
<div class="card-img-overlay h-100 d-flex flex-column justify-content-right float-right text-right pt-2 pr-1" v-if="show_context_menu">
|
<div class="card-img-overlay h-100 d-flex flex-column justify-content-right float-right text-right pt-2 pr-1" v-if="show_context_menu">
|
||||||
<a>
|
<a>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<b-card-body class="p-4">
|
<b-card-body class="p-4">
|
||||||
<h6>
|
<h6>
|
||||||
<a :href="clickUrl()">
|
<a :href="this.recipe.id !== undefined ? resolveDjangoUrl('view_recipe', this.recipe.id) : null">
|
||||||
<template v-if="recipe !== null">{{ recipe.name }}</template>
|
<template v-if="recipe !== null">{{ recipe.name }}</template>
|
||||||
<template v-else>{{ meal_plan.title }}</template>
|
<template v-else>{{ meal_plan.title }}</template>
|
||||||
</a>
|
</a>
|
||||||
@ -101,14 +101,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// TODO: convert this to genericAPI
|
|
||||||
clickUrl: function () {
|
|
||||||
if (this.recipe !== null) {
|
|
||||||
return resolveDjangoUrl("view_recipe", this.recipe.id)
|
|
||||||
} else {
|
|
||||||
return resolveDjangoUrl("view_plan_entry", this.meal_plan.id)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
hover: {
|
hover: {
|
||||||
|
Loading…
Reference in New Issue
Block a user