[MERGE] web, various: improve ribbon widget and its use
PURPOSE Have a nice ribbon widget to display state of records: part II SPECIFICATIONS A POC for a new ribbon widget has been recently introduced at02fbb73. It adds a ribbon on the top right of a form to make some status more visible and more user friendly. This commit greatly improves the design of this ribbon in order to have a real ribbon. You have to specify the text attribute to show the text on the ribbon. You can also specify a bg_color attribute to color the background with a bootstrap background color class according to the business meaning of the flag displayed in the ribbon. CRM: Replace Won / Lost bootstrap badges by ribbon widgets in lead / opportunity form view. Various: Next to883c96band recent ribbon widget update some form views have to be updated. It is best displayed following those rules * after oe_button_box in order to fix overlapping; * before image to overlap it cleanly; LINKS Task ID : 2032621 PR : #34662 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Fiscal Position">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
|
||||
@@ -143,11 +143,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account">
|
||||
<sheet string="Analytic Account">
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="action" name="%(account_analytic_line_action)d"
|
||||
icon="fa-usd" string="Cost/Revenue" widget="statinfo"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
|
||||
@@ -66,11 +66,10 @@
|
||||
attrs="{'invisible': ['&', ('probability', '=', 0), ('active', '=', False)]}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<div class="badge-pill badge-danger float-right" attrs="{'invisible': ['|', ('probability', '>', 0), ('active', '=', True)]}">Lost</div>
|
||||
<div class="badge-pill badge-success float-right" attrs="{'invisible': [('probability', '<', 100)]}">Won</div>
|
||||
<widget name="web_ribbon" text="Lost" bg_color="bg-danger" attrs="{'invisible': ['|', ('probability', '>', 0), ('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" text="Won" attrs="{'invisible': [('probability', '<', 100)]}" />
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" string="Lead"/>
|
||||
<h1><field name="name" placeholder="Describe the lead..."/></h1>
|
||||
@@ -517,7 +516,6 @@
|
||||
attrs="{'invisible': [('active', '=', False)]}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="object"
|
||||
@@ -530,8 +528,8 @@
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="badge-pill badge-danger float-right" attrs="{'invisible': ['|', ('probability', '>', 0), ('active', '=', True)]}">Lost</div>
|
||||
<div class="badge-pill badge-success float-right" attrs="{'invisible': [('probability', '<', 100)]}">Won</div>
|
||||
<widget name="web_ribbon" text="Lost" bg_color="bg-danger" attrs="{'invisible': ['|', ('probability', '>', 0), ('active', '=', True)]}" />
|
||||
<widget name="web_ribbon" text="Won" attrs="{'invisible': [('probability', '<', 100)]}" />
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name" placeholder="e.g. Product Pricing"/></h1>
|
||||
|
||||
@@ -196,7 +196,6 @@
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box" groups="base.group_user">
|
||||
<button name="%(event.act_event_registration_from_event)d"
|
||||
type="action"
|
||||
@@ -206,6 +205,7 @@
|
||||
<field name="seats_expected" widget="statinfo" string="Attendees"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name" placeholder="Event Name"/></h1>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<field name="state_id" widget="statusbar" options="{'clickable': '1'}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="open_assignation_logs"
|
||||
@@ -60,6 +59,7 @@
|
||||
<field name="odometer_count" widget="statinfo" string="Odometer"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="image_128" widget='image' class="oe_avatar"/>
|
||||
<div class="oe_title">
|
||||
<label for="model_id" class="oe_edit_only"/>
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
<button string="Grant this Badge" type="action" name="%(action_grant_wizard)d" class="oe_highlight" attrs="{'invisible': [('remaining_sending','=',0)]}" />
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Employee" create="0" write="0">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<!-- Used by other modules-->
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="image_1920" widget='image' class="oe_avatar" options='{"zoom": true, "preview_image":"image_128"}'/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
<button name="%(plan_wizard_action)d" string="Launch Plan" type="action" groups="hr.group_hr_manager"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div name="button_box" class="oe_button_box">
|
||||
<button
|
||||
id="hr_presence_button"
|
||||
@@ -73,6 +72,7 @@
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="image_1920" widget='image' class="oe_avatar" options='{"zoom": true, "preview_image":"image_128"}'/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
|
||||
@@ -127,8 +127,8 @@
|
||||
<field name="state" widget="statusbar" options="{'clickable': '1'}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title" name="title">
|
||||
<div class="oe_edit_only">
|
||||
<div class="float-left">
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Time Off Type">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="object" name="action_see_days_allocated" icon="fa-archive">
|
||||
<div class="o_stat_info">
|
||||
@@ -36,6 +35,7 @@
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name"/></h1>
|
||||
</div>
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('active', '=', False),('emp_id', '=', False)]}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_applications_email"
|
||||
class="oe_stat_button"
|
||||
@@ -102,6 +101,7 @@
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="kanban_state" widget="kanban_state_selection"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="legend_normal" invisible="1"/>
|
||||
|
||||
@@ -333,7 +333,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Equipments">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="%(hr_equipment_request_action_from_equipment)d"
|
||||
type="action"
|
||||
@@ -342,6 +341,7 @@
|
||||
<field string="Maintenance" name="maintenance_count" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name" string="Name" placeholder="Equipment Name"/></h1>
|
||||
|
||||
@@ -38,13 +38,13 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Contact List">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_contacts"
|
||||
type="object" icon="fa-user" class="oe_stat_button">
|
||||
<field name="contact_nbr" string="Recipients" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
</strong></p>
|
||||
</div>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_sent"
|
||||
id="button_view_sent"
|
||||
@@ -141,7 +140,7 @@
|
||||
<field name="bounced_ratio" string="Bounced" widget="percentpie"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="name" required="1" string="Mailing Name"/>
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bill of Material">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="%(action_report_mrp_bom)d" type="action"
|
||||
class="oe_stat_button" icon="fa-bars" string="Structure & Cost" attrs="{'invisible': [('bom_line_ids', '=', [])]}"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Routing">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="%(action_mrp_routing_time)d" type="action" class="oe_stat_button" icon="fa-clock-o">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
@@ -80,6 +79,7 @@
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="code"/>
|
||||
|
||||
@@ -290,7 +290,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Work Center">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="%(mrp_workcenter_productivity_report_oee)d" type="action" class="oe_stat_button" icon="fa-pie-chart">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
@@ -317,6 +316,7 @@
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
groups="product.group_product_variant"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name='product_variant_count' invisible='1'/>
|
||||
<field name='is_product_variant' invisible='1'/>
|
||||
<field name='attribute_line_ids' invisible='1'/>
|
||||
@@ -265,8 +265,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Variant Information">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
|
||||
|
||||
@@ -93,7 +93,6 @@
|
||||
<button name="%(portal.portal_share_action)d" string="Share" type="action" class="oe_highlight oe_read_only"/>
|
||||
</header>
|
||||
<sheet string="Project">
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box" groups="base.group_user">
|
||||
<button class="oe_stat_button" name="attachment_tree_view" type="object" icon="fa-file-text-o">
|
||||
<field string="Documents" name="doc_count" widget="statinfo"/>
|
||||
@@ -113,6 +112,7 @@
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="Project Name"/>
|
||||
@@ -432,7 +432,6 @@
|
||||
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}"/>
|
||||
</header>
|
||||
<sheet string="Task">
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" icon="fa-tasks" type="object" name="action_open_parent_task" string="Parent Task" attrs="{'invisible' : [('parent_id', '=', False)]}" groups="project.group_subtask_project"/>
|
||||
<button name="action_subtask" type="object" class="oe_stat_button" icon="fa-tasks"
|
||||
@@ -444,6 +443,7 @@
|
||||
<field name="rating_count" string="Rating" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title pr-0">
|
||||
<h1 class="d-flex flex-row justify-content-between">
|
||||
<field name="priority" widget="priority" class="mr-3"/>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Coupon Program">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="object" icon="fa-usd" name="action_view_sales_orders">
|
||||
<field name="order_count" string="Sales" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div name="title" class="oe_left">
|
||||
<label class="oe_edit_only" for="name" string="Program Name"/>
|
||||
</div>
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Team">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" string="Sales Team"/>
|
||||
<h1>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock Location" create="false">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button string="Putaway Rules"
|
||||
class="oe_stat_button"
|
||||
@@ -30,6 +29,7 @@
|
||||
context="{'location_id': active_id}"
|
||||
/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<label for="location_id" class="oe_edit_only"/>
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Warehouse" create="false">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_all_routes"
|
||||
string="Routes"
|
||||
@@ -15,6 +14,7 @@
|
||||
class="oe_stat_button"
|
||||
type="object"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<group>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_survey_user_input"
|
||||
type="object"
|
||||
@@ -42,6 +41,7 @@
|
||||
<field string="Answers" name="answer_done_count" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title" style="width: 100%;">
|
||||
<label for="title" class="oe_edit_only"/>
|
||||
<h1><field name="title" placeholder="Survey Title"/></h1>
|
||||
|
||||
@@ -923,7 +923,7 @@ var FormRenderer = BasicRenderer.extend({
|
||||
*/
|
||||
_renderTagSheet: function (node) {
|
||||
this.has_sheet = true;
|
||||
var $sheet = $('<div>', {class: 'clearfix o_form_sheet'});
|
||||
var $sheet = $('<div>', {class: 'clearfix position-relative o_form_sheet'});
|
||||
$sheet.append(node.children.map(this._renderNode.bind(this)));
|
||||
return $sheet;
|
||||
},
|
||||
|
||||
@@ -32,4 +32,4 @@ odoo.define('web.ribbon', function (require) {
|
||||
widgetRegistry.add('web_ribbon', RibbonWidget);
|
||||
|
||||
return RibbonWidget;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
border: 1px solid #c8c8d3;
|
||||
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
||||
background: white;
|
||||
overflow: hidden;
|
||||
|
||||
margin: $o-sheet-vpadding*0.2 auto;
|
||||
@include media-breakpoint-up(md) {
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
.ribbon {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
|
||||
&::before, &::after {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
content: '';
|
||||
display: block;
|
||||
border: 5px solid #2980b9;
|
||||
}
|
||||
|
||||
& span {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 225px;
|
||||
padding: 15px 40px;
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, .1);
|
||||
color: #fff;
|
||||
font: 700 18px/1 'Lato', sans-serif;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&-top-right {
|
||||
margin-top: -$o-sheet-vpadding;
|
||||
right: 0;
|
||||
|
||||
&::before, &::after {
|
||||
border-top-color: black;
|
||||
border-right-color: black;
|
||||
}
|
||||
|
||||
&::before {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&::after {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
& span {
|
||||
left: -15px;
|
||||
top: 30px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
<template>
|
||||
|
||||
<t t-name="web.ribbon">
|
||||
<span t-att-class="'badge badge-primary ' + (widget.bgColor ? widget.bgColor : 'bg-success')" style="position: absolute;"><t t-esc="widget.text"/></span>
|
||||
<div class="ribbon ribbon-top-right">
|
||||
<span t-att-class="widget.bgColor ? widget.bgColor : 'bg-success'"><t t-esc="widget.text"/></span>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/attachment_preview.scss"/>
|
||||
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/notification.scss"/>
|
||||
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/base_document_layout.scss"/>
|
||||
|
||||
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/ribbon.scss"/>
|
||||
<link rel="stylesheet" type="text/scss" href="/web/static/src/scss/base_settings.scss"/>
|
||||
<script type="text/javascript" src="/base/static/src/js/res_config_settings.js"></script>
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Blog Post">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field name="is_published" widget="website_redirect_button"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group name="blog_details">
|
||||
<field name="blog_id"/>
|
||||
<field name="active" invisible="1"/>
|
||||
|
||||
@@ -113,11 +113,11 @@
|
||||
<field name="stage_id" widget="statusbar" options="{'clickable': '1'}"/>
|
||||
</header>
|
||||
<sheet string="Track">
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field name="website_url" invisible="1"/>
|
||||
<field name="is_published" widget="website_redirect_button"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="kanban_state" widget="state_selection"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
<button name="action_channel_invite" string="Invite" type="object" class="oe_highlight" attrs="{'invisible': [('enroll', '!=', 'invite')]}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_redirect_to_done_members"
|
||||
type="object"
|
||||
@@ -41,6 +40,7 @@
|
||||
</button>
|
||||
<field name="is_published" widget="website_redirect_button"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" string="Course Title"/>
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Lesson">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field name="is_published" widget="website_redirect_button"
|
||||
attrs="{'invisible': [('is_category', '=', True)]}"/>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options='{"preview_image": "image_256"}'
|
||||
attrs="{'readonly': [('slide_type', 'in', ('document', 'presentation', 'video'))], 'invisible': [('is_category', '=', True)]}"
|
||||
/>
|
||||
|
||||
@@ -203,8 +203,8 @@
|
||||
A partner with the same <span><span class="o_vat_label">Tax ID</span></span> already exists (<field name="same_vat_partner_id"/>), are you sure to create a new one?
|
||||
</div>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="image_1920" widget='image' class="oe_avatar" options='{"preview_image": "image_128"}'/>
|
||||
<div class="oe_title">
|
||||
<field name="is_company" invisible="1"/>
|
||||
|
||||
@@ -159,7 +159,6 @@
|
||||
<header>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="id" invisible="1"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_show_groups" type="object" groups="base.group_no_one" class="oe_stat_button" icon="fa-users">
|
||||
@@ -172,6 +171,7 @@
|
||||
<field string="Record Rules" name="rules_count" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="active_partner" required="0" readonly="1" invisible="1"/>
|
||||
<div class="alert alert-info text-center o_form_header"
|
||||
attrs="{'invisible': [
|
||||
|
||||
Reference in New Issue
Block a user