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
7be71958
Commit
7be71958
authored
Sep 29, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access to ABCD calendar
parent
601455ba
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
6 deletions
+30
-6
.gitignore
.gitignore
+2
-0
admin.py
members/admin.py
+6
-1
members-space-header.js
members_space/static/js/members-space-header.js
+7
-1
members-space-shifts-exchange.js
members_space/static/js/members-space-shifts-exchange.js
+1
-1
views.py
members_space/views.py
+4
-1
header.html
templates/members_space/header.html
+9
-2
index.html
templates/members_space/index.html
+1
-0
No files found.
.gitignore
View file @
7be71958
...
...
@@ -17,3 +17,4 @@ db.sqlite3
shop/shop_admin_settings.json
shop/errors.log
.idea
members/settings.json
\ No newline at end of file
members/admin.py
View file @
7be71958
...
...
@@ -19,7 +19,12 @@ default_msettings = {'msg_accueil': {'title': 'Message borne accueil',
'title'
:
'Horaires ouverture magasin'
,
'type'
:
'textarea'
,
'value'
:
''
}
},
'abcd_calendar_link'
:
{
'title'
:
'Lien vers le calendrier ABCD'
,
'type'
:
'text'
,
'value'
:
''
}
}
def
config
(
request
):
...
...
members_space/static/js/members-space-header.js
View file @
7be71958
...
...
@@ -18,7 +18,9 @@ $(document).ready(function() {
if
(
current_location
!==
"home"
)
{
goto
(
'home'
);
}
toggleHeader
();
if
(
document
.
getElementById
(
"topnav"
).
className
!==
"topnav"
)
{
toggleHeader
();
}
});
$
(
'#nav_my_info'
).
on
(
'click'
,
(
e
)
=>
{
e
.
preventDefault
();
...
...
@@ -41,4 +43,8 @@ $(document).ready(function() {
}
toggleHeader
();
});
$
(
'#nav_calendar'
).
prop
(
"href"
,
abcd_calendar_link
);
$
(
'#nav_calendar'
).
on
(
'click'
,
()
=>
{
toggleHeader
();
});
});
members_space/static/js/members-space-shifts-exchange.js
View file @
7be71958
...
...
@@ -213,7 +213,7 @@ function init_calendar_page() {
default_initial_view
=
'listWeek'
;
header_toolbar
=
{
left
:
'title'
,
center
:
'
dayGridMonth,listWeek,timeGridDay
'
,
center
:
''
,
right
:
'prev,next today'
};
}
else
{
...
...
members_space/views.py
View file @
7be71958
...
...
@@ -91,7 +91,6 @@ def index(request, exception=None):
context
[
'partnerData'
]
=
partnerData
# TODO test with partner who's not attached
if
partnerData
[
"parent_id"
]
is
not
False
:
partnerData
[
"parent_name"
]
=
partnerData
[
"parent_id"
][
1
]
partnerData
[
"parent_id"
]
=
partnerData
[
"parent_id"
][
0
]
...
...
@@ -104,6 +103,10 @@ def index(request, exception=None):
if
hasattr
(
settings
,
'SHIFT_EXCHANGE_DAYS_TO_HIDE'
):
days_to_hide
=
settings
.
SHIFT_EXCHANGE_DAYS_TO_HIDE
context
[
'daysToHide'
]
=
days_to_hide
msettings
=
MConfig
.
get_settings
(
'members'
)
if
'abcd_calendar_link'
in
msettings
:
context
[
'abcd_calendar_link'
]
=
msettings
[
'abcd_calendar_link'
][
'value'
]
else
:
# may arrive when switching database without cleaning cookie
...
...
templates/members_space/header.html
View file @
7be71958
...
...
@@ -10,9 +10,16 @@
<a
href=
"#"
class=
"nav_item"
id=
"nav_my_info"
>
Mes Infos
</a>
<a
href=
"#"
class=
"nav_item"
id=
"nav_my_shifts"
>
Mes Services
</a>
<a
href=
"#"
class=
"nav_item"
id=
"nav_shifts_exchange"
>
Échange de services
</a>
<a
href=
"#"
class=
"nav_item"
id=
"nav_calendar"
>
Calendrier ABCD
</a>
<a
href=
"javascript:void(0);"
target=
"_blank"
class=
"nav_item"
id=
"nav_calendar"
>
Calendrier ABCD
</a>
{# Disconnection button must have this id (logic in all_common.js) #}
<a
href=
"
#
"
id=
"deconnect"
>
Déconnexion
</a>
<a
href=
"
javascript:void(0);
"
id=
"deconnect"
>
Déconnexion
</a>
<a
href=
"javascript:void(0);"
class=
"icon"
onclick=
"toggleHeader()"
>
<i
class=
"fa fa-bars"
></i>
</a>
...
...
templates/members_space/index.html
View file @
7be71958
...
...
@@ -90,6 +90,7 @@
"parent_name"
:
"{{partnerData.parent_name}}"
,
}
var
days_to_hide
=
"{{daysToHide}}"
var
abcd_calendar_link
=
"{{abcd_calendar_link}}"
</script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
<script src="
{%
static
"
js
/
members-space-home
.
js
"
%}?
v=
"></script>
...
...
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