[ADD] theme saas-15
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
Odoo Proprietary License v1.0
|
||||
|
||||
This software and associated files (the "Software") may only be used (executed,
|
||||
modified, executed after modifications) if you have purchased a valid license
|
||||
from the authors, typically via Odoo Apps, or if you have received a written
|
||||
agreement from the authors of the Software (see the COPYRIGHT file).
|
||||
|
||||
You may develop Odoo modules that use the Software as a library (typically
|
||||
by depending on it, importing it and using its resources), but without copying
|
||||
any source code or material from the Software. You may distribute those
|
||||
modules under the license of your choice, provided that this license is
|
||||
compatible with the terms of the Odoo Proprietary License (For example:
|
||||
LGPL, MIT, or proprietary licenses similar to this one).
|
||||
|
||||
It is forbidden to publish, distribute, sublicense, or sell copies of the Software
|
||||
or modified copies of the Software.
|
||||
|
||||
The above copyright notice and this permission notice must be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1 @@
|
||||
import controllers
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
'name':'Latest Posts Snippet',
|
||||
'description':'Latest Posts Snippet',
|
||||
'category': 'Website',
|
||||
'version':'1.1',
|
||||
'author':'Odoo S.A.',
|
||||
'data': [
|
||||
'views/assets.xml',
|
||||
'views/s_latest_posts.xml',
|
||||
'views/options.xml',
|
||||
],
|
||||
'depends': ['theme_common', 'website_blog'],
|
||||
'auto_install': True,
|
||||
'images': [
|
||||
'static/description/icon.png',
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
import main
|
||||
@@ -0,0 +1,14 @@
|
||||
import werkzeug
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
|
||||
class snippet_latest_posts_controller(http.Controller):
|
||||
|
||||
# @http.route(['/snippet_latest_posts/fetch'], type='json', auth='public', website=True)
|
||||
# def fetch_latest_posts(self, fields, domain, limit=None, order='published_date desc', context={}):
|
||||
# return request.env['blog.post'].search_read(domain, fields, limit=limit, order=order, context=context)
|
||||
|
||||
@http.route(['/snippet_latest_posts/render'], type='json', auth='public', website=True)
|
||||
def render_latest_posts(self, template, domain, limit=None, order='published_date desc'):
|
||||
posts = request.env['blog.post'].search(domain, limit=limit, order=order)
|
||||
return request.env.ref(template).render({'posts': posts})
|
||||
@@ -0,0 +1,114 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * snippet_latest_posts
|
||||
#
|
||||
# Translators:
|
||||
# Ermin Trevisan <trevi@twanda.com>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-24 12:48+0000\n"
|
||||
"PO-Revision-Date: 2017-03-24 12:48+0000\n"
|
||||
"Last-Translator: Ermin Trevisan <trevi@twanda.com>, 2017\n"
|
||||
"Language-Team: German (https://www.transifex.com/odoo/teams/41243/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: de\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "1 post"
|
||||
msgstr "1 Beitrag"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "10 posts"
|
||||
msgstr "10 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "2 posts"
|
||||
msgstr "2 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "3 posts"
|
||||
msgstr "3 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "4 posts"
|
||||
msgstr "4 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "5 posts"
|
||||
msgstr "5 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "6 posts"
|
||||
msgstr "6 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "7 posts"
|
||||
msgstr "7 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "8 posts"
|
||||
msgstr "8 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "9 posts"
|
||||
msgstr "9 Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "All blogs"
|
||||
msgstr "Alle Blogs"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture
|
||||
msgid "Latest Posts"
|
||||
msgstr "Neueste Beiträge"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit by blog"
|
||||
msgstr "Für Blog beschränken"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit number to..."
|
||||
msgstr "Anzahl beschränken auf ..."
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "No posts here..."
|
||||
msgstr "Keine Beiträge ..."
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#. openerp-web
|
||||
#: code:addons/snippet_latest_posts/static/src/js/s_latest_posts_editor.js:73
|
||||
#, python-format
|
||||
msgid "Oops, Houston we have a problem"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "Please, be sure that your posts are not in draft state"
|
||||
msgstr ""
|
||||
"Bitte stellen Sie sicher, daß Ihre Beiträge nicht im Entwurfsmodus sind"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.media_list_template
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture_template
|
||||
msgid "Read More"
|
||||
msgstr "Mehr lesen"
|
||||
@@ -0,0 +1,114 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * snippet_latest_posts
|
||||
#
|
||||
# Translators:
|
||||
# Daniel Blanco <daniel@blancomartin.com.ar>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-24 12:48+0000\n"
|
||||
"PO-Revision-Date: 2017-03-24 12:48+0000\n"
|
||||
"Last-Translator: Daniel Blanco <daniel@blancomartin.com.ar>, 2017\n"
|
||||
"Language-Team: Spanish (https://www.transifex.com/odoo/teams/41243/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: es\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "1 post"
|
||||
msgstr "1 publicación"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "10 posts"
|
||||
msgstr "10 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "2 posts"
|
||||
msgstr "2 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "3 posts"
|
||||
msgstr "3 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "4 posts"
|
||||
msgstr "4 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "5 posts"
|
||||
msgstr "5 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "6 posts"
|
||||
msgstr "6 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "7 posts"
|
||||
msgstr "7 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "8 posts"
|
||||
msgstr "8 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "9 posts"
|
||||
msgstr "9 publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "All blogs"
|
||||
msgstr "Todos los blogs"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture
|
||||
msgid "Latest Posts"
|
||||
msgstr "Últimas Publicaciones"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit by blog"
|
||||
msgstr "Limitar por blog"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit number to..."
|
||||
msgstr "Limitar número a..."
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "No posts here..."
|
||||
msgstr "No hay publicaciones aquí..."
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#. openerp-web
|
||||
#: code:addons/snippet_latest_posts/static/src/js/s_latest_posts_editor.js:73
|
||||
#, python-format
|
||||
msgid "Oops, Houston we have a problem"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "Please, be sure that your posts are not in draft state"
|
||||
msgstr ""
|
||||
"Por favor, asegúrese que sus publicaciones no estén en estado borrador"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.media_list_template
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture_template
|
||||
msgid "Read More"
|
||||
msgstr "Leer Más"
|
||||
@@ -0,0 +1,115 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * snippet_latest_posts
|
||||
#
|
||||
# Translators:
|
||||
# Eloïse Stilmant <est@odoo.com>, 2018
|
||||
# Maxime Chambreuil <mchambreuil@ursainfosystems.com>, 2019
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-24 12:48+0000\n"
|
||||
"PO-Revision-Date: 2017-03-24 13:38+0000\n"
|
||||
"Last-Translator: Maxime Chambreuil <mchambreuil@ursainfosystems.com>, 2019\n"
|
||||
"Language-Team: French (https://www.transifex.com/odoo/teams/41243/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: fr\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "1 post"
|
||||
msgstr "1 publication"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "10 posts"
|
||||
msgstr "10 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "2 posts"
|
||||
msgstr "2 publicatoins"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "3 posts"
|
||||
msgstr "3 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "4 posts"
|
||||
msgstr "4 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "5 posts"
|
||||
msgstr "5 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "6 posts"
|
||||
msgstr "6 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "7 posts"
|
||||
msgstr "7 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "8 posts"
|
||||
msgstr "8 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "9 posts"
|
||||
msgstr "9 publications"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "All blogs"
|
||||
msgstr "Tous les blogs"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture
|
||||
msgid "Latest Posts"
|
||||
msgstr "Derniers articles"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit by blog"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit number to..."
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "No posts here..."
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#. openerp-web
|
||||
#: code:addons/snippet_latest_posts/static/src/js/s_latest_posts_editor.js:73
|
||||
#, python-format
|
||||
msgid "Oops, Houston we have a problem"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "Please, be sure that your posts are not in draft state"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.media_list_template
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture_template
|
||||
msgid "Read More"
|
||||
msgstr "Lire plus"
|
||||
@@ -0,0 +1,114 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * snippet_latest_posts
|
||||
#
|
||||
# Translators:
|
||||
# Gunther Clauwaert <gclauwae@hotmail.com>, 2017
|
||||
# Yenthe Van Ginneken <yenthespam@gmail.com>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-24 12:48+0000\n"
|
||||
"PO-Revision-Date: 2017-03-24 12:48+0000\n"
|
||||
"Last-Translator: Yenthe Van Ginneken <yenthespam@gmail.com>, 2017\n"
|
||||
"Language-Team: Dutch (https://www.transifex.com/odoo/teams/41243/nl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: nl\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "1 post"
|
||||
msgstr "1 bericht"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "10 posts"
|
||||
msgstr "10 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "2 posts"
|
||||
msgstr "2 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "3 posts"
|
||||
msgstr "3 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "4 posts"
|
||||
msgstr "4 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "5 posts"
|
||||
msgstr "5 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "6 posts"
|
||||
msgstr "6 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "7 posts"
|
||||
msgstr "7 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "8 posts"
|
||||
msgstr "8 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "9 posts"
|
||||
msgstr "9 berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "All blogs"
|
||||
msgstr "Alle blogs"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture
|
||||
msgid "Latest Posts"
|
||||
msgstr "Laatste Berichten"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit by blog"
|
||||
msgstr "Beperk per blog"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit number to..."
|
||||
msgstr "Beperk aantal tot..."
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "No posts here..."
|
||||
msgstr "Geen berichten hier..."
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#. openerp-web
|
||||
#: code:addons/snippet_latest_posts/static/src/js/s_latest_posts_editor.js:73
|
||||
#, python-format
|
||||
msgid "Oops, Houston we have a problem"
|
||||
msgstr "Oeps, Houston we hebben een probleem"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "Please, be sure that your posts are not in draft state"
|
||||
msgstr "Controleer dat uw berichten niet in de ontwerpstatus staan"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.media_list_template
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture_template
|
||||
msgid "Read More"
|
||||
msgstr "Lees verder"
|
||||
@@ -0,0 +1,111 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * snippet_latest_posts
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-24 12:48+0000\n"
|
||||
"PO-Revision-Date: 2017-03-24 12:48+0000\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: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "1 post"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "10 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "2 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "3 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "4 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "5 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "6 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "7 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "8 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "9 posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "All blogs"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture
|
||||
msgid "Latest Posts"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit by blog"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit number to..."
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "No posts here..."
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#. openerp-web
|
||||
#: code:addons/snippet_latest_posts/static/src/js/s_latest_posts_editor.js:73
|
||||
#, python-format
|
||||
msgid "Oops, Houston we have a problem"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "Please, be sure that your posts are not in draft state"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.media_list_template
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture_template
|
||||
msgid "Read More"
|
||||
msgstr ""
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * snippet_latest_posts
|
||||
#
|
||||
# Translators:
|
||||
# liAnGjiA <liangjia@qq.com>, 2018
|
||||
# Martin Trigaux, 2019
|
||||
# v2exerer <9010446@qq.com>, 2019
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-24 12:48+0000\n"
|
||||
"PO-Revision-Date: 2017-03-24 13:38+0000\n"
|
||||
"Last-Translator: v2exerer <9010446@qq.com>, 2019\n"
|
||||
"Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: zh_CN\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "1 post"
|
||||
msgstr "1 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "10 posts"
|
||||
msgstr "10 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "2 posts"
|
||||
msgstr "2 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "3 posts"
|
||||
msgstr "3 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "4 posts"
|
||||
msgstr "4 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "5 posts"
|
||||
msgstr "5 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "6 posts"
|
||||
msgstr "6 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "7 posts"
|
||||
msgstr "7 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "8 posts"
|
||||
msgstr "8 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "9 posts"
|
||||
msgstr "9 篇"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "All blogs"
|
||||
msgstr "全部博文"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture
|
||||
msgid "Latest Posts"
|
||||
msgstr "最新发布"
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit by blog"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_option
|
||||
msgid "Limit number to..."
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "No posts here..."
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#. openerp-web
|
||||
#: code:addons/snippet_latest_posts/static/src/js/s_latest_posts_editor.js:73
|
||||
#, python-format
|
||||
msgid "Oops, Houston we have a problem"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.no_blog_posts
|
||||
msgid "Please, be sure that your posts are not in draft state"
|
||||
msgstr ""
|
||||
|
||||
#. module: snippet_latest_posts
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.media_list_template
|
||||
#: model:ir.ui.view,arch_db:snippet_latest_posts.s_latest_posts_big_picture_template
|
||||
msgid "Read More"
|
||||
msgstr "阅读更多"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row text-left" style="margin-top: 2em;">
|
||||
<div class="col-sm-5">
|
||||
<p>Present your blog posts in magazine-style layouts. <br/>
|
||||
This snippet is great for highlighting blog content on your homepage.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<img src="screen_1.jpg" class="img-responsive" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 112 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,110 @@
|
||||
odoo.define('snippet_latest_posts.s_latest_posts_editor', function (require) {
|
||||
'use strict';
|
||||
|
||||
var core = require('web.core');
|
||||
var s_options = require('web_editor.snippets.options');
|
||||
var s_animation = require('web_editor.snippets.animation');
|
||||
var Model = require('web.Model');
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
// js_get_posts
|
||||
s_options.registry.js_get_posts = s_options.Class.extend({
|
||||
drop_and_build_snippet: function () {
|
||||
if (!this.$target.data('snippet-view')) {
|
||||
this.$target.data("snippet-view", new s_animation.registry.js_get_posts(this.$target));
|
||||
}
|
||||
},
|
||||
|
||||
clean_for_save: function () {
|
||||
this.$target.empty();
|
||||
},
|
||||
});
|
||||
|
||||
// js_get_posts limit
|
||||
s_options.registry.js_get_posts_limit = s_options.Class.extend({
|
||||
start: function () {
|
||||
var self = this;
|
||||
setTimeout(function () {
|
||||
var ul = self.$overlay.find(".snippet-option-js_get_posts_limit > ul");
|
||||
if (self.$target.attr("data-posts_limit")) {
|
||||
var limit = self.$target.attr("data-posts_limit");
|
||||
ul.find('li[data-posts_limit="' + limit + '"]').addClass("active");
|
||||
} else {
|
||||
ul.find('li[data-posts_limit="3"]').addClass("active");
|
||||
}
|
||||
}, 100)
|
||||
},
|
||||
|
||||
posts_limit: function (type, value, $li) {
|
||||
var self = this;
|
||||
if (type != "click") {return}
|
||||
value = parseInt(value);
|
||||
this.$target.attr("data-posts_limit",value)
|
||||
.data("posts_limit",value)
|
||||
.data('snippet-view').redrow(true);
|
||||
setTimeout(function () {
|
||||
$li.parent().find("li").removeClass("active");
|
||||
$li.addClass("active");
|
||||
}, 100);
|
||||
},
|
||||
});
|
||||
|
||||
// js_get_posts Select Blog
|
||||
s_options.registry.js_get_posts_selectBlog = s_options.Class.extend({
|
||||
start: function () {
|
||||
this._super();
|
||||
var self = this;
|
||||
var model = new Model('blog.blog');
|
||||
var blogsList = [];
|
||||
|
||||
model
|
||||
.call('search_read',
|
||||
[
|
||||
[],
|
||||
['name','id']// attributes to get
|
||||
],
|
||||
{} )
|
||||
.then(function (blogs) {
|
||||
self.createBlogsList(blogs)// start printing posts...
|
||||
})
|
||||
.fail(function (e) {
|
||||
// No data
|
||||
var title = _t("Oops, Houston we have a problem"),
|
||||
msg = $("<div contenteditable='false' class='message error text-center'><h3>"+ title +"</h3><code>"+ e.data.message + "</code></div>" );
|
||||
self.$target.append(msg)
|
||||
return;
|
||||
});
|
||||
},
|
||||
|
||||
createBlogsList: function (blogs) {
|
||||
var self = this;
|
||||
var ul = null;
|
||||
|
||||
setTimeout(function () {
|
||||
ul = self.$overlay.find(".snippet-option-js_get_posts_selectBlog > ul");
|
||||
$(blogs).each(function () {
|
||||
var blog = $(this);
|
||||
var li = $('<li data-filter_by_blog_id="' + blog[0].id + '"><a>' + blog[0].name + '</a></li>');
|
||||
ul.append(li);
|
||||
});
|
||||
if (self.$target.attr("data-filter_by_blog_id")) {
|
||||
var id = self.$target.attr("data-filter_by_blog_id");
|
||||
ul.find("li[data-filter_by_blog_id=" + id + "]").addClass("active");
|
||||
}
|
||||
},100)
|
||||
},
|
||||
|
||||
filter_by_blog_id: function (type, value, $li) {
|
||||
var self = this;
|
||||
if (type == "click") {
|
||||
$li.parent().find("li").removeClass("active");
|
||||
$li.addClass("active");
|
||||
value = parseInt(value);
|
||||
self.$target.attr("data-filter_by_blog_id",value)
|
||||
.data("filter_by_blog_id",value)
|
||||
.data('snippet-view').redrow(true);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,129 @@
|
||||
odoo.define('snippet_latest_posts.s_latest_posts_frontend', function (require) {
|
||||
'use strict';
|
||||
|
||||
var ajax = require('web.ajax');
|
||||
var s_animation = require('web_editor.snippets.animation');
|
||||
|
||||
s_animation.registry.js_get_posts = s_animation.Class.extend({
|
||||
selector : ".js_get_posts",
|
||||
|
||||
start: function () {
|
||||
this.redrow();
|
||||
},
|
||||
|
||||
stop: function () {
|
||||
this.clean();
|
||||
},
|
||||
|
||||
redrow: function (debug) {
|
||||
this.clean(debug);
|
||||
this.build(debug);
|
||||
},
|
||||
|
||||
clean: function (debug) {
|
||||
this.$target.empty();
|
||||
},
|
||||
|
||||
build: function (debug) {
|
||||
var self = this,
|
||||
limit = self.$target.data("posts_limit"),
|
||||
blog_id = self.$target.data("filter_by_blog_id"),
|
||||
template = self.$target.data("template"),
|
||||
loading = self.$target.data("loading");
|
||||
|
||||
// prevent user's editing
|
||||
self.$target.attr("contenteditable","False");
|
||||
|
||||
// if no data, then use defaults values
|
||||
if (!limit) limit = 3;
|
||||
if (!template) template = 'snippet_latest_posts.media_list_template';
|
||||
|
||||
// create the domain
|
||||
var domain = [['website_published', '=', true]]
|
||||
if (blog_id) {domain.push(['blog_id', '=', parseInt(blog_id)]); }
|
||||
|
||||
// call posts
|
||||
ajax.jsonRpc('/snippet_latest_posts/render', 'call', {
|
||||
'template': template,
|
||||
'domain': domain,
|
||||
'limit': limit,
|
||||
}).then(function (posts) {
|
||||
if (loading && loading == true) {
|
||||
// perfrorm an intro animation
|
||||
self.loading(posts, debug);
|
||||
} else {
|
||||
// just print the posts
|
||||
$(posts).appendTo(self.$target);
|
||||
}
|
||||
}).fail(function (e) {
|
||||
// debug in js console
|
||||
return;
|
||||
});
|
||||
},
|
||||
|
||||
loading: function (posts, debug) {
|
||||
var self = this,
|
||||
$posts = $(posts);
|
||||
|
||||
if (!$posts.first().find(".loading_container") && !$posts.first().is(".loading_container")) {
|
||||
console.log("loading_container dont exist??")
|
||||
if (debug) {
|
||||
console.info("No '.loading_container' defined \n Please, add a 'loading_container' class to the element that must be filled by the loading bar");
|
||||
}
|
||||
} else if (!$posts.first().is(".thumb") && !$posts.first().find(".thumb")) {
|
||||
console.log("thumb dont exist??")
|
||||
if (debug) {
|
||||
console.info("No '.thumb' defined \n Please, add a 'thumb' class to your thumbnail div");
|
||||
}
|
||||
} else {
|
||||
$posts.each(function () {
|
||||
var $post = $(this),
|
||||
$load_c = $post.find(".loading_container"),
|
||||
$thumb = $post.find(".thumb .o_blog_cover_image"),
|
||||
$progress = $('<div class="progress js-loading"><div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0;" /></div>')
|
||||
|
||||
// prevent precessing empty post
|
||||
if ($post.html() == undefined) {return;}
|
||||
|
||||
// if can't find loading container or thumb inside the post, then they are the post itself
|
||||
if ($load_c.length == 0) { $load_c = $post }
|
||||
if ($thumb.length == 0) { $thumb = $post }
|
||||
|
||||
$post.addClass("js-loading");
|
||||
$progress.appendTo($load_c);
|
||||
$post.appendTo(self.$target);
|
||||
|
||||
var bg = $thumb.css('background-image').replace('url("','').replace('")',''),
|
||||
loaded = false;
|
||||
|
||||
$progress.find(".progress-bar").css("width","50%").attr("aria-valuenow","50");
|
||||
|
||||
var dummyImg = $('<img/>').attr('src', bg)
|
||||
.load(function () {
|
||||
// The post's background image is loaded, let's perform a gracefull intro animation
|
||||
$progress.find(".progress-bar").find(".progress-bar").css("width","100%").attr("aria-valuenow","100");
|
||||
setTimeout(function () {
|
||||
self.showPost($post, $progress);
|
||||
}, 500);
|
||||
$(this).remove();
|
||||
loaded = true;
|
||||
});
|
||||
|
||||
// Show the post after 5sec without wait for thumb loading
|
||||
setTimeout(function () {
|
||||
if (loaded == false) {
|
||||
dummyImg.remove();
|
||||
self.showPost($post, $progress)
|
||||
}
|
||||
}, 5000);
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
showPost: function ($post, $progress) {
|
||||
$post.removeClass("js-loading");
|
||||
$progress.fadeOut(500);
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
.js_get_posts{
|
||||
position: relative;
|
||||
min-height: 100px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.progress.js-loading{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
|
||||
.progress-bar{
|
||||
margin: 0;
|
||||
left: 10%;
|
||||
width: 80%;
|
||||
top: 45%;
|
||||
height: 10px;
|
||||
position: absolute;
|
||||
background: #DBDBDB;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
.s_latest_posts .media.media_list_template {
|
||||
.pull-left {
|
||||
box-sizing: content-box;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
|
||||
@media (min-width: @screen-sm-min) {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
> a {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
> .o_blog_cover_container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
|
||||
> .o_blog_cover_component {
|
||||
.o-position-absolute(0, 0, 0, 0);
|
||||
}
|
||||
> .o_blog_cover_image {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
|
||||
// =============================
|
||||
// s_latest_posts_big_picture
|
||||
// =============================
|
||||
@s_latest_posts_big_picture-figure_bg: @brand-primary;
|
||||
|
||||
// ====== hooks(hook) =====================================
|
||||
// ===========================================================
|
||||
// Use them to inject NEW rules or overwrite the old ones.
|
||||
// This method is more maintenable than classic css overwrite
|
||||
// 'couse it works also if the snippet's structure will change.
|
||||
|
||||
// How to:
|
||||
// in your theme, just call the backdoor like a normal
|
||||
// CSS class adding parethesis at the end ".backdoor-name()"
|
||||
// (this will prevent the creation of a standard CSS class).
|
||||
// Add your rules inside. Your style will take the priority.
|
||||
// Done.
|
||||
|
||||
// .s_latest_posts-figure() {
|
||||
// background: red;
|
||||
// min-height: 200px;
|
||||
// }
|
||||
|
||||
.s_latest_posts-js_get_posts-hook() {};
|
||||
.s_latest_posts-figure-hook() {};
|
||||
|
||||
.s_latest_posts_big_picture {
|
||||
.container-fluid();
|
||||
|
||||
> div {
|
||||
.row();
|
||||
|
||||
.content {
|
||||
opacity: 1;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: @s_latest_posts_big_picture-figure_bg;
|
||||
}
|
||||
|
||||
figure {
|
||||
@media (max-width: @screen-xs-max) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 10px 0;
|
||||
height: 250px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
.transition(all 300ms);
|
||||
|
||||
&.js-loading {
|
||||
background: #E7E7E7!important;
|
||||
}
|
||||
|
||||
.thumb {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
opacity: 0.8;
|
||||
|
||||
> .o_blog_cover_component {
|
||||
.o-position-absolute(0, 0, 0, 0);
|
||||
}
|
||||
> .o_blog_cover_image {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
figcaption, figcaption > a {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 2em;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.25em;
|
||||
.backface-visibility(hidden);
|
||||
&:after, &:before {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
> a {
|
||||
z-index: 1000;
|
||||
text-indent: 200%;
|
||||
white-space: nowrap;
|
||||
font-size: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 1.5em;
|
||||
font-weight: 300;
|
||||
span {
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
p {
|
||||
margin: 1em 0 0;
|
||||
letter-spacing: 1px;
|
||||
font-size: 68.5%;
|
||||
}
|
||||
}
|
||||
.s_latest_posts-figure-hook;
|
||||
}
|
||||
// global figure
|
||||
.s_latest_posts-js_get_posts-hook;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<template id="assets_frontend_less" name="Latest Posts LESS assets" inherit_id="website.assets_frontend">
|
||||
<xpath expr="." position="inside">
|
||||
<link href="/snippet_latest_posts/static/src/less/js_get_posts.less" rel="stylesheet" type="text/less"/>
|
||||
<link href="/snippet_latest_posts/static/src/less/s_latest_posts.less" rel="stylesheet" type="text/less"/>
|
||||
<link href="/snippet_latest_posts/static/src/less/s_latest_posts_big_picture.less" rel="stylesheet" type="text/less"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="assets_frontend_js" name="Latest Posts JS frontend assets" inherit_id="website.assets_frontend">
|
||||
<xpath expr="//script[last()]" position="after">
|
||||
<script src="/snippet_latest_posts/static/src/js/s_latest_posts_frontend.js" rel="stylesheet" type="text/less"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="assets_editor" name="Latest Posts JS editor assets" inherit_id="website.assets_editor">
|
||||
<xpath expr="." position="inside">
|
||||
<script src="/snippet_latest_posts/static/src/js/s_latest_posts_editor.js" rel="stylesheet" type="text/less"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<template id="s_latest_posts_place_in_tab" inherit_id="website.snippets">
|
||||
<xpath expr="//div[@id='snippet_feature']/div[contains(@class, 'o_panel_body')]/t" position="before">
|
||||
<t t-snippet="snippet_latest_posts.s_latest_posts" t-thumbnail="/snippet_latest_posts/static/src/img/s_latest_posts.jpg"/>
|
||||
<t t-snippet="snippet_latest_posts.s_latest_posts_big_picture" t-thumbnail="/snippet_latest_posts/static/src/img/s_latest_posts_big_picture.jpg"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Snippet's Options -->
|
||||
<template id="s_latest_posts_option" inherit_id="website.snippet_options">
|
||||
<xpath expr="//div[@data-js='background']" position="before">
|
||||
|
||||
<div data-js='js_get_posts' data-selector=".js_get_posts"/>
|
||||
|
||||
<div data-js='js_get_posts_selectBlog' data-selector=".js_get_posts">
|
||||
<li class="dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Limit by blog</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li data-filter_by_blog_id="0"><a>All blogs</a></li>
|
||||
<!-- the blogs' list will be generated in js -->
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<div data-js='js_get_posts_limit' data-selector=".js_get_posts">
|
||||
<li class="dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Limit number to...</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li data-posts_limit="1"><a>1 post</a></li>
|
||||
<li data-posts_limit="2"><a>2 posts</a></li>
|
||||
<li data-posts_limit="3"><a>3 posts</a></li>
|
||||
<li data-posts_limit="4"><a>4 posts</a></li>
|
||||
<li data-posts_limit="5"><a>5 posts</a></li>
|
||||
<li data-posts_limit="6"><a>6 posts</a></li>
|
||||
<li data-posts_limit="7"><a>7 posts</a></li>
|
||||
<li data-posts_limit="8"><a>8 posts</a></li>
|
||||
<li data-posts_limit="9"><a>9 posts</a></li>
|
||||
<li data-posts_limit="10"><a>10 posts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Snippet's Body -->
|
||||
<template id="s_latest_posts" name="Latest Posts List">
|
||||
<section class="s_latest_posts">
|
||||
<div class="container">
|
||||
<h2 class="text-center">Latest Posts</h2>
|
||||
<div class="js_get_posts" data-loading="true" data-template="snippet_latest_posts.media_list_template"/>
|
||||
<hr/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<!-- Latest posts's Template -->
|
||||
<template id="media_list_template">
|
||||
<t t-if="not posts">
|
||||
<t t-call="snippet_latest_posts.no_blog_posts"/>
|
||||
</t>
|
||||
<t t-foreach="posts" t-as="p">
|
||||
<t t-set="properties" t-value="json.loads(p.cover_properties)"/>
|
||||
<div class="post media media_list_template">
|
||||
<div class="pull-left">
|
||||
<a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
|
||||
<t t-call="website_blog.blog_cover">
|
||||
<t t-set="cover_properties" t-value="properties"/>
|
||||
<t t-set="additionnal_classes" t-value="'media-object loading_container thumb'"/>
|
||||
</t>
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading" t-field="p.name"/>
|
||||
<p t-field="p.subtitle"/>
|
||||
<a class="btn btn-default" t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">Read More</a>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- No post here, template -->
|
||||
<template id="no_blog_posts">
|
||||
<div class="container readable">
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h3>No posts here...</h3>
|
||||
<p>Please, be sure that your posts are not in draft state</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- ======== LATEST POSTS BIG PICTURES ======== -->
|
||||
|
||||
<!-- Snippet's Body -->
|
||||
<template id="s_latest_posts_big_picture" name="Latest Posts Big Images">
|
||||
<section class="s_latest_posts_big_picture">
|
||||
<h2 class="text-center sans-serif">Latest Posts</h2>
|
||||
<div class="js_get_posts" data-loading="true" data-template="snippet_latest_posts.s_latest_posts_big_picture_template"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template id="s_latest_posts_big_picture_template">
|
||||
<t t-if="not posts">
|
||||
<t t-call="snippet_latest_posts.no_blog_posts"/>
|
||||
</t>
|
||||
<t t-foreach="posts" t-as="p">
|
||||
<t t-set="properties" t-value="json.loads(p.cover_properties)"/>
|
||||
<figure class="loading_container col-sm-6">
|
||||
<div class="content">
|
||||
<t t-call="website_blog.blog_cover">
|
||||
<t t-set="cover_properties" t-value="properties"/>
|
||||
<t t-set="additionnal_classes" t-value="'thumb'"/>
|
||||
</t>
|
||||
<figcaption>
|
||||
<h2 t-field="p.name"/>
|
||||
<p t-field="p.subtitle"/>
|
||||
<a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">Read More</a>
|
||||
</figcaption>
|
||||
</div>
|
||||
</figure>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user