Skip to content

Commit

Permalink
Merge 415224a into c4cf357
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestotejeda committed May 17, 2019
2 parents c4cf357 + 415224a commit cc3bcdc
Show file tree
Hide file tree
Showing 18 changed files with 754 additions and 0 deletions.
110 changes: 110 additions & 0 deletions website_event_type_description/README.rst
@@ -0,0 +1,110 @@
=================================
Event Type Description in Website
=================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fevent-lightgray.png?logo=github
:target: https://github.com/OCA/event/tree/12.0/website_event_type_description
:alt: OCA/event
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/event-12-0/event-12-0-website_event_type_description
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/199/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the functionality of events website to support a custom
description for each event type that will be displayed only when events of that
type are filtered, below the common description for the Events page.

**Table of contents**

.. contents::
:local:

Usage
=====

To edit your event type description from the frontend, you need to:

#. Go to `your events page </event>`_.
#. Make sure you *Filter by Category* is enabled in the *Customize* menu.
#. Choose a event type from the filters.
#. Edit the page.
#. You will see a new editable area at the top (just below the one you already
had) that only will be shown when the page is filtered for this type of
event.
#. Fill that area with any blocks you want.
#. Save.

To do it from the backend, you need to:

#. Go to *Events > Configuration > Event Categories*.
#. Choose a type.
#. Change its description.

Known issues / Roadmap
======================

* The best for SEO would be to have a dedicated controller for event types,
with a friendly slug.
* In such case, the ``event.type`` model should inherit from
``website.seo.metadata`` mixin to have access to all SEO tools.
* It's not obvious that there is an editable area on event types website.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/event/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/event/issues/new?body=module:%20website_event_type_description%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

* Rafael Blasco
* Jairo Llopis
* David Vidal
* Ernesto Tejeda

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/event <https://github.com/OCA/event/tree/12.0/website_event_type_description>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions website_event_type_description/__init__.py
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
26 changes: 26 additions & 0 deletions website_event_type_description/__manifest__.py
@@ -0,0 +1,26 @@
# Copyright 2016 Tecnativa - Jairo Llopis
# Copyright 2017 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Event Type Description in Website",
"summary": "Display a specific description for each event type",
"version": "12.0.1.0.0",
"category": "Website",
"website": "https://www.tecnativa.com",
"author": "Tecnativa, "
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"website_event",
],
"data": [
"views/event_type_view.xml",
"views/event.xml",
],
"images": [
"images/seminars.png",
"images/all.png",
],
}
32 changes: 32 additions & 0 deletions website_event_type_description/i18n/es.po
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_event_type_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-05 22:35+0000\n"
"PO-Revision-Date: 2016-05-05 22:35+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: website_event_type_description
#: model:ir.model.fields,field_description:website_event_type_description.field_event_type_description
msgid "Description"
msgstr "Descripción"

#. module: website_event_type_description
#: model:ir.model.fields,help:website_event_type_description.field_event_type_description
msgid "Description for this type of event, as showing in the website."
msgstr "Descripción para este tipo de evento, para mostrar en el sitio web."

#. module: website_event_type_description
#: model:ir.model,name:website_event_type_description.model_event_type
msgid "Event Type"
msgstr "Tipo de evento"
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_event_type_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: website_event_type_description
#: model:ir.model.fields,field_description:website_event_type_description.field_event_type_description
msgid "Description"
msgstr ""

#. module: website_event_type_description
#: model:ir.model.fields,help:website_event_type_description.field_event_type_description
msgid "Description for this type of event, as showing in the website."
msgstr ""

#. module: website_event_type_description
#: model:ir.model,name:website_event_type_description.model_event_type
msgid "Event Type"
msgstr ""

Binary file added website_event_type_description/images/all.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,10 @@
# Copyright 2019 Tecnativa - Pedro M. Baeza

from openupgradelib import openupgrade, openupgrade_120


@openupgrade.migrate()
def migrate(env, version):
openupgrade_120.convert_field_bootstrap_3to4(
env, 'event.type', 'description',
)
3 changes: 3 additions & 0 deletions website_event_type_description/models/__init__.py
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import event
11 changes: 11 additions & 0 deletions website_event_type_description/models/event.py
@@ -0,0 +1,11 @@
# Copyright 2016 Tecnativa. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class EventType(models.Model):
_inherit = "event.type"

description = fields.Html(
help="Description for this type of event, as showing in the website.")
6 changes: 6 additions & 0 deletions website_event_type_description/readme/CONTRIBUTORS.rst
@@ -0,0 +1,6 @@
* `Tecnativa <https://www.tecnativa.com>`_:

* Rafael Blasco
* Jairo Llopis
* David Vidal
* Ernesto Tejeda
3 changes: 3 additions & 0 deletions website_event_type_description/readme/DESCRIPTION.rst
@@ -0,0 +1,3 @@
This module extends the functionality of events website to support a custom
description for each event type that will be displayed only when events of that
type are filtered, below the common description for the Events page.
5 changes: 5 additions & 0 deletions website_event_type_description/readme/ROADMAP.rst
@@ -0,0 +1,5 @@
* The best for SEO would be to have a dedicated controller for event types,
with a friendly slug.
* In such case, the ``event.type`` model should inherit from
``website.seo.metadata`` mixin to have access to all SEO tools.
* It's not obvious that there is an editable area on event types website.
17 changes: 17 additions & 0 deletions website_event_type_description/readme/USAGE.rst
@@ -0,0 +1,17 @@
To edit your event type description from the frontend, you need to:

#. Go to `your events page </event>`_.
#. Make sure you *Filter by Category* is enabled in the *Customize* menu.
#. Choose a event type from the filters.
#. Edit the page.
#. You will see a new editable area at the top (just below the one you already
had) that only will be shown when the page is filtered for this type of
event.
#. Fill that area with any blocks you want.
#. Save.

To do it from the backend, you need to:

#. Go to *Events > Configuration > Event Categories*.
#. Choose a type.
#. Change its description.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cc3bcdc

Please sign in to comment.