Browse Source

..

pull/64/head
Mathias Markl 7 years ago
parent
commit
83b1edcdec
  1. 2
      muk_web_preview/__init__.py
  2. 5
      muk_web_preview/__manifest__.py
  3. 5
      muk_web_preview/doc/changelog.rst
  4. 20
      muk_web_preview/models/__init__.py
  5. 64
      muk_web_preview/models/res_config_settings.py
  6. 6
      muk_web_preview/static/description/index.html
  7. 145
      muk_web_preview/views/res_config_settings_view.xml

2
muk_web_preview/__init__.py

@ -16,3 +16,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###################################################################################
from . import models

5
muk_web_preview/__manifest__.py

@ -20,7 +20,7 @@
{
"name": "MuK Preview",
"summary": """File Preview Dialog""",
"version": "11.0.2.0.0",
"version": "11.0.2.1.0",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",
@ -30,12 +30,13 @@
"Mathias Markl <mathias.markl@mukit.at>",
],
"depends": [
"base",
"web",
"base_setup",
"muk_web_utils",
],
"data": [
"template/assets.xml",
"views/res_config_settings_view.xml",
],
"demo": [
"demo/preview_demo.xml",

5
muk_web_preview/doc/changelog.rst

@ -1,3 +1,8 @@
`2.1.0`
-------
- Added Settings to install Extensions
`2.0.0`
-------

20
muk_web_preview/models/__init__.py

@ -0,0 +1,20 @@
###################################################################################
#
# Copyright (C) 2017 MuK IT GmbH
#
# 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_settings

64
muk_web_preview/models/res_config_settings.py

@ -0,0 +1,64 @@
###################################################################################
#
# Copyright (C) 2017 MuK IT GmbH
#
# 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 odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
module_muk_web_preview_audio = fields.Boolean(
string="Preview Audio",
help="Extendes the Preview Dialog to support audio.")
module_muk_web_preview_csv = fields.Boolean(
string="Preview CSV",
help="Extendes the Preview Dialog to support csv files.")
module_muk_web_preview_image = fields.Boolean(
string="Preview Image",
help="Extendes the Preview Dialog to support image files.")
module_muk_web_preview_mail = fields.Boolean(
string="Preview Mail",
help="Extendes the Preview Dialog to support mails.")
module_muk_web_preview_markdown = fields.Boolean(
string="Preview Markdown",
help="Extendes the Preview Dialog to support markdown files.")
module_muk_web_preview_msoffice = fields.Boolean(
string="Preview MS Office",
help="Extendes the Preview Dialog to support office files.")
module_muk_web_preview_rst = fields.Boolean(
string="Preview ReStructuredText",
help="Extendes the Preview Dialog to support reStructuredText.")
module_muk_web_preview_text = fields.Boolean(
string="Preview Text",
help="Extendes the Preview Dialog to support text files.")
module_muk_web_preview_vector = fields.Boolean(
string="Preview Vector",
help="Extendes the Preview Dialog to support vector files.")
module_muk_web_preview_video = fields.Boolean(
string="Preview Video",
help="Extendes the Preview Dialog to support video files.")

6
muk_web_preview/static/description/index.html

@ -10,7 +10,7 @@
</div>
</section>
<section class="oe_container" style="padding-top: 25px;">
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="max-width: 84%; margin: 16px 8%;">
<h3 class="oe_slogan">Overview</h3>
@ -22,11 +22,9 @@
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">PDF & Open Document Preview</h3>
<h3 class="oe_slogan">PDF &amp; Open Document Preview</h3>
<div class="oe_span6">
<p class="oe_mt32 text-justify">A preview for Open Documents and
PDFs is already included in the MuK Preview module. The following

145
muk_web_preview/views/res_config_settings_view.xml

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2017 MuK IT GmbH
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/>.
-->
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
<field name="arch" type="xml">
<div name="integration" position="after">
<h2>Web Previews</h2>
<div class="row mt16 o_settings_container" name="web_client">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_audio" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_audio" />
<div class="text-muted">
Extendes the Preview Dialog to support audio
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_csv" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_csv" />
<div class="text-muted">
Extendes the Preview Dialog to support csv files
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_image" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_image" />
<div class="text-muted">
Extendes the Preview Dialog to support image files
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_mail" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_mail" />
<div class="text-muted">
Extendes the Preview Dialog to support mails
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_markdown" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_markdown" />
<div class="text-muted">
Extendes the Preview Dialog to support markdown files
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_msoffice" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_msoffice" />
<div class="text-muted">
Extendes the Preview Dialog to support office files
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_rst" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_rst" />
<div class="text-muted">
Extendes the Preview Dialog to support reStructuredText
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_text" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_text" />
<div class="text-muted">
Extendes the Preview Dialog to support text files
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_vector" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_vector" />
<div class="text-muted">
Extendes the Preview Dialog to support vector files
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_muk_web_preview_video" />
</div>
<div class="o_setting_right_pane">
<label for="module_muk_web_preview_video" />
<div class="text-muted">
Extendes the Preview Dialog to support video files
</div>
</div>
</div>
</div>
</div>
</field>
</record>
</odoo>
Loading…
Cancel
Save