diff options
Diffstat (limited to 'muk_web_theme/static/src/xml')
| -rw-r--r-- | muk_web_theme/static/src/xml/apps.xml | 77 | ||||
| -rw-r--r-- | muk_web_theme/static/src/xml/appsbar.xml | 48 | ||||
| -rw-r--r-- | muk_web_theme/static/src/xml/base.xml | 35 | ||||
| -rw-r--r-- | muk_web_theme/static/src/xml/navbar.xml | 92 | ||||
| -rw-r--r-- | muk_web_theme/static/src/xml/shortcuts.xml | 41 | ||||
| -rw-r--r-- | muk_web_theme/static/src/xml/views.xml | 108 |
6 files changed, 401 insertions, 0 deletions
diff --git a/muk_web_theme/static/src/xml/apps.xml b/muk_web_theme/static/src/xml/apps.xml new file mode 100644 index 0000000..06f28a9 --- /dev/null +++ b/muk_web_theme/static/src/xml/apps.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + + Copyright (c) 2017-today MuK IT GmbH. + + This file is part of MuK Grid Snippets + (see https://mukit.at). + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + --> + +<templates id="template" xml:space="preserve"> + + <t t-extend="AppsMenu"> + <t t-jquery=".o_app" t-operation="attributes"> + <attribute name="t-attf-href">#menu_id=#{app.menuID}&action_id=#{app.actionID}</attribute> + </t> + <t t-jquery=".full" t-operation="attributes"> + <attribute name="accesskey">h</attribute> + </t> + <t t-jquery=".full > i" t-operation="attributes"> + <attribute name="class">fa fa-th</attribute> + </t> + <t t-jquery="[t-as=app]" t-operation="before"> + <div class="mk_search_container form-row align-items-center mb-4 col-12"> + <div class="mk_search_input col-md-10 ml-auto mr-auto mb-2"> + <div class="input-group"> + <div class="input-group-prepend"> + <div class="input-group-text"> + <i class="fa fa-search"/> + </div> + </div> + <input type="text" placeholder="Search menus..." class="form-control"/> + </div> + </div> + <div class="mk_search_results col-md-10 ml-auto mr-auto"/> + </div> + </t> + <t t-jquery=".o_app > t" t-operation="replace"> + <t t-call="muk_web_theme.AppIcon"/> + </t> + </t> + + <t t-name="muk_web_theme.AppIcon"> + <img class="o-app-icon" t-attf-src="data:image/png;base64,#{app.web_icon_data}"/> + <span class="o-app-name"> + <t t-esc="app.name"/> + </span> + </t> + + <t t-name="muk_web_theme.MenuSearchResults"> + <t t-foreach="results" t-as="result"> + <t t-set="menu" t-value="widget._menuInfo(result.original)"/> + <a t-attf-class="mk_menu_search_result dropdown-item col-12 ml-auto mr-auto #{result_first ? 'active' : ''}" + t-attf-style="background-image: #{menu.web_icon_data ? 'url(data:image/png;base64,' + menu.web_icon_data + ')' : 'none'}" + t-attf-href="#menu_id=#{menu.id}&action_id=#{menu.action_id}" + t-att-data-menu-id="menu.id" + t-att-data-action-id="menu.action_id" + t-att-data-parent-id="menu.parent_id[0]" + t-raw="result.string"/> + </t> + </t> + +</templates>
\ No newline at end of file diff --git a/muk_web_theme/static/src/xml/appsbar.xml b/muk_web_theme/static/src/xml/appsbar.xml new file mode 100644 index 0000000..1399d56 --- /dev/null +++ b/muk_web_theme/static/src/xml/appsbar.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + + Copyright (c) 2017-today MuK IT GmbH. + + This file is part of MuK Grid Snippets + (see https://mukit.at). + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + --> + +<templates id="template" xml:space="preserve"> + + <t t-name="muk_web_theme.AppsBarMenu"> + <div class="mk_apps_sidebar"> + <ul class="mk_apps_sidebar_menu"> + <t t-foreach="widget.getApps()" t-as="app"> + <li class="nav-item"> + <a t-attf-href="#menu_id=#{app.menuID}&action_id=#{app.actionID}" + t-att-data-menu-id="app.menuID" + t-att-data-menu-xmlid="app.xmlID" + t-att-data-action-id="app.actionID" + class="nav-link" role="menuitem"> + <img class="mk_apps_sidebar_icon" t-attf-src="data:image/png;base64,#{app.web_icon_data}"/> + <span class="mk_apps_sidebar_name"> + <t t-esc="app.name"/> + </span> + </a> + </li> + </t> + </ul> + </div> + </t> + +</templates>
\ No newline at end of file diff --git a/muk_web_theme/static/src/xml/base.xml b/muk_web_theme/static/src/xml/base.xml new file mode 100644 index 0000000..bac72ab --- /dev/null +++ b/muk_web_theme/static/src/xml/base.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ Copyright (c) 2017-today MuK IT GmbH.
+
+ This file is part of MuK Grid Snippets
+ (see https://mukit.at).
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ -->
+
+<templates id="template" xml:space="preserve">
+
+ <t t-extend="web.DropdownMenu">
+ <t t-jquery="button" t-operation="inner">
+ <span t-att-class="widget.dropdownIcon"/>
+ <span class="mk_dropdown_text"><t t-esc="widget.dropdownTitle"/></span>
+ <span t-if="widget.dropdownSymbol" t-att-class="widget.dropdownSymbol"/>
+ </t>
+ </t>
+
+</templates>
\ No newline at end of file diff --git a/muk_web_theme/static/src/xml/navbar.xml b/muk_web_theme/static/src/xml/navbar.xml new file mode 100644 index 0000000..6322a7e --- /dev/null +++ b/muk_web_theme/static/src/xml/navbar.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + + Copyright (c) 2017-today MuK IT GmbH. + + This file is part of MuK Grid Snippets + (see https://mukit.at). + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + --> + +<templates id="template" xml:space="preserve"> + + <t t-extend="Menu"> + <t t-jquery=".o_menu_systray" t-operation="after"> + <button class="mk_menu_sections_toggle d-md-none" data-toggle="collapse" + data-target=".o_main_navbar > .o_menu_sections"> + <i class="fa fa-bars"/> + </button> + </t> + <t t-jquery=".o_menu_systray" t-operation="after"> + <div class="mk_apps_sidebar_panel" /> + </t> + </t> + + <t t-name="muk_web_theme.MobileMenu.link"> + <t t-set="depth" t-value="(depth || 0) + 1"/> + <t t-if="!menu.children.length"> + <li> + <a role="menuitem" t-attf-class="dropdown-item o_menu_entry_lvl_#{depth}" + t-attf-href="#menu_id=#{menu.id}&action=#{menu.action ? menu.action.split(',')[1] : ''}" + t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''" + t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''" + t-att-data-menu="menu.id" + t-att-data-menu-xmlid="menu.xmlid" + data-toggle="collapse" data-target="#o_navbar_collapse.in"> + <span> + <t t-esc="menu.name"/> + </span> + </a> + </li> + </t> + <t t-else=""> + <li class="mk_menu_mobile_section clearfix"> + <a role="button" href="#" t-attf-class="dropdown-toggle o-no-caret o_menu_header_lvl_#{depth}" + t-att-data-menu-xmlid="menu.xmlid" data-toggle="dropdown" aria-expanded="false"> + <span> + <t t-esc="menu.name"/> + </span> + <span class="fa fa-chevron-right float-right"/> + <span class="fa fa-chevron-down float-right" style="display: none;"/> + </a> + <ul class="dropdown-menu" role="menu"> + <t t-foreach="menu.children" t-as="submenu"> + <t t-call="muk_web_theme.MobileMenu.link"> + <t t-set="menu" t-value="submenu"/> + </t> + </t> + </ul> + </li> + </t> + </t> + + <t t-name="muk_web_theme.MobileMenu.sections"> + <t t-set="isMobile" t-value="true"/> + <t t-foreach="menu_data.children" t-as="topmenu"> + <section t-att-class="topmenu.id"> + <t t-if="topmenu.children.length"> + <t t-foreach="topmenu.children" t-as="submenu"> + <t t-call="muk_web_theme.MobileMenu.link"> + <t t-set="menu" t-value="submenu"/> + </t> + </t> + </t> + </section> + </t> + </t> + +</templates>
\ No newline at end of file diff --git a/muk_web_theme/static/src/xml/shortcuts.xml b/muk_web_theme/static/src/xml/shortcuts.xml new file mode 100644 index 0000000..814c5e4 --- /dev/null +++ b/muk_web_theme/static/src/xml/shortcuts.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + + Copyright (c) 2017-today MuK IT GmbH. + + This file is part of MuK Grid Snippets + (see https://mukit.at). + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + --> + +<templates id="template" xml:space="preserve"> + + <t t-extend="UserMenu.shortcuts"> + <t t-jquery="tbody" t-operation="prepend"> + <tr> + <td align="left">Open the apps menu</td> + <td> + <span class="o_key">Alt</span> + <span class="o_key">h</span> + </td> + <td> + <span class="o_key">Control</span> + <span class="o_key">Alt</span> + <span class="o_key">h</span> + </td> + </tr> + </t> + </t> + +</templates>
\ No newline at end of file diff --git a/muk_web_theme/static/src/xml/views.xml b/muk_web_theme/static/src/xml/views.xml new file mode 100644 index 0000000..56a4e8c --- /dev/null +++ b/muk_web_theme/static/src/xml/views.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ Copyright (c) 2017-today MuK IT GmbH.
+
+ This file is part of MuK Grid Snippets
+ (see https://mukit.at).
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ -->
+
+<templates id="template" xml:space="preserve">
+
+ <t t-name="muk_web_theme.MenuStatusbarButtons">
+ <div class="dropdown">
+ <button class="o_statusbar_buttons_dropdown btn btn-secondary dropdown-toggle" type="button"
+ data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Actions
+ </button>
+ </div>
+ </t>
+
+ <t t-name="muk_web_theme.IconButton">
+ <i t-attf-class="d-inline d-sm-none fa fa-#{icon}" t-att-title="label"/>
+ <span class="d-none d-sm-inline" t-esc="label"/>
+ </t>
+
+ <t t-extend="FormView.buttons">
+ <t t-jquery=".o_form_button_edit" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'pencil'"/>
+ <t t-set="label">Edit</t>
+ </t>
+ </t>
+ <t t-jquery=".o_form_button_create" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'plus'"/>
+ <t t-set="label">Create</t>
+ </t>
+ </t>
+ <t t-jquery=".o_form_button_save" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'floppy-o'"/>
+ <t t-set="label">Save</t>
+ </t>
+ </t>
+ <t t-jquery=".o_form_button_cancel" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'times'"/>
+ <t t-set="label">Discard</t>
+ </t>
+ </t>
+ </t>
+
+ <t t-extend="ListView.buttons">
+ <t t-jquery=".o_list_button_add" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'plus'"/>
+ <t t-set="label">Create</t>
+ </t>
+ </t>
+
+ <t t-jquery=".o_list_button_save" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'floppy-o'"/>
+ <t t-set="label">Save</t>
+ </t>
+ </t>
+
+ <t t-jquery=".o_list_button_discard" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'times'"/>
+ <t t-set="label">Discard</t>
+ </t>
+ </t>
+ </t>
+
+ <t t-extend="KanbanView.buttons">
+ <t t-jquery="button" t-operation="inner">
+ <t t-call="muk_web_theme.IconButton">
+ <t t-set="icon" t-value="'plus'"/>
+ <t t-set="label" t-value="create_text || _t('Create')"/>
+ </t>
+ </t>
+ </t>
+
+ <t t-extend="SearchView.FavoriteMenu">
+ <t t-jquery="button[data-toggle='dropdown']" t-operation="inner">
+ <span class="fa fa-star"/>
+ <span class="mk_dropdown_text">Favorites</span>
+ <span t-if="widget.isMobile" class="fa fa-chevron-right float-right mt4"/>
+ </t>
+ </t>
+
+</templates>
\ No newline at end of file |
