From 8b09ed7574cdc481a19792ed17c34147ce94c43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 19 Aug 2018 19:16:31 +0200 Subject: [PATCH] lingo: change online payment page to directly display transactions (#25928) --- combo/apps/lingo/manager_views.py | 7 +------ combo/apps/lingo/templates/lingo/manager_home.html | 9 --------- combo/apps/lingo/templates/lingo/transaction_list.html | 6 +----- combo/apps/lingo/urls.py | 5 ++--- 4 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 combo/apps/lingo/templates/lingo/manager_home.html diff --git a/combo/apps/lingo/manager_views.py b/combo/apps/lingo/manager_views.py index cf761ab4..88e6c4af 100644 --- a/combo/apps/lingo/manager_views.py +++ b/combo/apps/lingo/manager_views.py @@ -22,8 +22,7 @@ from django.core.urlresolvers import reverse_lazy from django.db.models import Q from django.utils import six from django.utils.timezone import make_aware -from django.views.generic import (CreateView, UpdateView, ListView, - DeleteView, TemplateView) +from django.views.generic import CreateView, UpdateView, ListView, DeleteView from django.http import HttpResponse import eopayment @@ -99,7 +98,3 @@ def download_transactions_csv(request): else: writer.writerow([unicode(x).encode('utf-8') for x in row]) return response - - -class ManagerHomeView(TemplateView): - template_name = 'lingo/manager_home.html' diff --git a/combo/apps/lingo/templates/lingo/manager_home.html b/combo/apps/lingo/templates/lingo/manager_home.html deleted file mode 100644 index d4671253..00000000 --- a/combo/apps/lingo/templates/lingo/manager_home.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "lingo/manager_base.html" %} -{% load i18n %} - -{% block content %} - -{% endblock %} diff --git a/combo/apps/lingo/templates/lingo/transaction_list.html b/combo/apps/lingo/templates/lingo/transaction_list.html index b7f186a2..29786ad5 100644 --- a/combo/apps/lingo/templates/lingo/transaction_list.html +++ b/combo/apps/lingo/templates/lingo/transaction_list.html @@ -4,15 +4,11 @@ {% block appbar %}

{% trans 'Transactions' %}

+{% trans 'Regies' %} {% trans 'download CSV' %} {% endblock %} -{% block breadcrumb %} -{{ block.super }} -{% trans 'Transactions' %} -{% endblock %} - {% block content %}
diff --git a/combo/apps/lingo/urls.py b/combo/apps/lingo/urls.py index d8a57aa3..33d7ac41 100644 --- a/combo/apps/lingo/urls.py +++ b/combo/apps/lingo/urls.py @@ -23,11 +23,10 @@ from .views import (RegiesApiView, AddBasketItemApiView, PayView, CallbackView, RemoveBasketItemApiView, ValidateTransactionApiView, CancelTransactionApiView, SelfInvoiceView) from .manager_views import (RegieListView, RegieCreateView, RegieUpdateView, - RegieDeleteView, TransactionListView, ManagerHomeView, download_transactions_csv) + RegieDeleteView, TransactionListView, download_transactions_csv) lingo_manager_urls = [ - url('^$', ManagerHomeView.as_view(), name='lingo-manager-homepage'), - url('^transactions/$', TransactionListView.as_view(), name='lingo-manager-transactions-list'), + url('^$', TransactionListView.as_view(), name='lingo-manager-homepage'), url('^transactions/download-csv/$', download_transactions_csv, name='lingo-manager-transactions-download'), url('^regies/$', RegieListView.as_view(), name='lingo-manager-regie-list'), url('^regies/add/$', RegieCreateView.as_view(), name='lingo-manager-regie-add'), -- 2.18.0