Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
0af19c9f
Commit
0af19c9f
authored
Feb 10, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1613 Allow settings to select whether FAQ is shown or not in Members_space
parent
a13e7d36
Pipeline
#1782
passed with stage
in 1 minute 40 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
views.py
members_space/views.py
+7
-4
config.md
outils/config.md
+4
-0
header.html
templates/members_space/header.html
+2
-1
No files found.
members_space/views.py
View file @
0af19c9f
...
...
@@ -111,6 +111,7 @@ def index(request, exception=None):
partnerData
[
'can_have_delay'
]
=
cs
.
member_can_have_delay
(
int
(
partner_id
))
m
=
CagetteMembersSpace
()
context
[
'show_faq'
]
=
getattr
(
settings
,
'MEMBERS_SPACE_FAQ_TEMPLATE'
,
'members_space/faq.html'
)
partnerData
[
"comite"
]
=
m
.
is_comite
(
partner_id
)
context
[
'partnerData'
]
=
partnerData
...
...
@@ -197,14 +198,16 @@ def shifts_exchange(request):
return
HttpResponse
(
template
.
render
(
context
,
request
))
def
faqBDM
(
request
):
template
=
loader
.
get_template
(
'members_space/faq.html'
)
template_path
=
getattr
(
settings
,
'MEMBERS_SPACE_FAQ_TEMPLATE'
,
'members_space/faq.html'
)
content
=
''
if
template_path
:
template
=
loader
.
get_template
(
template_path
)
context
=
{
'title'
:
'foire aux questions'
,
}
content
=
template
.
render
(
context
,
request
)
msettings
=
MConfig
.
get_settings
(
'members'
)
return
HttpResponse
(
template
.
render
(
context
,
request
))
return
HttpResponse
(
content
)
def
no_content
(
request
):
""" Endpoint the front-end will call to load the "No content" page. """
...
...
outils/config.md
View file @
0af19c9f
...
...
@@ -311,6 +311,10 @@
Message shown to people when they connect to the Member Space
-
MEMBERS_SPACE_FAQ_TEMPLATE = None
If set to None, "FAQ menu" will not be shown. To use a custom content add a template and set it's relative path
### Reception
-
RECEPTION_ADD_ADMIN_MODE = True
...
...
templates/members_space/header.html
View file @
0af19c9f
...
...
@@ -10,8 +10,9 @@
<a
href=
"javascript:void(0);"
class=
"nav_item"
id=
"nav_my_info"
>
Mes Infos
</a>
<a
href=
"javascript:void(0);"
class=
"nav_item"
id=
"nav_my_shifts"
>
Mes Services
</a>
<a
href=
"javascript:void(0);"
class=
"nav_item"
id=
"nav_shifts_exchange"
>
Échange de services
</a>
{% if show_faq %}
<a
href=
"javascript:void(0);"
class=
"nav_item"
id=
"nav_faq"
>
Problèmes et Demandes
</a>
{% endif %}
<a
href=
"javascript:void(0);"
target=
"_blank"
...
...
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