This commit is contained in:
Unknown
2018-02-01 15:05:53 +01:00
parent 1476a88d88
commit 4d3e8e6b53
11 changed files with 244 additions and 117 deletions

View File

@@ -1,4 +1,5 @@
{% load staticfiles %}
{% load i18n %}
<html>
<head>
@@ -19,7 +20,7 @@
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="{% url 'index' %}">Kochbuch</a>
<!--<a class="navbar-brand" href="{% url 'index' %}">{% trans 'Cookbook' %}</a>-->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText"
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
@@ -27,16 +28,16 @@
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="{% url 'index' %}">Rezepte <span class="sr-only">(current)</span></a>
<a class="nav-link" href="{% url 'index' %}">{% trans 'Cookbook' %}<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'new_recipe' %}">Neues Rezept</a>
<a class="nav-link" href="{% url 'new_recipe' %}">{% trans 'New Recipe' %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'new_category' %}">Neue Kategorie</a>
<a class="nav-link" href="{% url 'new_category' %}">{% trans 'New Category' %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'new_keyword' %}">Neues Tag</a>
<a class="nav-link" href="{% url 'new_keyword' %}">{% trans 'New Keyword' %}</a>
</li>
</ul>
<span class="navbar-text">

View File

@@ -13,15 +13,14 @@
</div>
<div class="card-body">
<form action="" method="get">
{% crispy filter.form %}
<input type="submit"/>
{{ filter.form|crispy }}
<input class="btn btn-primary" type="submit"/>
</form>
</div>
</div>
{% endif %}
<br/>
{% if recipes %}
{% render_table recipes %}
{% else %}

View File

@@ -1,17 +1,18 @@
{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% block title %}Neue Kategorie{% endblock %}
{% block title %}{% trans 'New Category' %}{% endblock %}
{% block content %}
<h3>
Neue Kategorie
<small class="text-muted">Neue Kategorie für ein Rezept</small>
{% trans 'New Category' %}
<small class="text-muted">{% trans 'New recipe Category' %}</small>
</h3>
<form method="POST" class="post-form">{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="save btn btn-default">Save</button>
{% crispy form %}
</form>
{% endblock %}

View File

@@ -1,9 +1,18 @@
{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% block title %}{% trans 'New Keyword' %}{% endblock %}
{% block content %}
<h3>
{% trans 'New Keyword' %}
<small class="text-muted">{% trans 'New recipe Keyword' %}</small>
</h3>
<form method="POST" class="post-form">{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="save btn btn-default">Save</button>
</form>
{% crispy form %}
</form>
{% endblock %}