[FIX] website: remove ribbon on unpublished pages (new specs)
This commit reverts part of f5912cb since the spec changed afterwards.
Unpublished page will have a red toggle, which even if it is small should be
enough to draw user attention, and not a ribbon anymore.
Task-44005
This commit is contained in:
@@ -232,7 +232,6 @@ var WebsiteRoot = BodyManager.extend({
|
||||
})
|
||||
.done(function (result) {
|
||||
$data.toggleClass("css_unpublished css_published");
|
||||
$(".ribbon-publish.ribbon-wrapper").toggleClass("css_unpublished css_published");
|
||||
$data.find('input').prop("checked", result);
|
||||
$data.parents("[data-publish]").attr("data-publish", +result ? 'on' : 'off');
|
||||
})
|
||||
|
||||
@@ -482,36 +482,3 @@ body .modal {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Unpublished page's ribbon
|
||||
.ribbon-publish.ribbon-wrapper {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
&.css_published {
|
||||
display:none;
|
||||
}
|
||||
&.css_unpublished {
|
||||
display:block;
|
||||
}
|
||||
}
|
||||
.ribbon-publish .ribbon {
|
||||
font: bold 15px Sans-Serif;
|
||||
color: white;
|
||||
text-align: center;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
position: relative;
|
||||
padding: 7px 65px;
|
||||
right: 27px;
|
||||
top: 44px;
|
||||
width: 300px;
|
||||
cursor: default;
|
||||
white-space: unset;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
|
||||
@@ -5,11 +5,6 @@
|
||||
<xpath expr="//t[@t-set='html_data']" position="after">
|
||||
<t t-set="body_classname" t-value="'o_connected_user' if env['ir.ui.view'].user_has_groups('base.group_user') else None"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='wrapwrap']//header" position="after">
|
||||
<div t-if="'website_published' in main_object.fields_get()" t-attf-class="ribbon-publish ribbon-wrapper #{main_object.website_published and 'css_published' or 'css_unpublished'}">
|
||||
<div class="ribbon btn btn-danger">Unpublished</div>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='wrapwrap']" position="before">
|
||||
<nav groups="base.group_user" t-if="website and menu_data" id="oe_main_menu_navbar" class="o_main_navbar">
|
||||
<ul id="oe_applications">
|
||||
|
||||
Reference in New Issue
Block a user