Projet

Général

Profil

0001-lingo-change-online-payment-page-to-directly-display.patch

Frédéric Péters, 29 août 2018 10:05

Télécharger (3,99 ko)

Voir les différences:

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
combo/apps/lingo/manager_views.py
22 22
from django.db.models import Q
23 23
from django.utils import six
24 24
from django.utils.timezone import make_aware
25
from django.views.generic import (CreateView, UpdateView, ListView,
26
        DeleteView, TemplateView)
25
from django.views.generic import CreateView, UpdateView, ListView, DeleteView
27 26
from django.http import HttpResponse
28 27

  
29 28
import eopayment
......
99 98
        else:
100 99
            writer.writerow([unicode(x).encode('utf-8') for x in row])
101 100
    return response
102

  
103

  
104
class ManagerHomeView(TemplateView):
105
    template_name = 'lingo/manager_home.html'
combo/apps/lingo/templates/lingo/manager_home.html
1
{% extends "lingo/manager_base.html" %}
2
{% load i18n %}
3

  
4
{% block content %}
5
<ul class="apps">
6
 <li><a class="button" href="{% url 'lingo-manager-transactions-list' %}">{% trans 'Transactions' %}</a></li>
7
 <li><a class="button" href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a></li>
8
</ul>
9
{% endblock %}
combo/apps/lingo/templates/lingo/transaction_list.html
4 4
{% block appbar %}
5 5
<h2>{% trans 'Transactions' %}</h2>
6 6
<span class="actions">
7
<a href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a>
7 8
<a href="{% url 'lingo-manager-transactions-download' %}">{% trans 'download CSV' %}</a>
8 9
</span>
9 10
{% endblock %}
10 11

  
11
{% block breadcrumb %}
12
{{ block.super }}
13
<a href="{% url 'lingo-manager-transactions-list' %}">{% trans 'Transactions' %}</a>
14
{% endblock %}
15

  
16 12
{% block content %}
17 13

  
18 14
<form>
combo/apps/lingo/urls.py
23 23
                    RemoveBasketItemApiView, ValidateTransactionApiView,
24 24
                    CancelTransactionApiView, SelfInvoiceView)
25 25
from .manager_views import (RegieListView, RegieCreateView, RegieUpdateView,
26
        RegieDeleteView, TransactionListView, ManagerHomeView, download_transactions_csv)
26
        RegieDeleteView, TransactionListView, download_transactions_csv)
27 27

  
28 28
lingo_manager_urls = [
29
    url('^$', ManagerHomeView.as_view(), name='lingo-manager-homepage'),
30
    url('^transactions/$', TransactionListView.as_view(), name='lingo-manager-transactions-list'),
29
    url('^$', TransactionListView.as_view(), name='lingo-manager-homepage'),
31 30
    url('^transactions/download-csv/$', download_transactions_csv, name='lingo-manager-transactions-download'),
32 31
    url('^regies/$', RegieListView.as_view(), name='lingo-manager-regie-list'),
33 32
    url('^regies/add/$', RegieCreateView.as_view(), name='lingo-manager-regie-add'),
34
-