Commit 23f56e74 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Start working on edit a recipe in panel

parent f22c6835
This diff is collapsed.
This diff is collapsed.
/*!
* Datetimepicker for Bootstrap 3
* version : 4.17.47
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/.bootstrap-datetimepicker-widget{list-style:none}.bootstrap-datetimepicker-widget.dropdown-menu{display:block;margin:2px 0;padding:4px;width:19em}@media (min-width:768px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:992px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:1200px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}.bootstrap-datetimepicker-widget.dropdown-menu:before,.bootstrap-datetimepicker-widget.dropdown-menu:after{content:'';display:inline-block;position:absolute}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);top:-7px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;top:-6px;left:8px}.bootstrap-datetimepicker-widget.dropdown-menu.top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.dropdown-menu.top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget .list-unstyled{margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:bold;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Hours"}.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Hours"}.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Hours"}.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle AM/PM"}.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Clear the picker"}.bootstrap-datetimepicker-widget .btn[data-action="today"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Set the date to today"}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget .picker-switch::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle Date and Time Screens"}.bootstrap-datetimepicker-widget .picker-switch td{padding:0;margin:0;height:auto;width:auto;line-height:inherit}.bootstrap-datetimepicker-widget .picker-switch td span{line-height:2.5;height:2.5em;width:100%}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget table td,.bootstrap-datetimepicker-widget table th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget table th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table th.picker-switch{width:145px}.bootstrap-datetimepicker-widget table th.disabled,.bootstrap-datetimepicker-widget table th.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table th.prev::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Previous Month"}.bootstrap-datetimepicker-widget table th.next::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Next Month"}.bootstrap-datetimepicker-widget table thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget table thead tr:first-child th:hover{background:#eee}.bootstrap-datetimepicker-widget table td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget table td.cw{font-size:.8em;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget table td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table td.day:hover,.bootstrap-datetimepicker-widget table td.hour:hover,.bootstrap-datetimepicker-widget table td.minute:hover,.bootstrap-datetimepicker-widget table td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget table td.old,.bootstrap-datetimepicker-widget table td.new{color:#777}.bootstrap-datetimepicker-widget table td.today{position:relative}.bootstrap-datetimepicker-widget table td.today:before{content:'';display:inline-block;border:solid transparent;border-width:0 0 7px 7px;border-bottom-color:#337ab7;border-top-color:rgba(0,0,0,0.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget table td.active,.bootstrap-datetimepicker-widget table td.active:hover{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget table td.disabled,.bootstrap-datetimepicker-widget table td.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget table td span:hover{background:#eee}.bootstrap-datetimepicker-widget table td span.active{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td span.old{color:#777}.bootstrap-datetimepicker-widget table td span.disabled,.bootstrap-datetimepicker-widget table td span.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget.usetwentyfour td.hour{height:27px;line-height:27px}.bootstrap-datetimepicker-widget.wider{width:21em}.bootstrap-datetimepicker-widget .datepicker-decades .decade{line-height:1.8em !important}.input-group.date .input-group-addon{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}
\ No newline at end of file
......@@ -137,4 +137,85 @@ form.top-actions {
.actions-a-recipe .trash, .actions-a-recipe .delete {
color: #aa0000;
}
/*
Edit a recipe style
*/
form#recipe-form table td {
padding-bottom: 10px !important;
vertical-align: middle;
}
form#recipe-form table td:first-child {
padding-right: 10px;
}
form#recipe-form input[type=text],
form#recipe-form div.categories,
form#recipe-form textarea,
form#recipe-form .input-with-icon-group {
width: 600px;
}
form#recipe-form select {
height: 35px;
line-height: 35px;
}
form#recipe-form .input-with-icon-group input {
width: 100%;
}
@media screen and (max-width: 950px) {
form#recipe-form input[type=text],
form#recipe-form div.categories,
form#recipe-form textarea,
form#recipe-form .input-with-icon-group{
width: 100%;
}
}
form#recipe-form input[type=text] {
height: 35px;
line-height: 35px;
}
form#recipe-form div.categories div {
display: inline-block;
margin-right: 10px;
width: 187px;
}
.align-top {
vertical-align: top !important;
}
form#recipe-form textarea {
height: 200px;
resize: vertical;
}
form#recipe-form label.category {
font-weight: normal;
}
form#recipe-form input.time-details {
width: 100px;
display: inline-block;
}
form#recipe-form span.label-time {
display: inline-block;
min-width: 60px;
text-align: center;
}
h2.subtitle-recipe {
margin-top: 5px;
}
div.subtitle-recipe {
margin-bottom: 30px;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*!
* inputmask.extensions.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.10
*/
!function(i){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],i):"object"==typeof exports?module.exports=i(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):i(window.dependencyLib||jQuery,window.Inputmask)}(function(i,n){return n.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),n.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(i,n,e,a,t){return e-1>-1&&"."!==n.buffer[e-1]?(i=n.buffer[e-1]+i,i=e-2>-1&&"."!==n.buffer[e-2]?n.buffer[e-2]+i:"0"+i):i="00"+i,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(i)},cardinality:1}},onUnMask:function(i,n,e){return i},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(i,n){return(i=i.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(i,n,e){return i},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),n});
\ No newline at end of file
This diff is collapsed.
/*!
* jquery.inputmask.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.10
*/
!function(t){"function"==typeof define&&define.amd?define(["jquery","./inputmask"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("./inputmask")):t(jQuery,window.Inputmask)}(function(t,e){return void 0===t.fn.inputmask&&(t.fn.inputmask=function(i,n){var a,s=this[0];if(void 0===n&&(n={}),"string"==typeof i)switch(i){case"unmaskedvalue":return s&&s.inputmask?s.inputmask.unmaskedvalue():t(s).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return s&&s.inputmask?s.inputmask.getemptymask():"";case"hasMaskedValue":return!(!s||!s.inputmask)&&s.inputmask.hasMaskedValue();case"isComplete":return!s||!s.inputmask||s.inputmask.isComplete();case"getmetadata":return s&&s.inputmask?s.inputmask.getmetadata():void 0;case"setvalue":t(s).val(n),s&&void 0===s.inputmask&&t(s).triggerHandler("setvalue");break;case"option":if("string"!=typeof n)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(n)});if(s&&void 0!==s.inputmask)return s.inputmask.option(n);break;default:return n.alias=i,a=new e(n),this.each(function(){a.mask(this)})}else{if("object"==typeof i)return a=new e(i),void 0===i.mask&&void 0===i.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(i);a.mask(this)}):this.each(function(){a.mask(this)});if(void 0===i)return this.each(function(){(a=new e(n)).mask(this)})}}),t.fn.inputmask});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
if (!panel) {
throw "panel was not included!"
}
panel.recipe = {};
panel.recipe.init = function (lang) {
panel.recipe.init_events(lang);
};
panel.recipe.init_events = function (lang) {
$(".datepicker").datetimepicker({
format: "DD/MM/YYYY HH:mm",
locale: lang
});
let placeholder = 'dd/mm/yyyy hh:mm';
if (lang.split("-")[0] === "fr")
placeholder = 'jj/mm/aaaa hh:mm';
$('.datemask').inputmask("datetime", {
mask: "1/2/y h:s",
placeholder: placeholder,
alias: "dd/mm/yyyy"
});
};
\ No newline at end of file
......@@ -3,7 +3,7 @@ from django.utils.translation import ugettext as _
from django.utils.translation import pgettext
from django.views.generic.base import RedirectView
from .views import IndexView, RecipesView, RecipesChangeView
from .views import IndexView, RecipesView, RecipesChangeView, RecipeView
favicon_view = RedirectView.as_view(url='/static/favicon.ico', permanent=True)
......@@ -38,4 +38,11 @@ urlpatterns = [
# Change:
url(r'^' + _("recipes") + '/change/', RecipesChangeView.as_view(), name='panel_recipes_change'),
########################
# One Recipe view URLs #
########################
# Main recipe URL:
url(r'^' + _("recipe") + "/(?P<slug>\w+)$", RecipeView.as_view(), name='panel_recipe'),
]
from django.views.generic import View
from django.shortcuts import render, redirect
from pywebcooking import settings
from main.models import Recipe, Category
from django_gravatar.helpers import get_gravatar_url
from django.utils.translation import ugettext as _
class RecipeView(View):
@staticmethod
def categories():
cats = []
cats_get = Category.objects.order_by('order')
for cat in cats_get:
cats.append({"name": cat.name, "url": cat.url})
return cats
def get(self, request, slug):
if not self.request.user.is_authenticated:
return redirect('%s?next=%s' % (settings.LOGIN_URL, request.path))
recipe = Recipe.objects.get(slug=slug)
r_cats = []
for cat in recipe.category.all():
r_cats.append(cat.url)
context = {
"recipe": recipe,
"categories": self.categories(),
"r_cats": r_cats,
"staff": request.user.is_staff,
"user_name": request.user.first_name + " " + request.user.last_name,
"avatar": get_gravatar_url(request.user.email, size=160),
"page": "recipe",
"lang": settings.LANGUAGE_CODE,
"title": _("Edit") + " \"" + recipe.title + "\" | " + settings.SITE_NAME,
"tps_prep_h": int(recipe.tps_prep / 60),
"tps_prep_min": recipe.tps_prep % 60,
"tps_break_j": int(recipe.tps_rep / 1440),
"tps_break_h": int((recipe.tps_rep % 1440) / 60),
"tps_break_min": recipe.tps_rep % 60,
"tps_cook_h": int(recipe.tps_cuis / 60),
"tps_cook_min": recipe.tps_cuis % 60,
}
return render(request, 'panel/recipe.html', context)
from .IndexView import IndexView
from .RecipesView import RecipesView
from .RecipesChangeView import RecipesChangeView
from .RecipeView import RecipeView
......@@ -20,7 +20,7 @@
<!-- AdminLTE skin -->
<link rel="stylesheet" type="text/css" href="{% static 'adminlte/css/skins/skin-red.min.css' %}">
<!-- Date Picker -->
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-datepicker.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-datetimepicker.min.css' %}">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap3-wysihtml5.min.css' %}">
<!-- main style -->
......@@ -50,7 +50,13 @@
<!-- Bootstrap 3.3.7 -->
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
<!-- datepicker -->
<script src="{% static 'js/bootstrap-datepicker.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/moment-with-locales.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/bootstrap-datetimepicker.min.js' %}" type="text/javascript"></script>
<!-- input mask -->
<script src="{% static 'js/inputmask.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery.inputmask.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/inputmask.extensions.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/inputmask.date.extensions.min.js' %}" type="text/javascript"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="{% static 'js/bootstrap3-wysihtml5.all.min.js' %}" type="text/javascript"></script>
<!-- Slimscroll -->
......
{% extends "panel/base.html" %}
{% load staticfiles %}
{% load l10n %}
{% load i18n %}
{% block scripts %}
{{ block.super }}
<script src="{% static 'js/panel.recipe.js' %}" defer></script>
{% endblock %}
{% block onload %}
{{ block.super }}
panel.recipe.init("{{ lang }}");
{% endblock %}
{% block content %}
<section class="content-header">
<h1>
{% trans "Recipe" %}
</h1>
<ol class="breadcrumb">
<li><a href="{% url 'panel_index' %}"><i class="fa fa-dashboard"></i> {% trans "Home" %}</a></li>
<li><a href="{% url 'panel_recipes' %}">{% trans "Recipes" %}</a></li>
<li class="active">{{ recipe.title }}</li>
</ol>
</section>
<section class="content">
<div class="subtitle-recipe">
<h2 class="subtitle-recipe">
{{ recipe.title }}
</h2>
<a href="{% url "website_recipe" slug=recipe.slug %}" target="show-recipe">{% trans "Show recipe" %}</a>
</div>
<form id="recipe-form">
<table>
<tbody>
<tr>
<td>
<label for="recipe-title">{% trans "Title" %}</label>
</td>
<td>
<input type="text" id="recipe-title" class="form-control" value="{{ recipe.title }}" />
</td>
</tr>
<tr>
<td>
<label for="recipe-slug">{% trans "Slug" %}</label>
</td>
<td>
<input type="text" id="recipe-slug" class="form-control" value="{{ recipe.slug }}">
</td>
</tr>
<tr>
<td class="align-top">
<label>{% trans "Categories" %}</label>
</td>
<td class="align-top">
<div class="categories">
{% for category in categories %}
<div>
<label class="category">
<input type="checkbox" value="{{ category.url }}" {% if category.url in r_cats %}checked{% endif %}/> {{ category.name }}
</label>
</div>
{% endfor %}
</div>
</td>
</tr>
<tr>
<td>
<label for="recipe-prep-time-hr">{% trans "Prep:" %}</label>
</td>
<td>
<input type="number" class="form-control time-details" id="recipe-prep-time-hr" min="0" max="24" value="{{ tps_prep_h }}" />
<span class="label-time">{% trans "hours" %}</span>
<input type="number" class="form-control time-details" id="recipe-prep-time-min" min="0" max="59" value="{{ tps_prep_min }}" />
<span class="label-time">{% trans "minutes" %}</span>
</td>
</tr>
<tr>
<td>
<label for="recipe-prep-time-hr">{% trans "Break:" %}</label>
</td>
<td>
<input type="number" class="form-control time-details" id="recipe-break-time-d" min="0" max="7" value="{{ tps_break_j }}" />
<span class="label-time">{% trans "days" %}</span>
<input type="number" class="form-control time-details" id="recipe-break-time-hr" min="0" max="23" value="{{ tps_break_h }}" />
<span class="label-time">{% trans "hours" %}</span>
<input type="number" class="form-control time-details" id="recipe-break-time-min" min="0" max="59" value="{{ tps_break_min }}" />
<span class="label-time">{% trans "minutes" %}</span>
</td>
</tr>
<tr>
<td>
<label for="recipe-prep-time-hr">{% trans "Cook:" %}</label>
</td>
<td>
<input type="number" class="form-control time-details" id="recipe-cook-time-hr" min="0" max="24" value="{{ tps_cook_h }}" />
<span class="label-time">{% trans "hours" %}</span>
<input type="number" class="form-control time-details" id="recipe-cook-time-min" min="0" max="59" value="{{ tps_cook_min }}" />
<span class="label-time">{% trans "minutes" %}</span>
</td>
</tr>
<tr>
<td class="align-top">
<label for="recipe-desc">{% trans "Description" %}</label>
</td>
<td class="align-top">
<textarea id="recipe-desc" class="form-control">{{ recipe.description }}</textarea>
</td>
</tr>
<tr>
<td>
<label for="recipe-pub-date">{% trans "Publication date" %}</label>
</td>
<td>
<div class="input-group input-with-icon-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" id="recipe-pub-date" class="form-control datemask datepicker" value="{{ recipe.pub_date | date:"d/m/y h:i" }}" />
</div>
</td>
</tr>
<tr>
<td>
<label for="recipe-status">{% trans "Status" %}</label>
</td>
<td>
<select id="recipe-status" class="form-control">
<option value="published" {% if recipe.published %}selected{% endif %}>{% trans "Published" context "singular" %}</option>
<option value="draft" {% if not recipe.published %}selected{% endif %}>{% trans "Draft" %}</option>
</select>
</td>
</tr>
</tbody>
</table>
</form>
<p>{% trans "Want to edit the full recipe? Please use the" %}
<a href="https://gite.flo-art.fr/cooking/qrecipewriter" target="qrecipewriter">{% trans "QRecipeWriter software" %}</a>
{% trans "(available for Windows and Linux)" %}.
</p>
</section>
{% endblock %}
\ No newline at end of file
......@@ -119,7 +119,7 @@
{% endif %}
</td>
<td>
<a class="link-recipe" href="#">{{ recipe.title }}</a>
<a class="link-recipe" href="{% url "panel_recipe" slug=recipe.slug %}">{{ recipe.title }}</a>
<div class="actions-a-recipe">
{% if not recipe.trash %}
<a href="{% url "website_recipe" slug=recipe.slug %}">{% trans "Show" %}</a>
......
......@@ -27,7 +27,7 @@
<li class="header">MENU</li>
<!-- Optionally, you can add icons to the links -->
<li class="{% if page == 'home' %}active{% endif %}"><a href="/panel/"><i class="fa fa-home"></i> <span>{% trans "Home" %}</span></a></li>
<li class="{% if page == 'recipes' %}active{% endif %}"><a href="{% url "panel_recipes" %}"><i class="fa fa-book"></i> <span>{% trans "Recipes" %}</span></a></li>
<li class="{% if page == 'recipes' or page == "recipe" %}active{% endif %}"><a href="{% url "panel_recipes" %}"><i class="fa fa-book"></i> <span>{% trans "Recipes" %}</span></a></li>
<li><a href="#"><i class="fa fa-bookmark"></i> <span>{% trans "Categories" %}</span></a></li>
<li><a href="#"><i class="fa fa-picture-o"></i> <span>{% trans "Medias" %}</span></a></li>
<li><a href="#"><i class="fa fa-pagelines"></i> <span>{% trans "Page" %}</span></a></li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment