Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
42
Issues
42
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
f6968fac
Verified
Commit
f6968fac
authored
Oct 16, 2018
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: add subscription history
parent
b2b03e53
Pipeline
#1561
failed with stage
in 7 minutes and 53 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
21 deletions
+67
-21
core/templates/core/user_detail.jinja
core/templates/core/user_detail.jinja
+27
-0
locale/fr/LC_MESSAGES/django.po
locale/fr/LC_MESSAGES/django.po
+35
-21
subscription/models.py
subscription/models.py
+5
-0
No files found.
core/templates/core/user_detail.jinja
View file @
f6968fac
...
@@ -119,6 +119,26 @@
...
@@ -119,6 +119,26 @@
<div>
<div>
{{
user_subscription
(
profile
)
}}
{{
user_subscription
(
profile
)
}}
</div>
</div>
<br>
<div
id=
"drop_subscriptions"
>
<h5>
{%
trans
%}
Subscription history
{%
endtrans
%}
</h5>
<table>
<tr>
<th>
{%
trans
%}
Subscription start
{%
endtrans
%}
</th>
<th>
{%
trans
%}
Subscription end
{%
endtrans
%}
</th>
<th>
{%
trans
%}
Subscription type
{%
endtrans
%}
</th>
<th>
{%
trans
%}
Payment method
{%
endtrans
%}
</th>
</tr>
{%
for
sub
in
profile.subscriptions.all
()
%}
<tr>
<td>
{{
sub.subscription_start
}}
</td>
<td>
{{
sub.subscription_end
}}
</td>
<td>
{{
sub.subscription_type
}}
</td>
<td>
{{
sub.get_payment_method_display
()
}}
</td>
</tr>
{%
endfor
%}
</table>
</div>
{%
endif
%}
{%
endif
%}
{%
if
user
==
profile
or
user.is_root
or
user.is_board_member
or
user.is_launderette_manager
%}
{%
if
user
==
profile
or
user.is_root
or
user.is_board_member
or
user.is_launderette_manager
%}
<div>
<div>
...
@@ -200,6 +220,13 @@ $(function(){
...
@@ -200,6 +220,13 @@ $(function(){
active
:
false
active
:
false
});
});
});
});
$
(
function
(){
$
(
"
#drop_subscriptions
"
).
accordion
({
heightStyle
:
"
content
"
,
collapsible
:
true
,
active
:
false
});
});
</script>
</script>
{%
endblock
%}
{%
endblock
%}
locale/fr/LC_MESSAGES/django.po
View file @
f6968fac
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
msgid
""
msgid
""
msgstr
""
msgstr
""
"Report-Msgid-Bugs-To:
\n
"
"Report-Msgid-Bugs-To:
\n
"
"POT-Creation-Date: 2018-10-1
0 02:17
+0200
\n
"
"POT-Creation-Date: 2018-10-1
6 00:13
+0200
\n
"
"PO-Revision-Date: 2016-07-18
\n
"
"PO-Revision-Date: 2016-07-18
\n
"
"Last-Translator: Skia <skia@libskia.so>
\n
"
"Last-Translator: Skia <skia@libskia.so>
\n
"
"Language-Team: AE info <ae.info@utbm.fr>
\n
"
"Language-Team: AE info <ae.info@utbm.fr>
\n
"
...
@@ -142,7 +142,7 @@ msgid "comment"
...
@@ -142,7 +142,7 @@ msgid "comment"
msgstr
"commentaire"
msgstr
"commentaire"
#: accounting/models.py:272 counter/models.py:353 counter/models.py:446
#: accounting/models.py:272 counter/models.py:353 counter/models.py:446
#: subscription/models.py:6
4
#: subscription/models.py:6
5
msgid
"payment method"
msgid
"payment method"
msgstr
"méthode de paiement"
msgstr
"méthode de paiement"
...
@@ -365,7 +365,7 @@ msgstr "Compte en banque : "
...
@@ -365,7 +365,7 @@ msgstr "Compte en banque : "
#: core/templates/core/group_list.jinja:13 core/templates/core/macros.jinja:93
#: core/templates/core/group_list.jinja:13 core/templates/core/macros.jinja:93
#: core/templates/core/macros.jinja:112 core/templates/core/page_prop.jinja:14
#: core/templates/core/macros.jinja:112 core/templates/core/page_prop.jinja:14
#: core/templates/core/user_account_detail.jinja:38
#: core/templates/core/user_account_detail.jinja:38
#: core/templates/core/user_detail.jinja:1
5
7
#: core/templates/core/user_detail.jinja:1
7
7
#: core/templates/core/user_edit.jinja:19
#: core/templates/core/user_edit.jinja:19
#: counter/templates/counter/last_ops.jinja:29
#: counter/templates/counter/last_ops.jinja:29
#: counter/templates/counter/last_ops.jinja:59
#: counter/templates/counter/last_ops.jinja:59
...
@@ -1138,6 +1138,7 @@ msgstr "Total"
...
@@ -1138,6 +1138,7 @@ msgstr "Total"
#: club/templates/club/club_sellings.jinja:27
#: club/templates/club/club_sellings.jinja:27
#: core/templates/core/user_account_detail.jinja:23
#: core/templates/core/user_account_detail.jinja:23
#: core/templates/core/user_account_detail.jinja:54
#: core/templates/core/user_account_detail.jinja:54
#: core/templates/core/user_detail.jinja:130
#: counter/templates/counter/last_ops.jinja:18
#: counter/templates/counter/last_ops.jinja:18
#: counter/templates/counter/last_ops.jinja:45
#: counter/templates/counter/last_ops.jinja:45
#: counter/templates/counter/refilling_list.jinja:14
#: counter/templates/counter/refilling_list.jinja:14
...
@@ -2282,7 +2283,7 @@ msgstr "403, Non autorisé"
...
@@ -2282,7 +2283,7 @@ msgstr "403, Non autorisé"
msgid
"404, Not Found"
msgid
"404, Not Found"
msgstr
"404. Non trouvé"
msgstr
"404. Non trouvé"
#: core/templates/core/500.jinja:
8
#: core/templates/core/500.jinja:
12
msgid
"500, Server Error"
msgid
"500, Server Error"
msgstr
"500, Erreur Serveur"
msgstr
"500, Erreur Serveur"
...
@@ -2986,25 +2987,42 @@ msgstr "Avatar"
...
@@ -2986,25 +2987,42 @@ msgstr "Avatar"
msgid
"Scrub"
msgid
"Scrub"
msgstr
"Blouse"
msgstr
"Blouse"
#: core/templates/core/user_detail.jinja:133
#: core/templates/core/user_detail.jinja:124
msgid
"Subscription history"
msgstr
"Historique de cotisation"
#: core/templates/core/user_detail.jinja:127
msgid
"Subscription start"
msgstr
"Début de la cotisation"
#: core/templates/core/user_detail.jinja:128
msgid
"Subscription end"
msgstr
"Fin de la cotisation"
#: core/templates/core/user_detail.jinja:129
#: subscription/templates/subscription/stats.jinja:36
msgid
"Subscription type"
msgstr
"Type de cotisation"
#: core/templates/core/user_detail.jinja:153
msgid
"Not subscribed"
msgid
"Not subscribed"
msgstr
"Non cotisant"
msgstr
"Non cotisant"
#: core/templates/core/user_detail.jinja:1
3
5
#: core/templates/core/user_detail.jinja:1
5
5
#: subscription/templates/subscription/subscription.jinja:4
#: subscription/templates/subscription/subscription.jinja:4
#: subscription/templates/subscription/subscription.jinja:8
#: subscription/templates/subscription/subscription.jinja:8
msgid
"New subscription"
msgid
"New subscription"
msgstr
"Nouvelle cotisation"
msgstr
"Nouvelle cotisation"
#: core/templates/core/user_detail.jinja:1
4
8
#: core/templates/core/user_detail.jinja:1
6
8
msgid
"Give gift"
msgid
"Give gift"
msgstr
"Donner cadeau"
msgstr
"Donner cadeau"
#: core/templates/core/user_detail.jinja:1
5
3
#: core/templates/core/user_detail.jinja:1
7
3
msgid
"Last given gift :"
msgid
"Last given gift :"
msgstr
"Dernier cadeau donné :"
msgstr
"Dernier cadeau donné :"
#: core/templates/core/user_detail.jinja:1
6
3
#: core/templates/core/user_detail.jinja:1
8
3
msgid
"No gift given yet"
msgid
"No gift given yet"
msgstr
"Aucun cadeau donné pour l'instant"
msgstr
"Aucun cadeau donné pour l'instant"
...
@@ -5044,35 +5062,35 @@ msgstr " demandé"
...
@@ -5044,35 +5062,35 @@ msgstr " demandé"
msgid
"
%(effective_quantity)
s left"
msgid
"
%(effective_quantity)
s left"
msgstr
"
%(effective_quantity)
s restant"
msgstr
"
%(effective_quantity)
s restant"
#: subscription/models.py:4
4
#: subscription/models.py:4
5
msgid
"Bad subscription type"
msgid
"Bad subscription type"
msgstr
"Mauvais type de cotisation"
msgstr
"Mauvais type de cotisation"
#: subscription/models.py:
49
#: subscription/models.py:
50
msgid
"Bad payment method"
msgid
"Bad payment method"
msgstr
"Mauvais type de paiement"
msgstr
"Mauvais type de paiement"
#: subscription/models.py:5
5
#: subscription/models.py:5
6
msgid
"subscription type"
msgid
"subscription type"
msgstr
"type d'inscription"
msgstr
"type d'inscription"
#: subscription/models.py:6
1
#: subscription/models.py:6
2
msgid
"subscription start"
msgid
"subscription start"
msgstr
"début de la cotisation"
msgstr
"début de la cotisation"
#: subscription/models.py:6
2
#: subscription/models.py:6
3
msgid
"subscription end"
msgid
"subscription end"
msgstr
"fin de la cotisation"
msgstr
"fin de la cotisation"
#: subscription/models.py:7
1
#: subscription/models.py:7
2
msgid
"location"
msgid
"location"
msgstr
"lieu"
msgstr
"lieu"
#: subscription/models.py:9
1
#: subscription/models.py:9
6
msgid
"You can not subscribe many time for the same period"
msgid
"You can not subscribe many time for the same period"
msgstr
"Vous ne pouvez pas cotiser plusieurs fois pour la même période"
msgstr
"Vous ne pouvez pas cotiser plusieurs fois pour la même période"
#: subscription/models.py:
96
#: subscription/models.py:
101
msgid
"Subscription error"
msgid
"Subscription error"
msgstr
"Erreur de cotisation"
msgstr
"Erreur de cotisation"
...
@@ -5084,10 +5102,6 @@ msgstr "Cotisations totales"
...
@@ -5084,10 +5102,6 @@ msgstr "Cotisations totales"
msgid
"Subscriptions by type"
msgid
"Subscriptions by type"
msgstr
"Cotisations par type"
msgstr
"Cotisations par type"
#: subscription/templates/subscription/stats.jinja:36
msgid
"Subscription type"
msgstr
"Type de cotisation"
#: subscription/templates/subscription/subscription.jinja:22
#: subscription/templates/subscription/subscription.jinja:22
msgid
"Eboutic is reserved to specific users. In doubt, don't use it."
msgid
"Eboutic is reserved to specific users. In doubt, don't use it."
msgstr
""
msgstr
""
...
...
subscription/models.py
View file @
f6968fac
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
from
datetime
import
date
,
timedelta
from
datetime
import
date
,
timedelta
from
django.db
import
models
from
django.db
import
models
from
django.utils
import
timezone
from
django.utils
import
timezone
from
ast
import
literal_eval
as
make_tuple
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.conf
import
settings
from
django.conf
import
settings
from
django.core.exceptions
import
ValidationError
from
django.core.exceptions
import
ValidationError
...
@@ -71,6 +72,10 @@ class Subscription(models.Model):
...
@@ -71,6 +72,10 @@ class Subscription(models.Model):
verbose_name
=
_
(
"location"
),
verbose_name
=
_
(
"location"
),
)
)
def
get_payment_method_display
(
self
):
return
_
(
make_tuple
(
self
.
payment_method
)[
1
])
class
Meta
:
class
Meta
:
ordering
=
[
"subscription_start"
]
ordering
=
[
"subscription_start"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment