reorganize files

This commit is contained in:
Géry Debongnie
2019-01-22 19:25:12 +01:00
parent 5652ef65ad
commit 3766fbc7b8
101 changed files with 31 additions and 43 deletions
+23
View File
@@ -0,0 +1,23 @@
import Widget from "../core/Widget";
import { Action } from "../services/actions";
const template = `
<div class="o_navbar">
<span class="title">Odoo</span>
<ul>
<li t-foreach="env.services.actions" t-as="action">
<a t-att-href="getUrl(action)"><t t-esc="action.title"/></a>
</li>
</ul>
</div>
`;
export default class Navbar extends Widget {
name = "navbar";
template = template;
getUrl(action: Action) {
const action_id = action.id;
return this.env.services.router.formatURL("web", { action_id });
}
}