-
-
Notifications
You must be signed in to change notification settings - Fork 737
[WIP][8.0][website_multi_image] Provide reusable templates for base_multi_image. #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
| :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
| :alt: License: AGPL-3 | ||
|
|
||
| ==================== | ||
| Multiple images base | ||
| ==================== | ||
|
|
||
| This module extends the functionality of ``base_multi_image`` and provides some | ||
| technical tools useful to combine it with ``website``. | ||
|
|
||
| Basically, it provides reusable templates for objects owning multiple images. | ||
|
|
||
| Installation | ||
| ============ | ||
|
|
||
| This module adds no visible behavior, just some reusable tools for developers. | ||
| It will be automatically installed if any other module you have needs those | ||
| tools, but otherwise you probably don not need it. | ||
|
|
||
| Development | ||
| =========== | ||
|
|
||
| To develop a module based on this one: | ||
|
|
||
| * See module ``website_event_multi_image`` as an example. | ||
| * ``t-call`` the provided templates in frontend website views: | ||
| * ``website_multi_image.carousel``: outputs a carousel for images. | ||
|
|
||
| .. 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/website/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/ | ||
| website/issues/new?body=module:%20 | ||
| website_multi_image%0Aversion:%20 | ||
| 8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| * Rafael Blasco <[email protected]> | ||
| * Jairo Llopis <[email protected]> | ||
|
|
||
| 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. |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # © 2015 Antiun Ingeniería S.L. - Jairo Llopis | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
|
||
| { | ||
| "name": "Multiple Images in Website", | ||
| "summary": "Templates to display multiple images in website views", | ||
| "version": "8.0.1.0.0", | ||
| "author": "Antiun Ingeniería, S.L., " | ||
| "Odoo Community Association (OCA)", | ||
| "license": "AGPL-3", | ||
| "website": "http://www.antiun.com", | ||
| "category": "Hidden", | ||
| "depends": [ | ||
| "base_multi_image", | ||
| "website", | ||
| ], | ||
| 'installable': True, | ||
| "data": [ | ||
| "views/assets.xml", | ||
| "views/owner_templates.xml", | ||
| ], | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
website_multi_image/static/src/css/website_multi_image.css.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @charset "utf-8" | ||
| /* © 2016 Antiun Ingeniería S.L. - Jairo Llopis | ||
| License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
|
||
| #multi_image_carousel | ||
| .item | ||
| height: 400px | ||
| background-position: center | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis | ||
| License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> | ||
|
|
||
| <openerp> | ||
| <data> | ||
|
|
||
| <template id="assets_frontend" inherit_id="website.assets_frontend"> | ||
| <xpath expr="."> | ||
| <link rel="stylesheet" | ||
| href="/website_multi_image/static/src/css/website_multi_image.css"/> | ||
| </xpath> | ||
| </template> | ||
|
|
||
| </data> | ||
| </openerp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis | ||
| License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> | ||
|
|
||
| <openerp> | ||
| <data> | ||
|
|
||
| <!-- Call this template in your owner's website page to get a carousel. | ||
| It needs a `multi_image_owner` variable set. --> | ||
| <template id="carousel"> | ||
| <div id="multi_image_carousel" | ||
| t-if="multi_image_owner.image_ids" | ||
| class="carousel slide mb32"> | ||
|
|
||
| <!-- Indicators --> | ||
| <ol class="carousel-indicators"> | ||
| <t t-foreach="multi_image_owner.image_ids" t-as="image"> | ||
| <li data-target="#multi_image_carousel" | ||
| data-slide-to="0" | ||
| t-att-class="'active' if image_first else None"/> | ||
| </t> | ||
| </ol> | ||
|
|
||
| <!-- Slides --> | ||
| <div class="carousel-inner"> | ||
| <t t-foreach="multi_image_owner.image_ids" t-as="image"> | ||
| <div | ||
| t-attf-class="item #{'active' if image_first else ''}" | ||
| t-attf-style="background-image: url('#{website.image_url(image, 'image_main')}')"> | ||
| <div class="carousel-caption"> | ||
| <h3 t-esc="image.display_name"/> | ||
| </div> | ||
| </div> | ||
| </t> | ||
| </div> | ||
|
|
||
| <!-- Controls --> | ||
| <div | ||
| class="carousel-control left" | ||
| data-target="#multi_image_carousel" | ||
| data-slide="prev"> | ||
| <i class="fa fa-chevron-left"/> | ||
| </div> | ||
| <div | ||
| class="carousel-control right" | ||
| data-target="#multi_image_carousel" | ||
| data-slide="next"> | ||
| <i class="fa fa-chevron-right"/> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| </data> | ||
| </openerp> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this commented or is the notation for sass files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad highlighter.