diff --git a/cookbook/tables.py b/cookbook/tables.py index 9dface13..bc1979b4 100644 --- a/cookbook/tables.py +++ b/cookbook/tables.py @@ -14,8 +14,6 @@ class RecipeTable(tables.Table): attrs={'td': {'class': 'd-none d-lg-table-cell'}, 'th': {'class': 'd-none d-lg-table-cell'}}) all_tags = tables.Column( attrs={'td': {'class': 'd-none d-lg-table-cell'}, 'th': {'class': 'd-none d-lg-table-cell'}}) - delete = tables.TemplateColumn( - "" + _('Delete') + "") # TODO remove and put into edit page class Meta: model = Recipe @@ -25,7 +23,6 @@ class RecipeTable(tables.Table): class CategoryTable(tables.Table): id = tables.LinkColumn('edit_category', args=[A('id')]) - delete = tables.TemplateColumn("" + _('Delete') + "") class Meta: model = Category @@ -35,7 +32,6 @@ class CategoryTable(tables.Table): class KeywordTable(tables.Table): id = tables.LinkColumn('edit_keyword', args=[A('id')]) - delete = tables.TemplateColumn("" + _('Delete') + "") class Meta: model = Keyword @@ -61,7 +57,6 @@ class ImportLogTable(tables.Table): class MonitoredPathTable(tables.Table): id = tables.LinkColumn('edit_monitor', args=[A('id')]) - delete = tables.TemplateColumn("" + _('Delete') + "") @staticmethod def render_path(value): diff --git a/cookbook/templates/generic/edit_template.html b/cookbook/templates/generic/edit_template.html index 79115abe..5b6fc96f 100644 --- a/cookbook/templates/generic/edit_template.html +++ b/cookbook/templates/generic/edit_template.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load crispy_forms_tags %} {% load i18n %} +{% load class_tag %} {% block title %}{% trans 'Edit' %} - {{ title }}{% endblock %} @@ -16,6 +17,7 @@ {% csrf_token %} {{ form|crispy }} + {% trans 'Delete' %} {% endblock %} \ No newline at end of file diff --git a/cookbook/templates/index.html b/cookbook/templates/index.html index e5380e99..3a589096 100644 --- a/cookbook/templates/index.html +++ b/cookbook/templates/index.html @@ -16,15 +16,18 @@ {% if filter %}