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
917b559b
Commit
917b559b
authored
Oct 16, 2018
by
Sli
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'historique_cotisations' into 'master'
user: add subscription history See merge request
!167
parents
9089fe3a
72a4bde6
Pipeline
#1566
passed with stage
in 7 minutes and 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
30 deletions
+71
-30
core/management/commands/populate.py
core/management/commands/populate.py
+9
-9
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
No files found.
core/management/commands/populate.py
View file @
917b559b
...
...
@@ -389,7 +389,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
root
.
pk
)
.
first
(),
subscription_type
=
default_subscription
,
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -401,7 +401,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
skia
.
pk
)
.
first
(),
subscription_type
=
default_subscription
,
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -413,7 +413,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
counter
.
pk
)
.
first
(),
subscription_type
=
default_subscription
,
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -425,7 +425,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
comptable
.
pk
)
.
first
(),
subscription_type
=
default_subscription
,
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -437,7 +437,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
r
.
pk
)
.
first
(),
subscription_type
=
default_subscription
,
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -449,7 +449,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
subscriber
.
pk
)
.
first
(),
subscription_type
=
default_subscription
,
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -461,7 +461,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
old_subscriber
.
pk
)
.
first
(),
subscription_type
=
default_subscription
,
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
(
datetime
(
year
=
2012
,
month
=
9
,
day
=
4
))
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -841,7 +841,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
sli
.
pk
)
.
first
(),
subscription_type
=
list
(
settings
.
SITH_SUBSCRIPTIONS
.
keys
())[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
@@ -853,7 +853,7 @@ Welcome to the wiki page!
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
krophil
.
pk
)
.
first
(),
subscription_type
=
list
(
settings
.
SITH_SUBSCRIPTIONS
.
keys
())[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
]
[
0
]
,
)
s
.
subscription_start
=
s
.
compute_start
()
s
.
subscription_end
=
s
.
compute_end
(
...
...
core/templates/core/user_detail.jinja
View file @
917b559b
...
...
@@ -119,6 +119,26 @@
<div>
{{
user_subscription
(
profile
)
}}
</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
%}
{%
if
user
==
profile
or
user.is_root
or
user.is_board_member
or
user.is_launderette_manager
%}
<div>
...
...
@@ -200,6 +220,13 @@ $(function(){
active
:
false
});
});
$
(
function
(){
$
(
"
#drop_subscriptions
"
).
accordion
({
heightStyle
:
"
content
"
,
collapsible
:
true
,
active
:
false
});
});
</script>
{%
endblock
%}
locale/fr/LC_MESSAGES/django.po
View file @
917b559b
...
...
@@ -6,7 +6,7 @@
msgid
""
msgstr
""
"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
"
"Last-Translator: Skia <skia@libskia.so>
\n
"
"Language-Team: AE info <ae.info@utbm.fr>
\n
"
...
...
@@ -142,7 +142,7 @@ msgid "comment"
msgstr
"commentaire"
#: 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"
msgstr
"méthode de paiement"
...
...
@@ -365,7 +365,7 @@ msgstr "Compte en banque : "
#: 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/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
#: counter/templates/counter/last_ops.jinja:29
#: counter/templates/counter/last_ops.jinja:59
...
...
@@ -1138,6 +1138,7 @@ msgstr "Total"
#: club/templates/club/club_sellings.jinja:27
#: core/templates/core/user_account_detail.jinja:23
#: 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:45
#: counter/templates/counter/refilling_list.jinja:14
...
...
@@ -2282,7 +2283,7 @@ msgstr "403, Non autorisé"
msgid
"404, Not Found"
msgstr
"404. Non trouvé"
#: core/templates/core/500.jinja:
8
#: core/templates/core/500.jinja:
12
msgid
"500, Server Error"
msgstr
"500, Erreur Serveur"
...
...
@@ -2986,25 +2987,42 @@ msgstr "Avatar"
msgid
"Scrub"
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"
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:8
msgid
"New subscription"
msgstr
"Nouvelle cotisation"
#: core/templates/core/user_detail.jinja:1
4
8
#: core/templates/core/user_detail.jinja:1
6
8
msgid
"Give gift"
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 :"
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"
msgstr
"Aucun cadeau donné pour l'instant"
...
...
@@ -5044,35 +5062,35 @@ msgstr " demandé"
msgid
"
%(effective_quantity)
s left"
msgstr
"
%(effective_quantity)
s restant"
#: subscription/models.py:4
4
#: subscription/models.py:4
5
msgid
"Bad subscription type"
msgstr
"Mauvais type de cotisation"
#: subscription/models.py:
49
#: subscription/models.py:
50
msgid
"Bad payment method"
msgstr
"Mauvais type de paiement"
#: subscription/models.py:5
5
#: subscription/models.py:5
6
msgid
"subscription type"
msgstr
"type d'inscription"
#: subscription/models.py:6
1
#: subscription/models.py:6
2
msgid
"subscription start"
msgstr
"début de la cotisation"
#: subscription/models.py:6
2
#: subscription/models.py:6
3
msgid
"subscription end"
msgstr
"fin de la cotisation"
#: subscription/models.py:7
1
#: subscription/models.py:7
2
msgid
"location"
msgstr
"lieu"
#: subscription/models.py:9
1
#: subscription/models.py:9
6
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"
#: subscription/models.py:
96
#: subscription/models.py:
101
msgid
"Subscription error"
msgstr
"Erreur de cotisation"
...
...
@@ -5084,10 +5102,6 @@ msgstr "Cotisations totales"
msgid
"Subscriptions by type"
msgstr
"Cotisations par type"
#: subscription/templates/subscription/stats.jinja:36
msgid
"Subscription type"
msgstr
"Type de cotisation"
#: subscription/templates/subscription/subscription.jinja:22
msgid
"Eboutic is reserved to specific users. In doubt, don't use it."
msgstr
""
...
...
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