Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions website_event_excerpt_img/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

=========================
Excerpt + Image in Events
=========================

This module extends the functionality of website events to support having a
more attractive layout that automatically displays an excerpt of each one, a
"Read more" button, and an image.

It also adds a event priority control in the backend that will display the
event at the top and in a bigger shape in the website.

Installation
============

To install this module, you need to:

#. Install `OCA/server-tools <https://github.com/OCA/server-tools>`_.

Configuration
=============

To configure this module, you need to:

#. Log in.
#. Go to `your website events page </event>`_.
#. Open the *Customize* menu.
#. *Images and Description* should be checked, and you should see events with
an image and description in the layout.

.. warning::
Normal (not highlighted) events will show up a bit clunky if you do not
disable the *Filters* view from the *Customize* menu.

You can either highlight all events, or disable that view.

If you still need filters, see module ``website_event_filter_selector``
found in this same repo.

Usage
=====

To use this module, you need to:

#. Go to the events page in your website. They have image and description now.

You will notice that short description is the excerpt of the first 80
characters of the event's long description. If you want to set a manual
description, you need to:

- From the frontend:
#. Click in that event.
#. Use the *Promote* tool to set a meta description.
- From the backend:
#. Go to *Marketing > Events > Events*.
#. Choose one.
#. Go to *Description*.
#. Use the *Website meta description* field for the same purpose.

If you want to change the image, you need to:

#. Edit the event page.
#. There, the first image appearing will be the one chosen. Beware, background
images count!

If you want to set an event as important:

#. Go to the event's form in backend.
#. Publish it.
#. Go to the *Description* tab.
#. Add a star in *Priority* to display the event in a full row on website.
#. Remove the star to display it in half a row.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/186/8.0

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:%20
website_event_excerpt_img%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Rafael Blasco <rafael.blasco@tecnativa.com>
* Jairo Llopis <jairo.llopis@tecnativa.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://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 https://odoo-community.org.
5 changes: 5 additions & 0 deletions website_event_excerpt_img/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
30 changes: 30 additions & 0 deletions website_event_excerpt_img/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Excerpt + Image in Events",
"summary": "New layout for event summary, including an excerpt and image",
"version": "8.0.1.0.0",
"category": "Website",
"website": "https://www.tecnativa.com",
"author": "Antiun Ingeniería S.L., Tecnativa, "
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"website_event",
"html_image_url_extractor",
"html_text",
],
"data": [
"views/assets.xml",
"views/event.xml",
"views/event_event_view.xml",
],
"images": [
"images/frontend.png",
"images/backend.png",
"images/customize.png",
],
}
23 changes: 23 additions & 0 deletions website_event_excerpt_img/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_event_excerpt_img
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-22 16:51+0000\n"
"PO-Revision-Date: 2016-03-22 17:53+0100\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: es\n"
"X-Generator: Poedit 1.8.7.1\n"

#. module: website_event_excerpt_img
#: view:event.event:website_event_excerpt_img.view_event_form
msgid "Short description of about 155 characters..."
msgstr "Descripción corta de unos 155 caracteres..."
Binary file added website_event_excerpt_img/images/backend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website_event_excerpt_img/images/customize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website_event_excerpt_img/images/frontend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions website_event_excerpt_img/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import event
15 changes: 15 additions & 0 deletions website_event_excerpt_img/models/event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import fields, models


class EventEvent(models.Model):
_inherit = "event.event"

priority = fields.Selection(
[("0", "Normal"), ("1", "Highlighted")],
required=True,
default="0",
help="Importance of the event, as shown in website (if enabled).")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@charset "UTF-8"
/* Copyright 2016 Tecnativa - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

#website_event_excerpt_img
// Any thumbnail
.event-thumbnail
.img
height: 8em
width: 100%
object:
fit: cover
position: center

// Highlighted thumbnails
.event-priority-highlighted
.event-thumbnail
.img
height: 16em
17 changes: 17 additions & 0 deletions website_event_excerpt_img/views/assets.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2016 Tecnativa - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<openerp>
<data>

<template id="assets_frontend"
inherit_id="website.assets_frontend">
<xpath expr=".">
<link rel="stylesheet"
href="/website_event_excerpt_img/static/src/css/website_event_excerpt_img.css"/>
</xpath>
</template>

</data>
</openerp>
Loading