Browse Source

[ADD] Add all files for module ribbon_test_environment

pull/188/head
Francesco Apruzzese 9 years ago
parent
commit
a9581b7ddb
  1. 1
      ribbon_test_environment/AUTHORS.txt
  2. 25
      ribbon_test_environment/README.rst
  3. 20
      ribbon_test_environment/__init__.py
  4. 39
      ribbon_test_environment/__openerp__.py
  5. BIN
      ribbon_test_environment/static/description/screenshot.png
  6. 21
      ribbon_test_environment/static/src/css/ribbon.css
  7. 21
      ribbon_test_environment/view/base_view.xml

1
ribbon_test_environment/AUTHORS.txt

@ -0,0 +1 @@
Francesco Apruzzese <cescoap@gmail.com>

25
ribbon_test_environment/README.rst

@ -0,0 +1,25 @@
Ribbon Test Environment
=======================
Mark a Test Environment with a red ribbon on the top left corner in every page
.. image:: /ribbon_test_environment/static/description/screenshot.png
:alt: Screenshot
Configuration
=============
* No special setup
Usage
=====
To use this module, you need only to install it. After installation, a red ribbon will be visible on top left corner of every Odoo page
Credits
=======
Contributors
------------
* Francesco Apruzzese <cescoap@gmail.com>

20
ribbon_test_environment/__init__.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 Francesco OpenCode Apruzzese (<cescoap@gmail.com>)
# All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

39
ribbon_test_environment/__openerp__.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 Francesco OpenCode Apruzzese (<cescoap@gmail.com>)
# All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': "Ribbon Test Environment",
'version': '0.1',
'category': 'Web',
'author': 'Francesco OpenCode Apruzzese',
'website': 'https://it.linkedin.com/in/francescoapruzzese',
'license': 'AGPL-3',
"depends": [
'web',
],
"data": [
'view/base_view.xml',
],
"update_xml": [],
"demo_xml": [],
"active": False,
"installable": True
}

BIN
ribbon_test_environment/static/description/screenshot.png

After

Width: 607  |  Height: 198  |  Size: 43 KiB

21
ribbon_test_environment/static/src/css/ribbon.css

@ -0,0 +1,21 @@
.test-ribbon{
width: 200px;
background: #e43;
position: absolute;
top: 25px;
left: -50px;
text-align: center;
line-height: 50px;
letter-spacing: 1px;
color: #f0f0f0;
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
z-index: 10000;
position: fixed;
box-shadow: 0 0 3px rgba(0,0,0,.3);
background: #e43;
}
.test-ribbon b {
font-size: 20px;
}

21
ribbon_test_environment/view/base_view.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Load css for ribbons -->
<template id="assets_backend" name="ribbon_test assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/ribbon_test_environment/static/src/css/ribbon.css"/>
</xpath>
</template>
<!-- Add ribbon to page -->
<template id="body_with_ribbon_test" name="ribbon_test web.webclient_bootstrap" inherit_id="web.webclient_bootstrap">
<xpath expr="//div[@class='openerp openerp_webclient_container']" position="before">
<div class="test-ribbon"><b>TEST</b></div>
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save