Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
da3cb117
Commit
da3cb117
authored
5 years ago
by
sri-odoo
Committed by
qsm-odoo
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] website_mail: allow two different designs for the follow button
Part of
https://github.com/odoo/odoo/pull/35749
task-2024197
parent
2aa77b10
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/website_mail/static/src/css/website_mail.scss
+41
-0
41 additions, 0 deletions
addons/website_mail/static/src/css/website_mail.scss
addons/website_mail/views/website_mail_templates.xml
+13
-1
13 additions, 1 deletion
addons/website_mail/views/website_mail_templates.xml
with
54 additions
and
1 deletion
addons/website_mail/static/src/css/website_mail.scss
+
41
−
0
View file @
da3cb117
...
...
@@ -2,3 +2,44 @@
.js_follow
[
data-follow
=
'off'
]
.js_unfollow_btn
{
display
:
none
;
}
.js_follow_icons_container
{
.js_follow_btn
,
.js_unfollow_btn
{
animation
:
js_follow_fade
1s
ease
forwards
;
opacity
:
0
;
small
{
opacity
:
0
;
transition
:
opacity
0
.3s
ease
;
}
@include
hover-focus
()
{
small
{
transition-duration
:
1s
;
opacity
:
1
;
}
};
}
.fa
:before
{
content
:
"\f0f3"
;
color
:
$text-muted
;
}
.js_follow_btn
:hover
.fa
:before
{
color
:
$body-color
;
}
.js_unfollow_btn
.fa
:before
{
color
:
theme-color
(
'primary'
);
}
.js_unfollow_btn
:hover
.fa
:before
{
content
:
"\f1f6"
;
color
:
theme-color
(
'danger'
);
}
}
@keyframes
js_follow_fade
{
to
{
opacity
:
1
;
}
}
This diff is collapsed.
Click to expand it.
addons/website_mail/views/website_mail_templates.xml
+
13
−
1
View file @
da3cb117
...
...
@@ -10,7 +10,19 @@
class=
"js_follow_email form-control"
placeholder=
"your email..."
groups=
"base.group_public"
/>
<div
t-att-class=
"(request.env.user.has_group('base.group_public') and 'input-group-append ' or '') + (div_class or '')"
>
<div
t-if=
"icons_design and not request.env.user.has_group('base.group_public')"
class=
"js_follow_icons_container"
>
<button
class=
"btn text-reset js_unfollow_btn"
>
<div
class=
"d-flex align-items-center"
>
<small>
Unfollow
</small><i
class=
"fa fa-fw ml-1"
/>
</div>
</button>
<button
class=
"btn text-reset js_follow_btn"
>
<div
class=
"d-flex align-items-center"
>
<small>
Follow
</small><i
class=
"fa fa-fw ml-1"
/>
</div>
</button>
</div>
<div
t-else=
""
t-attf-class=
"#{request.env.user.has_group('base.group_public') and 'input-group-append'} #{div_class}"
>
<button
href=
"#"
t-attf-class=
"btn btn-secondary js_unfollow_btn"
>
Unsubscribe
</button>
<button
href=
"#"
t-attf-class=
"btn btn-primary js_follow_btn"
>
Subscribe
</button>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment