mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
more generic views
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
<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' %}">{% trans 'Cookbook' %}<span
|
||||
<a class="nav-link" href="{% url 'index' %}"><i class="fas fa-book"></i> {% trans 'Cookbook' %}<span
|
||||
class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
@@ -55,6 +55,16 @@
|
||||
<a class="dropdown-item" href="{% url 'new_keyword' %}"><i class="fas fa-tags"></i> {% trans 'Keyword' %}</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
{% trans 'List' %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="{% url 'new_category' %}"><i class="fas fa-archive"></i> {% trans 'Category' %}</a>
|
||||
<a class="dropdown-item" href="{% url 'new_keyword' %}"><i class="fas fa-tags"></i> {% trans 'Keyword' %}</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Delete' %}{% endblock %}
|
||||
{% block title %}{% trans 'Delete' %} - {{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>
|
||||
{% trans 'Delete' %}
|
||||
<small class="text-muted">{% trans 'Delete this Object' %}</small>
|
||||
</h3>
|
||||
<h3>{% trans 'Delete' %} {{ title }}</h3>
|
||||
|
||||
<form action="." method="post">
|
||||
{% csrf_token %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{% blocktrans %}Are you sure you want to delete the {{ title }}: <b>{{ object }}</b> {% endblocktrans %}
|
||||
</div>
|
||||
{{ form|crispy }}
|
||||
<input type="submit" value="Submit" class="btn btn-success">
|
||||
</form>
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Edit' %}{% endblock %}
|
||||
{% block title %}{% trans 'Edit' %} - {{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>
|
||||
{% trans 'Edit' %}
|
||||
<small class="text-muted">{% trans 'Edit this Object' %}</small>
|
||||
</h3>
|
||||
<h3>{% trans 'Edit' %} {{ title }}</h3>
|
||||
|
||||
<form action="." method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{% if filter %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{% trans "Search" %}
|
||||
<i class="fas fa-search"></i> {% trans "Search" %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="get">
|
||||
@@ -81,7 +81,7 @@
|
||||
var link = $('#a_recipe_open');
|
||||
link.hide();
|
||||
|
||||
url = "{% url 'api_get_file_link' recipe_id=12345 %}".replace(/12345/, id);
|
||||
var url = "{% url 'api_get_file_link' recipe_id=12345 %}".replace(/12345/, id);
|
||||
|
||||
link.text("{% trans 'Open Recipe' %}");
|
||||
$('#modal_recipe').modal('show');
|
||||
|
||||
Reference in New Issue
Block a user