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
f66bf1cc
Commit
f66bf1cc
authored
Sep 30, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
links to forms & style refactoring
parent
260bd747
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
27 deletions
+77
-27
admin.py
members/admin.py
+10
-0
members-space.css
members_space/static/css/members-space.css
+40
-13
members-space-home.js
members_space/static/js/members-space-home.js
+1
-0
views.py
members_space/views.py
+5
-4
home.html
templates/members_space/home.html
+18
-8
index.html
templates/members_space/index.html
+3
-2
No files found.
members/admin.py
View file @
f66bf1cc
...
@@ -24,6 +24,16 @@ default_msettings = {'msg_accueil': {'title': 'Message borne accueil',
...
@@ -24,6 +24,16 @@ default_msettings = {'msg_accueil': {'title': 'Message borne accueil',
'title'
:
'Lien vers le calendrier ABCD'
,
'title'
:
'Lien vers le calendrier ABCD'
,
'type'
:
'text'
,
'type'
:
'text'
,
'value'
:
''
'value'
:
''
},
'forms_link'
:
{
'title'
:
'Lien vers la page des formulaires'
,
'type'
:
'text'
,
'value'
:
''
},
'unsuscribe_form_link'
:
{
'title'
:
'Lien vers le formulaire de ré-inscription'
,
'type'
:
'text'
,
'value'
:
''
}
}
}
}
...
...
members_space/static/css/members-space.css
View file @
f66bf1cc
...
@@ -19,10 +19,15 @@ body {
...
@@ -19,10 +19,15 @@ body {
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
border-radius
:
30px
;
border-radius
:
30px
;
min-height
:
350px
;
margin
:
1rem
1rem
;
margin
:
1rem
1rem
;
box-shadow
:
2px
2px
3px
rgba
(
10
,
10
,
10
,
.1
),
0
0
0
1px
rgba
(
10
,
10
,
10
,
.1
);
box-shadow
:
2px
2px
3px
rgba
(
10
,
10
,
10
,
.1
),
0
0
0
1px
rgba
(
10
,
10
,
10
,
.1
);
}
}
.high_tile
{
min-height
:
350px
;
}
.small_tile
{
min-height
:
250px
;
}
.full_width_tile
{
.full_width_tile
{
flex
:
1
0
90%
;
flex
:
1
0
90%
;
...
@@ -49,6 +54,7 @@ body {
...
@@ -49,6 +54,7 @@ body {
margin
:
3rem
0
;
margin
:
3rem
0
;
width
:
80%
;
width
:
80%
;
display
:
flex
;
display
:
flex
;
height
:
100%
;
}
}
#home_tile_services_exchange
.tile_content
{
#home_tile_services_exchange
.tile_content
{
...
@@ -120,7 +126,7 @@ body {
...
@@ -120,7 +126,7 @@ body {
}
}
}
}
.member_info
{
#home
.member_info
{
font-weight
:
bold
;
font-weight
:
bold
;
}
}
...
@@ -193,18 +199,31 @@ body {
...
@@ -193,18 +199,31 @@ body {
/* --Shifts exchange tile tile */
/* --Shifts exchange tile tile */
#go_to_shifts_calendar
_area
{
.home_link_button
_area
{
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
height
:
100%
;
}
}
#go_to_shifts_calendar
{
.home_link_button
{
width
:
80%
;
width
:
80%
;
margin
-top
:
20px
;
margin
:
30px
auto
auto
auto
;
white-space
:
normal
;
white-space
:
normal
;
}
}
/* -- I have a question tile */
#go_to_forms
{
text-decoration
:
none
;
}
#go_to_forms
:hover
{
color
:
white
;
}
#go_to_forms
.active
{
color
:
white
!important
;
}
/* -- Shop info tile */
/* -- Shop info tile */
#shop_info_content
{
#shop_info_content
{
display
:
flex
;
display
:
flex
;
...
@@ -212,7 +231,7 @@ body {
...
@@ -212,7 +231,7 @@ body {
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
width
:
80%
;
width
:
80%
;
height
:
100%
;
margin
:
auto
;
}
}
.shop_info_item
{
.shop_info_item
{
...
@@ -222,6 +241,7 @@ body {
...
@@ -222,6 +241,7 @@ body {
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
font-size
:
2rem
;
font-size
:
2rem
;
flex
:
1
0
50%
;
}
}
.shop_info_item
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
.shop_info_item
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
...
@@ -234,23 +254,27 @@ body {
...
@@ -234,23 +254,27 @@ body {
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.shop_message_content
{
text-align
:
center
;
}
@media
screen
and
(
min-width
:
769px
)
{
@media
screen
and
(
min-width
:
769px
)
{
.shop_info_item
{
.shop_info_item
{
height
:
90%
;
padding
:
0
4rem
;
padding
:
0
4rem
;
}
}
.shop_message
{
.shop_message
{
border-left
:
1px
solid
#e7e9ed
;
border-left
:
1px
solid
#e7e9ed
;
}
margin
:
3rem
0
;
.shop_message_content
{
text-align
:
center
;
}
}
}
}
@media
screen
and
(
max-width
:
768px
)
{
@media
screen
and
(
max-width
:
768px
)
{
#shop_info_content
{
flex-direction
:
column
;
}
.shop_info_item
{
.shop_info_item
{
width
:
9
0%
;
flex
:
1
0
5
0%
;
height
:
5
0%
;
width
:
10
0%
;
font-size
:
1.6rem
;
font-size
:
1.6rem
;
padding
:
1.5rem
0
;
padding
:
1.5rem
0
;
}
}
...
@@ -260,8 +284,10 @@ body {
...
@@ -260,8 +284,10 @@ body {
.opening_hours_title
{
.opening_hours_title
{
font-size
:
1.9rem
;
font-size
:
1.9rem
;
}
}
.shop_message
{
.shop_message
{
border-top
:
1px
solid
#e7e9ed
;
border-top
:
1px
solid
#e7e9ed
;
}
}
.shop_message_content
{
width
:
90%
;
}
}
}
\ No newline at end of file
members_space/static/js/members-space-home.js
View file @
f66bf1cc
...
@@ -95,6 +95,7 @@ function init_home() {
...
@@ -95,6 +95,7 @@ function init_home() {
e
.
preventDefault
();
e
.
preventDefault
();
goto
(
'mes-infos'
);
goto
(
'mes-infos'
);
});
});
$
(
"#go_to_forms"
).
prop
(
"href"
,
forms_link
);
// Init my info tile
// Init my info tile
init_my_info_data
();
init_my_info_data
();
...
...
members_space/views.py
View file @
f66bf1cc
...
@@ -28,8 +28,8 @@ def index(request, exception=None):
...
@@ -28,8 +28,8 @@ def index(request, exception=None):
context
=
{
context
=
{
'title'
:
'Espace Membre'
,
'title'
:
'Espace Membre'
,
'unsuscribe_form_link'
:
getattr
(
settings
,
'UNSUBSCRIBED_FORM_LINK'
,
''
),
}
}
template
=
loader
.
get_template
(
'members_space/index.html'
)
template
=
loader
.
get_template
(
'members_space/index.html'
)
if
(
'failure'
in
credentials
):
if
(
'failure'
in
credentials
):
...
@@ -105,9 +105,10 @@ def index(request, exception=None):
...
@@ -105,9 +105,10 @@ def index(request, exception=None):
context
[
'daysToHide'
]
=
days_to_hide
context
[
'daysToHide'
]
=
days_to_hide
msettings
=
MConfig
.
get_settings
(
'members'
)
msettings
=
MConfig
.
get_settings
(
'members'
)
if
'abcd_calendar_link'
in
msettings
:
context
[
'abcd_calendar_link'
]
=
msettings
[
'abcd_calendar_link'
][
'value'
]
if
'abcd_calendar_link'
in
msettings
else
''
context
[
'abcd_calendar_link'
]
=
msettings
[
'abcd_calendar_link'
][
'value'
]
context
[
'unsuscribe_form_link'
]
=
msettings
[
'unsuscribe_form_link'
][
'value'
]
if
'unsuscribe_form_link'
in
msettings
else
''
context
[
'forms_link'
]
=
msettings
[
'forms_link'
][
'value'
]
if
'forms_link'
in
msettings
else
''
else
:
else
:
# may arrive when switching database without cleaning cookie
# may arrive when switching database without cleaning cookie
return
redirect
(
'/website/deconnect'
)
return
redirect
(
'/website/deconnect'
)
...
...
templates/members_space/home.html
View file @
f66bf1cc
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<h1>
Mon espace membre
</h1>
<h1>
Mon espace membre
</h1>
</div>
</div>
<div
class=
"tiles_container"
>
<div
class=
"tiles_container"
>
<div
class=
"tile"
id=
"home_tile_my_info"
>
<div
class=
"tile
high_tile
"
id=
"home_tile_my_info"
>
<div
class=
"tile_title"
>
<div
class=
"tile_title"
>
<i
class=
"fas fa-user tile_icon"
></i>
<i
class=
"fas fa-user tile_icon"
></i>
Mes Infos
Mes Infos
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<a
href=
"#"
id=
"see_more_info_link"
>
Voir plus >
</a>
<a
href=
"#"
id=
"see_more_info_link"
>
Voir plus >
</a>
</div>
</div>
</div>
</div>
<div
class=
"tile"
id=
"home_tile_my_services"
>
<div
class=
"tile
high_tile
"
id=
"home_tile_my_services"
>
<div
class=
"tile_title"
>
<div
class=
"tile_title"
>
<i
class=
"fas fa-clipboard tile_icon"
></i>
<i
class=
"fas fa-clipboard tile_icon"
></i>
Mes Services
Mes Services
...
@@ -51,29 +51,39 @@
...
@@ -51,29 +51,39 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"tile"
id=
"home_tile_services_exchange"
>
<div
class=
"tile
small_tile
"
id=
"home_tile_services_exchange"
>
<div
class=
"tile_title"
>
<div
class=
"tile_title"
>
<i
class=
"fas fa-exchange-alt tile_icon"
></i>
<i
class=
"fas fa-exchange-alt tile_icon"
></i>
Échange de services
Échange de services
</div>
</div>
<div
class=
"tile_content"
>
<div
class=
"tile_content"
>
<div
id=
"go_to_shifts_calendar
_area"
>
<div
class=
"home_link_button
_area"
>
<button
type=
"button"
class=
"btn--primary"
id=
"go_to_shifts_calendar"
>
<button
type=
"button"
class=
"btn--primary
home_link_button
"
id=
"go_to_shifts_calendar"
>
Accéder au calendrier d'échange de services
Accéder au calendrier d'échange de services
</button>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"tile"
id=
"home_tile_help"
>
<div
class=
"tile
small_tile
"
id=
"home_tile_help"
>
<div
class=
"tile_title"
>
<div
class=
"tile_title"
>
<i
class=
"fas fa-question-circle tile_icon"
></i>
<i
class=
"fas fa-question-circle tile_icon"
></i>
J'ai une demande
J'ai une demande
</div>
</div>
<div
class=
"tile_content"
>
<div
class=
"tile_content"
>
À venir...
<div
class=
"home_link_button_area"
>
<a
href=
"javascript:void(0);"
target=
"_blank"
type=
"button"
class=
"btn--primary home_link_button"
id=
"go_to_forms"
>
Accéder aux formulaires
</a>
</div>
</div>
</div>
</div>
</div>
<div
class=
"tile"
id=
"home_tile_shop_info"
>
<div
class=
"tile
small_tile
"
id=
"home_tile_shop_info"
>
<div
class=
"tile_title"
>
<div
class=
"tile_title"
>
<i
class=
"fas fa-newspaper tile_icon"
></i>
<i
class=
"fas fa-newspaper tile_icon"
></i>
Informations magasins
Informations magasins
...
...
templates/members_space/index.html
View file @
f66bf1cc
...
@@ -68,7 +68,10 @@
...
@@ -68,7 +68,10 @@
<script>
<script>
var
app_env
=
'{{app_env}}'
;
var
app_env
=
'{{app_env}}'
;
var
forms_link
=
'{{forms_link}}'
;
var
unsuscribe_form_link
=
'{{unsuscribe_form_link}}'
;
var
unsuscribe_form_link
=
'{{unsuscribe_form_link}}'
;
var
abcd_calendar_link
=
"{{abcd_calendar_link}}"
var
days_to_hide
=
"{{daysToHide}}"
var
partner_data
=
{
var
partner_data
=
{
"partner_id"
:
"{{partnerData.id}}"
,
"partner_id"
:
"{{partnerData.id}}"
,
"name"
:
"{{partnerData.display_name}}"
,
"name"
:
"{{partnerData.display_name}}"
,
...
@@ -90,8 +93,6 @@
...
@@ -90,8 +93,6 @@
"parent_id"
:
"{{partnerData.parent_id}}"
,
"parent_id"
:
"{{partnerData.parent_id}}"
,
"parent_name"
:
"{{partnerData.parent_name}}"
,
"parent_name"
:
"{{partnerData.parent_name}}"
,
}
}
var
days_to_hide
=
"{{daysToHide}}"
var
abcd_calendar_link
=
"{{abcd_calendar_link}}"
</script>
</script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
<script src="
{%
static
"
js
/
members-space-home
.
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