47 lines
1.4 KiB
HTML
47 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
|
{% load django_tables2 %}
|
|
{% load crispy_forms_tags %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{% trans "Cookbook" %}{% endblock %}
|
|
|
|
{% block extra_head %}
|
|
{{ filter.form.media }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col md-12">
|
|
{% if filter %}
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<i class="fas fa-search"></i> {% trans "Search" %}
|
|
</div>
|
|
<div class="card-body">
|
|
<form action="" method="get" id="search_form">
|
|
{{ filter.form|crispy }}
|
|
<input class="btn btn-primary" type="submit"/>
|
|
<a href="#" onclick="window.location = window.location.pathname;"
|
|
class="btn btn-warning">{% trans 'Reset' %}</a>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
{% if user.is_authenticated and recipes %}
|
|
{% render_table recipes %}
|
|
{% else %}
|
|
<div class="alert alert-danger" role="alert">
|
|
{% trans "Log in to view Recipies" %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% include 'include/recipe_open_modal.html' %}
|
|
|
|
{% endblock %} |