Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
97ff4341
Commit
97ff4341
authored
Jul 19, 2016
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Translate most of the Sith
parent
1b4324f3
Pipeline
#58
failed with stage
in 1 minute and 5 seconds
Changes
55
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
55 changed files
with
1230 additions
and
467 deletions
+1230
-467
accounting/migrations/0011_auto_20160718_1805.py
accounting/migrations/0011_auto_20160718_1805.py
+19
-0
accounting/templates/accounting/accountingtype_list.jinja
accounting/templates/accounting/accountingtype_list.jinja
+9
-12
accounting/templates/accounting/bank_account_details.jinja
accounting/templates/accounting/bank_account_details.jinja
+8
-13
accounting/templates/accounting/bank_account_list.jinja
accounting/templates/accounting/bank_account_list.jinja
+7
-7
accounting/templates/accounting/club_account_details.jinja
accounting/templates/accounting/club_account_details.jinja
+33
-37
accounting/templates/accounting/journal_details.jinja
accounting/templates/accounting/journal_details.jinja
+25
-28
club/migrations/0003_auto_20160718_1819.py
club/migrations/0003_auto_20160718_1819.py
+25
-0
club/models.py
club/models.py
+3
-3
club/templates/club/club_detail.jinja
club/templates/club/club_detail.jinja
+6
-6
club/templates/club/club_edit.jinja
club/templates/club/club_edit.jinja
+2
-2
club/templates/club/club_edit_prop.jinja
club/templates/club/club_edit_prop.jinja
+2
-2
club/templates/club/club_list.jinja
club/templates/club/club_list.jinja
+9
-9
club/templates/club/club_members.jinja
club/templates/club/club_members.jinja
+2
-2
club/templates/club/club_tools.jinja
club/templates/club/club_tools.jinja
+18
-18
club/views.py
club/views.py
+1
-1
core/templates/core/403.jinja
core/templates/core/403.jinja
+1
-1
core/templates/core/404.jinja
core/templates/core/404.jinja
+1
-1
core/templates/core/base.jinja
core/templates/core/base.jinja
+45
-44
core/templates/core/create.jinja
core/templates/core/create.jinja
+6
-6
core/templates/core/delete_confirm.jinja
core/templates/core/delete_confirm.jinja
+6
-6
core/templates/core/edit.jinja
core/templates/core/edit.jinja
+6
-6
core/templates/core/group_edit.jinja
core/templates/core/group_edit.jinja
+7
-7
core/templates/core/group_list.jinja
core/templates/core/group_list.jinja
+4
-4
core/templates/core/index.jinja
core/templates/core/index.jinja
+1
-1
core/templates/core/login.jinja
core/templates/core/login.jinja
+6
-6
core/templates/core/page.jinja
core/templates/core/page.jinja
+17
-16
core/templates/core/page_detail.jinja
core/templates/core/page_detail.jinja
+19
-19
core/templates/core/page_hist.jinja
core/templates/core/page_hist.jinja
+9
-9
core/templates/core/page_list.jinja
core/templates/core/page_list.jinja
+11
-11
core/templates/core/page_prop.jinja
core/templates/core/page_prop.jinja
+6
-6
core/templates/core/pagerev_edit.jinja
core/templates/core/pagerev_edit.jinja
+9
-9
core/templates/core/password_change.jinja
core/templates/core/password_change.jinja
+1
-1
core/templates/core/password_change_done.jinja
core/templates/core/password_change_done.jinja
+1
-1
core/templates/core/password_reset.jinja
core/templates/core/password_reset.jinja
+1
-1
core/templates/core/password_reset_complete.jinja
core/templates/core/password_reset_complete.jinja
+2
-2
core/templates/core/password_reset_confirm.jinja
core/templates/core/password_reset_confirm.jinja
+1
-1
core/templates/core/password_reset_done.jinja
core/templates/core/password_reset_done.jinja
+5
-5
core/templates/core/register.jinja
core/templates/core/register.jinja
+6
-6
core/templates/core/user_base.jinja
core/templates/core/user_base.jinja
+15
-15
core/templates/core/user_detail.jinja
core/templates/core/user_detail.jinja
+9
-7
core/templates/core/user_edit.jinja
core/templates/core/user_edit.jinja
+9
-9
core/templates/core/user_group.jinja
core/templates/core/user_group.jinja
+6
-6
core/templates/core/user_list.jinja
core/templates/core/user_list.jinja
+2
-2
core/templates/core/user_tools.jinja
core/templates/core/user_tools.jinja
+21
-21
core/views/user.py
core/views/user.py
+1
-1
counter/migrations/0008_auto_20160718_1805.py
counter/migrations/0008_auto_20160718_1805.py
+19
-0
counter/templates/counter/counter_click.jinja
counter/templates/counter/counter_click.jinja
+50
-50
counter/templates/counter/counter_edit.jinja
counter/templates/counter/counter_edit.jinja
+6
-6
counter/templates/counter/counter_list.jinja
counter/templates/counter/counter_list.jinja
+13
-13
counter/templates/counter/counter_main.jinja
counter/templates/counter/counter_main.jinja
+12
-12
counter/templates/counter/user_account.jinja
counter/templates/counter/user_account.jinja
+2
-4
locale/fr/LC_MESSAGES/django.mo
locale/fr/LC_MESSAGES/django.mo
+0
-0
locale/fr/LC_MESSAGES/django.po
locale/fr/LC_MESSAGES/django.po
+698
-9
subscription/migrations/0002_auto_20160718_1805.py
subscription/migrations/0002_auto_20160718_1805.py
+24
-0
subscription/templates/subscription/subscription.jinja
subscription/templates/subscription/subscription.jinja
+3
-3
No files found.
accounting/migrations/0011_auto_20160718_1805.py
0 → 100644
View file @
97ff4341
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'accounting'
,
'0010_remove_operation_type'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'operation'
,
name
=
'mode'
,
field
=
models
.
CharField
(
max_length
=
255
,
verbose_name
=
'payment method'
,
choices
=
[(
'cheque'
,
'Check'
),
(
'cash'
,
'Cash'
),
(
'transfert'
,
'Transfert'
),
(
'card'
,
'Credit card'
)]),
),
]
accounting/templates/accounting/accountingtype_list.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
title
%}
Accounting type list
{%
trans
%}
Accounting type list
{%
endtrans
%}
{%
endblock
%}
{%
block
content
%}
<p><a
href=
"
{{
url
(
'accounting:type_new'
)
}}
"
>
New accounting type
</a></p>
<p><a
href=
"
{{
url
(
'accounting:type_new'
)
}}
"
>
{%
trans
%}
New accounting type
{%
endtrans
%}
</a></p>
{%
if
accountingtype_list
%}
<h3>
Accounting type list
</h3>
<ul>
{%
for
a
in
accountingtype_list
%}
<li><a
href=
"
{{
url
(
'accounting:type_edit'
,
type_id
=
a.id
)
}}
"
>
{{
a
}}
</a></li>
{%
endfor
%}
</ul>
<h3>
{%
trans
%}
Accounting type list
{%
endtrans
%}
</h3>
<ul>
{%
for
a
in
accountingtype_list
%}
<li><a
href=
"
{{
url
(
'accounting:type_edit'
,
type_id
=
a.id
)
}}
"
>
{{
a
}}
</a></li>
{%
endfor
%}
</ul>
{%
else
%}
There is no types in this website.
{%
trans
%}
There is no types in this website.
{%
endtrans
%}
{%
endif
%}
{%
endblock
%}
accounting/templates/accounting/bank_account_details.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<p>
<a
href=
"
{{
url
(
'accounting:bank_list'
)
}}
"
>
Accounting
</a>
>
{{
object.name
}}
</p>
<h2>
View account
</h2>
<ul>
{%
for
k
,
v
in
object.__dict__.items
()
%}
<li>
{{
k
}}
-
{{
v
}}
</li>
{%
endfor
%}
</ul>
<p><a
href=
"
{{
url
(
'accounting:club_new'
)
}}
?parent=
{{
object.id
}}
"
>
New club account
</a></p>
<p>
<a
href=
"
{{
url
(
'accounting:bank_list'
)
}}
"
>
{%
trans
%}
Accounting
{%
endtrans
%}
</a>
>
{{
object.name
}}
</p>
<h2>
{%
trans
%}
View account
{%
endtrans
%}
</h2>
<p><a
href=
"
{{
url
(
'accounting:club_new'
)
}}
?parent=
{{
object.id
}}
"
>
{%
trans
%}
New club account
{%
endtrans
%}
</a></p>
<ul>
{%
for
c
in
object.club_accounts.all
()
%}
<li><a
href=
"
{{
url
(
'accounting:club_details'
,
c_account_id
=
c.id
)
}}
"
>
{{
c
}}
</a>
-
<a
href=
"
{{
url
(
'accounting:club_edit'
,
c_account_id
=
c.id
)
}}
"
>
Edit
</a>
-
<a
href=
"
{{
url
(
'accounting:club_delete'
,
c_account_id
=
c.id
)
}}
"
>
Delete
</a></li>
<a
href=
"
{{
url
(
'accounting:club_edit'
,
c_account_id
=
c.id
)
}}
"
>
{%
trans
%}
Edit
{%
endtrans
%}
</a>
-
<a
href=
"
{{
url
(
'accounting:club_delete'
,
c_account_id
=
c.id
)
}}
"
>
{%
trans
%}
Delete
{%
endtrans
%}
</a></li>
{%
endfor
%}
</ul>
...
...
accounting/templates/accounting/bank_account_list.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
title
%}
Bank account list
{%
trans
%}
Bank account list
{%
endtrans
%}
{%
endblock
%}
{%
block
content
%}
<p><a
href=
"
{{
url
(
'accounting:type_list'
)
}}
"
>
Manage accounting types
</a></p>
<p><a
href=
"
{{
url
(
'accounting:bank_new'
)
}}
"
>
New bank account
</a></p>
<p><a
href=
"
{{
url
(
'accounting:type_list'
)
}}
"
>
{%
trans
%}
Manage accounting types
{%
endtrans
%}
</a></p>
<p><a
href=
"
{{
url
(
'accounting:bank_new'
)
}}
"
>
{%
trans
%}
New bank account
{%
endtrans
%}
</a></p>
{%
if
bankaccount_list
%}
<h3>
Bank account list
</h3>
<h3>
{%
trans
%}
Bank account list
{%
endtrans
%}
</h3>
<ul>
{%
for
a
in
bankaccount_list
%}
<li><a
href=
"
{{
url
(
'accounting:bank_details'
,
b_account_id
=
a.id
)
}}
"
>
{{
a
}}
</a>
-
<a
href=
"
{{
url
(
'accounting:bank_edit'
,
b_account_id
=
a.id
)
}}
"
>
Edit
</a>
-
<a
href=
"
{{
url
(
'accounting:bank_delete'
,
b_account_id
=
a.id
)
}}
"
>
Delete
</a></li>
<a
href=
"
{{
url
(
'accounting:bank_edit'
,
b_account_id
=
a.id
)
}}
"
>
{%
trans
%}
Edit
{%
endtrans
%}
</a>
-
<a
href=
"
{{
url
(
'accounting:bank_delete'
,
b_account_id
=
a.id
)
}}
"
>
{%
trans
%}
Delete
{%
endtrans
%}
</a></li>
{%
endfor
%}
</ul>
{%
else
%}
There is no accounts in this website.
{%
trans
%}
There is no accounts in this website.
{%
endtrans
%}
{%
endif
%}
{%
endblock
%}
...
...
accounting/templates/accounting/club_account_details.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<p>
<a
href=
"
{{
url
(
'accounting:bank_list'
)
}}
"
>
Accounting
</a>
>
<a
href=
"
{{
url
(
'accounting:bank_details'
,
b_account_id
=
object.bank_account.id
)
}}
"
>
{{
object.bank_account
}}
</a>
>
{{
object
}}
<h2>
View account:
{{
object.name
}}
</h2>
<p>
<a
href=
"
{{
url
(
'accounting:bank_list'
)
}}
"
>
{%
trans
%}
Accounting
{%
endtrans
%}
</a>
>
<a
href=
"
{{
url
(
'accounting:bank_details'
,
b_account_id
=
object.bank_account.id
)
}}
"
>
{{
object.bank_account
}}
</a>
>
{{
object
}}
<h2>
{%
trans
%}
View account:
{%
endtrans
%}
{{
object.name
}}
</h2>
<ul>
{%
for
k
,
v
in
object.__dict__.items
()
%}
{%
for
k
,
v
in
object.__dict__.items
()
%}
<li>
{{
k
}}
-
{{
v
}}
</li>
{%
endfor
%}
{%
endfor
%}
</ul>
{%
if
not
object.has_open_journal
()
%}
<p><a
href=
"
{{
url
(
'accounting:journal_new'
)
}}
?parent=
{{
object.id
}}
"
>
New journal
</a></p>
<p><a
href=
"
{{
url
(
'accounting:journal_new'
)
}}
?parent=
{{
object.id
}}
"
>
{%
trans
%}
New journal
{%
endtrans
%}
</a></p>
{%
else
%}
<p>
You can not create new journal while you still have one opened
</p>
<p>
{%
trans
%}
You can not create new journal while you still have one opened
{%
endtrans
%}
</p>
{%
endif
%}
<table>
<tr>
<td>
Name
</td>
<td>
Start
</td>
<td>
End
</td>
<td>
Amount
</td>
<td>
Effective amount
</td>
<td>
Closed
</td>
<td>
{%
trans
%}
Name
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Start
{%
endtrans
%}
</td>
<td>
{%
trans
%}
End
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Amount
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Effective amount
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Closed
{%
endtrans
%}
</td>
</tr>
{%
for
j
in
object.journals.all
()
%}
<tr>
<td>
{{
j.name
}}
</td>
<td>
{{
j.start_date
}}
</td>
{%
if
j.end_date
%}
{%
for
j
in
object.journals.all
()
%}
<tr>
<td>
{{
j.name
}}
</td>
<td>
{{
j.start_date
}}
</td>
{%
if
j.end_date
%}
<td>
{{
j.end_date
}}
</td>
{%
else
%}
{%
else
%}
<td>
-
</td>
{%
endif
%}
<td>
{{
j.amount
}}
€
</td>
<td>
{{
j.effective_amount
}}
€
</td>
{%
if
j.closed
%}
<td>
Yes
</td>
{%
else
%}
<td>
No
</td>
{%
endif
%}
<td>
<a
href=
"
{{
url
(
'accounting:journal_details'
,
j_id
=
j.id
)
}}
"
>
View
</a>
<a
href=
"
{{
url
(
'accounting:journal_edit'
,
j_id
=
j.id
)
}}
"
>
Edit
</a>
</td>
</tr>
{%
endfor
%}
{%
endif
%}
<td>
{{
j.amount
}}
€
</td>
<td>
{{
j.effective_amount
}}
€
</td>
{%
if
j.closed
%}
<td>
{%
trans
%}
Yes
{%
endtrans
%}
</td>
{%
else
%}
<td>
{%
trans
%}
No
{%
endtrans
%}
</td>
{%
endif
%}
<td>
<a
href=
"
{{
url
(
'accounting:journal_details'
,
j_id
=
j.id
)
}}
"
>
{%
trans
%}
View
{%
endtrans
%}
</a>
<a
href=
"
{{
url
(
'accounting:journal_edit'
,
j_id
=
j.id
)
}}
"
>
{%
trans
%}
Edit
{%
endtrans
%}
</a>
</td>
</tr>
{%
endfor
%}
</table>
{%
endblock
%}
accounting/templates/accounting/journal_details.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<p>
<a
href=
"
{{
url
(
'accounting:bank_list'
)
}}
"
>
Accounting
</a>
>
<a
href=
"
{{
url
(
'accounting:bank_details'
,
b_account_id
=
object.club_account.bank_account.id
)
}}
"
>
{{
object.club_account.bank_account
}}
</a>
>
<a
href=
"
{{
url
(
'accounting:club_details'
,
c_account_id
=
object.club_account.id
)
}}
"
>
{{
object.club_account
}}
</a>
>
{{
object.name
}}
</p>
<p><strong>
Amount:
</strong>
{{
object.amount
}}
€ -
<strong>
Effective amount:
</strong>
{{
object.effective_amount
}}
€
</p>
<p>
<a
href=
"
{{
url
(
'accounting:bank_list'
)
}}
"
>
{%
trans
%}
Accounting
{%
endtrans
%}
</a>
>
<a
href=
"
{{
url
(
'accounting:bank_details'
,
b_account_id
=
object.club_account.bank_account.id
)
}}
"
>
{{
object.club_account.bank_account
}}
</a>
>
<a
href=
"
{{
url
(
'accounting:club_details'
,
c_account_id
=
object.club_account.id
)
}}
"
>
{{
object.club_account
}}
</a>
>
{{
object.name
}}
</p>
<p><strong>
{%
trans
%}
Amount:
{%
endtrans
%}
</strong>
{{
object.amount
}}
€ -
<strong>
{%
trans
%}
Effective amount:
{%
endtrans
%}
</strong>
{{
object.effective_amount
}}
€
</p>
{%
if
object.closed
%}
<p>
Journal is closed, you can not create operation
</p>
<p>
{%
trans
%}
Journal is closed, you can not create operation
{%
endtrans
%}
</p>
{%
else
%}
<p><a
href=
"
{{
url
(
'accounting:op_new'
)
}}
?parent=
{{
object.id
}}
"
>
New operation
</a></p>
<p><a
href=
"
{{
url
(
'accounting:op_new'
)
}}
?parent=
{{
object.id
}}
"
>
{%
trans
%}
New operation
{%
endtrans
%}
</a></p>
{%
endif
%}
<table>
<tr>
<td>
Nb
</td>
<td>
Date
</td>
<td>
Label
</td>
<td>
Amount
</td>
<td>
Payment mode
</td>
<td>
{%
trans
%}
Nb
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Date
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Label
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Amount
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Payment mode
{%
endtrans
%}
</td>
<!-- TODO: <td>Target</td> -->
<td>
Code
</td>
<td>
Nature
</td>
<td>
Done
</td>
<td>
Comment
</td>
<td>
Actions
</td>
<td>
{%
trans
%}
Code
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Nature
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Done
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Comment
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Actions
{%
endtrans
%}
</td>
</tr>
{%
for
o
in
object.operations.all
()
%}
{%
for
o
in
object.operations.all
()
%}
<tr>
<td>
{{
o.id
}}
</td>
<td>
{{
o.date
}}
</td>
...
...
@@ -37,21 +38,17 @@
<td>
{{
o.accounting_type.code
}}
</td>
<td>
{{
o.accounting_type.label
}}
</td>
{%
if
o.done
%}
<td>
Yes
</td>
<td>
{%
trans
%}
Yes
{%
endtrans
%}
</td>
{%
else
%}
<td>
No
</td>
<td>
{%
trans
%}
No
{%
endtrans
%}
</td>
{%
endif
%}
<td>
{{
o.remark
}}
</td>
<td>
{%
if
not
o.journal.closed
%}
<a
href=
"
{{
url
(
'accounting:op_edit'
,
op_id
=
o.id
)
}}
"
>
Edit
</a>
<a
href=
"
{{
url
(
'accounting:op_edit'
,
op_id
=
o.id
)
}}
"
>
{%
trans
%}
Edit
{%
endtrans
%}
</a>
{%
endif
%}
</td>
</tr>
{%
endfor
%}
{%
endfor
%}
</table>
{%
endblock
%}
club/migrations/0003_auto_20160718_1819.py
0 → 100644
View file @
97ff4341
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
from
django.conf
import
settings
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'club'
,
'0002_auto_20160718_1456'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'membership'
,
name
=
'club'
,
field
=
models
.
ForeignKey
(
to
=
'club.Club'
,
verbose_name
=
'club'
,
related_name
=
'members'
),
),
migrations
.
AlterField
(
model_name
=
'membership'
,
name
=
'user'
,
field
=
models
.
ForeignKey
(
to
=
settings
.
AUTH_USER_MODEL
,
verbose_name
=
'user'
,
related_name
=
'membership'
),
),
]
club/models.py
View file @
97ff4341
...
...
@@ -74,7 +74,7 @@ class Club(models.Model):
Method to see if that object can be edited by the given user
"""
ms
=
self
.
get_membership_for
(
user
)
if
ms
is
not
None
and
ms
.
role
>=
7
:
if
ms
is
not
None
:
return
True
return
False
...
...
@@ -104,8 +104,8 @@ class Membership(models.Model):
A User is currently member of all the Clubs where its Membership has an end_date set to null/None.
Otherwise, it's a past membership kept because it can be very useful to see who was in which Club in the past.
"""
user
=
models
.
ForeignKey
(
User
,
related_name
=
"membership"
,
null
=
False
,
blank
=
False
)
club
=
models
.
ForeignKey
(
Club
,
related_name
=
"members"
,
null
=
False
,
blank
=
False
)
user
=
models
.
ForeignKey
(
User
,
verbose_name
=
_
(
'user'
),
related_name
=
"membership"
,
null
=
False
,
blank
=
False
)
club
=
models
.
ForeignKey
(
Club
,
verbose_name
=
_
(
'club'
),
related_name
=
"members"
,
null
=
False
,
blank
=
False
)
start_date
=
models
.
DateField
(
_
(
'start date'
),
auto_now
=
True
)
end_date
=
models
.
DateField
(
_
(
'end date'
),
null
=
True
,
blank
=
True
)
role
=
models
.
IntegerField
(
_
(
'role'
),
choices
=
sorted
(
settings
.
SITH_CLUB_ROLES
.
items
()),
...
...
club/templates/club/club_detail.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<h3>
Club
</h3>
<p><a
href=
"
{{
url
(
'club:club_list'
)
}}
"
>
Back to list
</a></p>
<h3>
{%
trans
%}
Club
{%
endtrans
%}
</h3>
<p><a
href=
"
{{
url
(
'club:club_list'
)
}}
"
>
{%
trans
%}
Back to list
{%
endtrans
%}
</a></p>
{%
if
can_edit
(
club
,
user
)
%}
<p><a
href=
"
{{
url
(
'club:club_edit'
,
club_id
=
club.pk
)
}}
"
>
Edit
</a></p>
<p><a
href=
"
{{
url
(
'club:club_edit'
,
club_id
=
club.pk
)
}}
"
>
{%
trans
%}
Edit
{%
endtrans
%}
</a></p>
{%
endif
%}
{%
if
can_edit_prop
(
club
,
user
)
%}
<p><a
href=
"
{{
url
(
'club:club_prop'
,
club_id
=
club.pk
)
}}
"
>
Prop
</a>
</p>
<p><a
href=
"
{{
url
(
'club:club_prop'
,
club_id
=
club.pk
)
}}
"
>
{%
trans
%}
Prop
{%
endtrans
%}
</a>
</p>
{%
endif
%}
{%
if
can_view
(
club
,
user
)
%}
<p><a
href=
"
{{
url
(
'club:club_members'
,
club_id
=
club.pk
)
}}
"
>
Members
</a></p>
<p><a
href=
"
{{
url
(
'club:club_members'
,
club_id
=
club.pk
)
}}
"
>
{%
trans
%}
Members
{%
endtrans
%}
</a></p>
{%
endif
%}
<h3>
{{
club.name
}}
</h3>
<p>
{{
club.address
}}
</p>
...
...
club/templates/club/club_edit.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<h2>
Edit club
</h2>
<h2>
{%
trans
%}
Edit club
{%
endtrans
%}
</h2>
<form
action=
"
{{
url
(
'club:club_edit'
,
club_id
=
club.id
)
}}
"
method=
"post"
>
{%
csrf_token
%}
{{
form.as_p
()
}}
<p><input
type=
"submit"
value=
"
Save!
"
/></p>
<p><input
type=
"submit"
value=
"
{%
trans
%}
Save
{%
endtrans
%}
"
/></p>
</form>
{%
endblock
%}
...
...
club/templates/club/club_edit_prop.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<h2>
Edit club properties
</h2>
<h2>
{%
trans
%}
Edit club properties
{%
endtrans
%}
</h2>
<form
action=
""
method=
"post"
>
{%
csrf_token
%}
{{
form.as_p
()
}}
<p><input
type=
"submit"
value=
"
Save!
"
/></p>
<p><input
type=
"submit"
value=
"
{%
trans
%}
Save
{%
endtrans
%}
"
/></p>
</form>
{%
endblock
%}
...
...
club/templates/club/club_list.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
title
%}
Club list
{%
trans
%}
Club list
{%
endtrans
%}
{%
endblock
%}
{%
macro
display_club
(
club
)
-
%}
...
...
@@ -18,17 +18,17 @@
{%
block
content
%}
{%
if
user.is_superuser
or
user.is_in_group
(
settings.SITH_GROUPS
[
'root'
][
'name'
])
%}
<p><a
href=
"
{{
url
(
'club:club_new'
)
}}
"
>
New club
</a></p>
<p><a
href=
"
{{
url
(
'club:club_new'
)
}}
"
>
{%
trans
%}
New club
{%
endtrans
%}
</a></p>
{%
endif
%}
{%
if
club_list
%}
<h3>
Club list
</h3>
<ul>
{%
-
for
c
in
club_list
if
c.parent
is
none
%}
{{
display_club
(
c
)
}}
{%
-
endfor
%}
</ul>
<h3>
{%
trans
%}
Club list
{%
endtrans
%}
</h3>
<ul>
{%
-
for
c
in
club_list
if
c.parent
is
none
%}
{{
display_club
(
c
)
}}
{%
-
endfor
%}
</ul>
{%
else
%}
There is no club in this website.
{%
trans
%}
There is no club in this website.
{%
endtrans
%}
{%
endif
%}
{%
endblock
%}
...
...
club/templates/club/club_members.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<h2>
Club members
</h2>
<h2>
{%
trans
%}
Club members
{%
endtrans
%}
</h2>
<ul>
{%
for
m
in
club.members.all
()
%}
<li>
{{
m
}}
</li>
...
...
@@ -10,7 +10,7 @@
<form
action=
"
{{
url
(
'club:club_members'
,
club_id
=
club.id
)
}}
"
method=
"post"
>
{%
csrf_token
%}
{{
form.as_p
()
}}
<p><input
type=
"submit"
value=
"
Add
"
/></p>
<p><input
type=
"submit"
value=
"
{%
trans
%}
Add
{%
endtrans
%}
"
/></p>
</form>
{%
endblock
%}
...
...
club/templates/club/club_tools.jinja
View file @
97ff4341
{%
extends
"core/base.jinja"
%}
{%
block
content
%}
<h3>
Club tools
</h3>
<p><a
href=
"
{{
url
(
'club:club_view'
,
club_id
=
object.id
)
}}
"
>
Back to club
</a></p>
<ul>
{%
if
object.counters.all
()
|
count
>
0
%}
<li>
Counters:
<ul>
{%
for
c
in
object.counters.all
()
%}
<li>
{{
c
}}
:
<a
href=
"
{{
url
(
'counter:details'
,
counter_id
=
c.id
)
}}
"
>
View
</a>
<a
href=
"
{{
url
(
'counter:admin'
,
counter_id
=
c.id
)
}}
"
>
Edit
</a>
</li>
{%
endfor
%}
</ul>
<h3>
{%
trans
%}
Club tools
{%
endtrans
%}
</h3>
<p><a
href=
"
{{
url
(
'club:club_view'
,
club_id
=
object.id
)
}}
"
>
Back to club
</a></p>
<ul>
{%
if
object.counters.all
()
|
count
>
0
%}
<li><h4>
{%
trans
%}
Counters:
{%
endtrans
%}
</h4>
<ul>
{%
for
c
in
object.counters.all
()
%}
<li>
{{
c
}}
:
<a
href=
"
{{
url
(
'counter:details'
,
counter_id
=
c.id
)
}}
"
>
View
</a>
<a
href=
"
{{
url
(
'counter:admin'
,
counter_id
=
c.id
)
}}
"
>
Edit
</a>
</li>
{%
endif
%}
{%
if
object.club_account
%}
<li>
Accouting:
<a
href=
"
{{
url
(
'accounting:club_details'
,
c_account_id
=
object.club_account.id
)
}}
"
>
{{
object
}}
</a></li>
{%
endif
%}
</ul>
{%
endfor
%}
</ul>
</li>
{%
endif
%}
{%
if
object.club_account
%}
<li>
Accouting:
<a
href=
"
{{
url
(
'accounting:club_details'
,
c_account_id
=
object.club_account.id
)
}}
"
>
{{
object
}}
</a></li>
{%
endif
%}
</ul>
{%
endblock
%}
...
...
club/views.py
View file @
97ff4341
...
...
@@ -25,7 +25,7 @@ class ClubView(CanViewMixin, DetailView):
pk_url_kwarg
=
"club_id"
template_name
=
'club/club_detail.jinja'
class
ClubToolsView
(
Can
View
Mixin
,
DetailView
):
class
ClubToolsView
(
Can
Edit
Mixin
,
DetailView
):
"""
Tools page of a Club
"""
...
...
core/templates/core/403.jinja
View file @
97ff4341
...
...
@@ -2,7 +2,7 @@
{%
block
content
%}
<h3>
403, Forbidden
</h3>
<h3>
{%
trans
%}
403, Forbidden
{%
endtrans
%}
</h3>
{%
endblock
%}
core/templates/core/404.jinja
View file @
97ff4341
...
...
@@ -2,7 +2,7 @@
{%
block
content
%}
<h3>
404, Not Found
</h3>
<h3>
{%
trans
%}
404, Not Found
{%
endtrans
%}
</h3>
{%
endblock
%}
...
...
core/templates/core/base.jinja
View file @
97ff4341
<!DOCTYPE html>
<html
lang=
"fr"
>
<head>
{%
block
head
%}
<title>
{%
block
title
%}
Bienvenue sur le Sith de l'AE!
{%
endblock
%}
</title>
<link
rel=
"stylesheet"
href=
"
{{
static
(
'core/base.css'
)
}}
"
>
<link
rel=
"stylesheet"
href=
"
{{
static
(
'core/form.css'
)
}}
"
>
<link
rel=
"stylesheet"
href=
"
{{
static
(
'core/style.css'
)
}}
"
>
<script
src=
"
{{
static
(
'core/script.js'
)
}}
"
></script>
<script
src=
"http://code.jquery.com/jquery-2.2.0.min.js"
></script>
{%
endblock
%}
</head>
<head>
{%
block
head
%}
<title>
{%
block
title
%}{%
trans
%}
Welcome!
{%
endtrans
%}{%
endblock
%}
</title>
<link
rel=
"stylesheet"
href=
"
{{
static
(
'core/base.css'
)
}}
"
>
<link
rel=
"stylesheet"
href=
"
{{
static
(
'core/form.css'
)
}}
"
>
<link
rel=
"stylesheet"
href=
"
{{
static
(
'core/style.css'
)
}}
"
>
<script
src=
"
{{
static
(
'core/script.js'
)
}}
"
></script>
{%
endblock
%}
</head>
<body>
<div
id=
"logo"
><a
href=
"
{{
url
(
'core:index'
)
}}
"
><img
src=
"
{{
static
(
'core/img/logo.png'
)
}}
"
alt=
"Logo"
/></a></div>
{%
block
header
%}
<header>
{%
if
not
user.is_authenticated
()
%}
<a
href=
"
{{
url
(
'core:login'
)
}}
"
>
Login
</a>
|
<a
href=
"
{{
url
(
'core:register'
)
}}
"
>
Register
</a>
{%
else
%}
<body>
<div
id=
"logo"
><a
href=
"
{{
url
(
'core:index'
)
}}
"
><img
src=
"
{{
static
(
'core/img/logo.png'
)
}}
"
alt=
"
{%
trans
%}
Logo
{%
endtrans
%}
"
/></a></div>
{%
block
header
%}
<header>
{%
if
not
user.is_authenticated
()
%}
<a
href=
"
{{
url
(
'core:login'
)
}}
"
>
{%
trans
%}
Login
{%
endtrans
%}
</a>
|
<a
href=
"
{{
url
(
'core:register'
)
}}
"
>
{%
trans
%}
Register
{%
endtrans
%}
</a>
{%
else
%}
<a
href=
"
{{
url
(
'core:user_profile'
,
user_id
=
user.id
)
}}
"
>
{{
user.get_display_name
()
}}
</a>
|
<a
href=
"
{{
url
(
'core:user_tools'
)
}}
"
>
Tools
</a>
|
<a
href=
"
{{
url
(
'core:logout'
)
}}
"
>
Logout
</a>
{%
endif
%}
</header>
{%
endblock
%}
<nav>
<a
href=
"
{{
url
(
'core:user_list'
)
}}
"
>
Users
</a>
<a
href=
"
{{
url
(
'core:page'
,
page_name
=
"Index"
)
}}
"
>
Pages
</a>
<a
href=
"
{{
url
(
'club:club_list'
)
}}
"
>
Clubs
</a>
</nav>
<a
href=
"
{{
url
(
'core:user_tools'
)
}}
"
>
{%
trans
%}
Tools
{%
endtrans
%}
</a>
|
<a
href=
"
{{
url
(
'core:logout'
)
}}
"
>
{%
trans
%}
Logout
{%
endtrans
%}
</a>
{%
endif
%}
</header>
{%
endblock
%}