mirror of https://github.com/OCA/social.git
Merge pull request #7 from Benniphx/social_media_icon_extention_tripadvisor
[ADD] social_media_icon_extention_tripadvisorpull/29/head
commit
0431f690ed
|
@ -0,0 +1,71 @@
|
||||||
|
|
||||||
|
.. image:: https://github.com/blooparksystems/website/blob/8.0/website_social_media_icon_extention/static/description/tripadvisor.jpg?raw=true
|
||||||
|
:width: 100
|
||||||
|
:target: http://www.tripadvisor.de
|
||||||
|
|
||||||
|
Extend Social Media Links
|
||||||
|
=========================
|
||||||
|
|
||||||
|
.. image:: https://github.com/blooparksystems/website/blob/8.0/website_social_media_icon_extention/static/description/settings.png?raw=true
|
||||||
|
:width: 700
|
||||||
|
|
||||||
|
.. image:: https://github.com/blooparksystems/website/blob/8.0/website_social_media_icon_extention/static/description/webpage.png?raw=true
|
||||||
|
:width: 700
|
||||||
|
|
||||||
|
Currently added:
|
||||||
|
|
||||||
|
- Tripadvisor
|
||||||
|
|
||||||
|
Info:
|
||||||
|
-----
|
||||||
|
|
||||||
|
- By default, the icon will be shown on the footer, about us, and the Blog, like the original icons.
|
||||||
|
- This Addon will load the current CSS Version 4.4.0 from Fontawesome in the assets (29KB).
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- go in the backend under settings / website
|
||||||
|
- you can now also add your Tripadvisor Account
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
------
|
||||||
|
|
||||||
|
- normal social icons:
|
||||||
|
|
||||||
|
<a t-att-href="website.social_facebook" t-if="website.social_facebook"><i class="fa fa-facebook-square"/></a>
|
||||||
|
|
||||||
|
<a t-att-href="website.social_twitter" t-if="website.social_twitter"><i class="fa fa-twitter"/></a>
|
||||||
|
|
||||||
|
<a t-att-href="website.social_linkedin" t-if="website.social_linkedin"><i class="fa fa-linkedin"/></a>
|
||||||
|
|
||||||
|
<a t-att-href="website.social_youtube" t-if="website.social_youtube"><i class="fa fa-youtube-play"/></a>
|
||||||
|
|
||||||
|
<a t-att-href="website.social_googleplus" t-if="website.social_googleplus"><i class="fa fa-google-plus-square"/></a>
|
||||||
|
|
||||||
|
<a t-att-href="website.social_github" t-if="website.social_github"><i class="fa fa-github"/></a>
|
||||||
|
|
||||||
|
- the new social icons:
|
||||||
|
|
||||||
|
<a t-att-href="website.social_tripadvisor" t-if="website.social_tripadvisor"><i class="fa fa-tripadvisor"/></a>
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Benjamin Bachmann (benniphx@gmail.com)
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: http://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: http://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
|
||||||
|
|
||||||
|
To contribute to this module, please visit http://odoo-community.org.
|
|
@ -0,0 +1,21 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Odoo, an open source suite of business apps
|
||||||
|
# This module copyright (C) 2015 bloopark systems (<http://bloopark.de>).
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
from . import models
|
|
@ -0,0 +1,42 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Odoo, an open source suite of business apps
|
||||||
|
# This module copyright (C) 2015 bloopark systems (<http://bloopark.de>).
|
||||||
|
#
|
||||||
|
# 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': "Tripadvisor Social Media Icon Extension",
|
||||||
|
'summary': """Tripadvisor Extension for the social media icons from the
|
||||||
|
odoo core""",
|
||||||
|
'author': "bloopark systems GmbH & Co. KG, "
|
||||||
|
"Odoo Community Association (OCA)",
|
||||||
|
'website': "http://www.bloopark.de",
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'category': 'Social Media',
|
||||||
|
'version': '8.0.1.0.0',
|
||||||
|
|
||||||
|
'depends': [
|
||||||
|
'website_blog'
|
||||||
|
],
|
||||||
|
|
||||||
|
'data': [
|
||||||
|
'views/website_templates.xml',
|
||||||
|
'views/website_views.xml',
|
||||||
|
'views/website_blog_template.xml',
|
||||||
|
'views/res_config.xml',
|
||||||
|
],
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Odoo, an open source suite of business apps
|
||||||
|
# This module copyright (C) 2015 bloopark systems (<http://bloopark.de>).
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
from . import res_config
|
||||||
|
from . import website
|
|
@ -0,0 +1,32 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Odoo, an open source suite of business apps
|
||||||
|
# This module copyright (C) 2015 bloopark systems (<http://bloopark.de>).
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
from openerp.models import TransientModel
|
||||||
|
from openerp import fields
|
||||||
|
|
||||||
|
|
||||||
|
class WebsiteConfigSettings(TransientModel):
|
||||||
|
|
||||||
|
"""Adds the fields for Social Media Icons."""
|
||||||
|
|
||||||
|
_inherit = 'website.config.settings'
|
||||||
|
|
||||||
|
social_tripadvisor = fields.Char('Tripadvisor Account',
|
||||||
|
related='website_id.social_tripadvisor')
|
|
@ -0,0 +1,31 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Odoo, an open source suite of business apps
|
||||||
|
# This module copyright (C) 2015 bloopark systems (<http://bloopark.de>).
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
from openerp.models import Model
|
||||||
|
from openerp import fields
|
||||||
|
|
||||||
|
|
||||||
|
class Website(Model):
|
||||||
|
|
||||||
|
"""Adds the fields for Social Media Icons."""
|
||||||
|
|
||||||
|
_inherit = 'website'
|
||||||
|
|
||||||
|
social_tripadvisor = fields.Char('Tripadvisor Account')
|
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
|
@ -0,0 +1,28 @@
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row oe_spaced">
|
||||||
|
<div class="oe_span12">
|
||||||
|
<h3 class="oe_slogan">
|
||||||
|
Social Media Icon Extention for
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<div>
|
||||||
|
<a href="http://www.tripadvisor.de/">
|
||||||
|
<img class="oe_picture"
|
||||||
|
src="tripadvisor.jpg">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span12">
|
||||||
|
<p class="oe_mt32">
|
||||||
|
Extend Social Media Links
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span12">
|
||||||
|
<div>
|
||||||
|
<img class="oe_picture"
|
||||||
|
src="settings.png">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record id="view_website_config_settings_ext"
|
||||||
|
model="ir.ui.view">
|
||||||
|
<field name="name">Website settings</field>
|
||||||
|
<field name="model">website.config.settings</field>
|
||||||
|
<field name="inherit_id" ref="website.view_website_config_settings"/>
|
||||||
|
<field name="arch"
|
||||||
|
type="xml">
|
||||||
|
<xpath expr="//div[@name='social_googleplus']"
|
||||||
|
position="after">
|
||||||
|
|
||||||
|
<label for="social_tripadvisor"/>
|
||||||
|
<div name="social_tripadvisor">
|
||||||
|
<div class="oe_inline">
|
||||||
|
<field name="social_tripadvisor"
|
||||||
|
placeholder="http://tripadvisor.de"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<template id="opt_blog_rc_follow_us_extra"
|
||||||
|
name="Extra Social Links"
|
||||||
|
inherit_id="website_blog.opt_blog_rc_follow_us">
|
||||||
|
<xpath expr="//h2[@class='mt4']"
|
||||||
|
position="after">
|
||||||
|
|
||||||
|
<a t-att-href="website.social_tripadvisor"
|
||||||
|
t-if="website.social_tripadvisor">
|
||||||
|
<i class="fa fa-tripadvisor"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<template id="footer_default_extra"
|
||||||
|
inherit_id="website.footer_default">
|
||||||
|
<xpath expr="//a[6]"
|
||||||
|
position="after">
|
||||||
|
|
||||||
|
<a t-att-href="website.social_tripadvisor"
|
||||||
|
t-if="website.social_tripadvisor">
|
||||||
|
<i class="fa fa-tripadvisor"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- css and scripts -->
|
||||||
|
<template id="assets_frontend"
|
||||||
|
inherit_id="website.assets_frontend"
|
||||||
|
name="Social Media Icon"
|
||||||
|
priority="900">
|
||||||
|
<xpath expr="."
|
||||||
|
position="inside">
|
||||||
|
|
||||||
|
<!-- version 4.4 of Fontawesome odoo uses only 4.0 -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"/>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record id="view_website_form_extra"
|
||||||
|
model="ir.ui.view">
|
||||||
|
<field name="name">website.form</field>
|
||||||
|
<field name="model">website</field>
|
||||||
|
<field name="inherit_id"
|
||||||
|
ref="website.view_website_form"/>
|
||||||
|
<field name="arch"
|
||||||
|
type="xml">
|
||||||
|
<field name="social_github"
|
||||||
|
position="after">
|
||||||
|
|
||||||
|
<field name="social_tripadvisor"
|
||||||
|
placeholder="http://tripadvisor.de"/>
|
||||||
|
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
Loading…
Reference in New Issue