summaryrefslogtreecommitdiff
path: root/addons/website/static/src/xml/website.pageProperties.xml
diff options
context:
space:
mode:
authorrde <rde@odoo.com>2017-09-15 12:36:59 +0200
committerJeremy Kersten <jke@odoo.com>2017-09-15 15:29:37 +0200
commit4ecbacaf59576a22ff45615a5aa5c67244e4fb93 (patch)
treeb1d38321d2838579ccb8adc2f3fcdd0765351fcc /addons/website/static/src/xml/website.pageProperties.xml
parent13a44d33bda1d7ff21e3de5de8b3c84f6a482a0d (diff)
[ADD] website: add new page management
website.page = old ir.ui.view with page=True website.redirect is a new mechanism to replace in the futur the ir.attachment mechanism of redirect. From now, we don't have a specific /page controller to serve 'page'. We use a new model website.page which is rendered if none route matches the url and that the field 'url' on website.page matches the request.httprequest.path. The order to serve a path is: - Routes defines in controllers (/shop, /blog, ...) - ir.attachment with name matching the path - website.page with url matching the path - website.redirect with url_from matching the path - 404 To improve: - allow regexp in website.redirect model - allow to edit the view_arch from the page.management via redirect backend (needed when traceback in the page, or when modifying a js/css/less/...)
Diffstat (limited to 'addons/website/static/src/xml/website.pageProperties.xml')
-rw-r--r--addons/website/static/src/xml/website.pageProperties.xml112
1 files changed, 112 insertions, 0 deletions
diff --git a/addons/website/static/src/xml/website.pageProperties.xml b/addons/website/static/src/xml/website.pageProperties.xml
new file mode 100644
index 00000000000..f21b0213f4e
--- /dev/null
+++ b/addons/website/static/src/xml/website.pageProperties.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+<div t-name="website.pagesMenu.page_info" class="o_page_management_info">
+ <form class="form-horizontal">
+ <ul class="nav nav-tabs">
+ <li class="active"><a data-toggle="tab" href="#basic_page_info">Name</a></li>
+ <li><a data-toggle="tab" href="#advances_page_info">Publish</a></li>
+ </ul>
+ <div class="tab-content mt16">
+ <div id="basic_page_info" class="tab-pane fade in active">
+ <div class="form-group">
+ <label class="control-label col-sm-3" for="page_name">Page Name</label>
+ <div class="col-sm-9">
+ <input type="text" class="form-control input-sm" id="page_name" t-att-value="widget.page.name" />
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3" for="page_url">Page Url</label>
+ <div class="col-sm-9">
+ <div class="input-group">
+ <span class="input-group-addon" t-att-title="widget.serverUrl"><small><t t-esc="widget.serverUrlTrunc" /></small></span>
+ <input type="text" class="form-control input-sm" id="page_url" t-att-value="widget.page.url" />
+ </div>
+ </div>
+ </div>
+ <div class="form-group ask_for_redirect">
+ <label class="control-label col-sm-3" for="is_homepage">Redirect old url</label>
+ <div class="col-sm-2">
+ <a>
+ <label class="o_switch" for="create_redirect" >
+ <input type="checkbox" id="create_redirect"/>
+ <span/>
+ </label>
+ </a>
+ </div>
+ <div class="col-sm-7 mt4">
+ <span class="text-muted" id="dependencies_redirect"></span>
+ </div>
+ </div>
+ <div class="form-group ask_for_redirect">
+ <label class="control-label col-sm-3 redirect_type" for="redirect_type">Type</label>
+ <div class="col-sm-6 redirect_type">
+ <select class="form-control" id="redirect_type">
+ <option t-foreach="widget.fields.type.selection" t-as="field" t-att-value="field[0]"><t t-esc="field[0] + ': ' + field[1]" /></option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div id="advances_page_info" class="tab-pane fade">
+ <div class="form-group">
+ <label class="control-label col-sm-3" for="is_menu">Show in top menu</label>
+ <div class="col-sm-2">
+ <a>
+ <label class="o_switch" for="is_menu" >
+ <input type="checkbox" t-att-checked="widget.page.menu_ids.length > 0 ? true : undefined" id="is_menu"/>
+ <span/>
+ </label>
+ </a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3" for="is_homepage">Use as homepage</label>
+ <div class="col-sm-2">
+ <a>
+ <label class="o_switch" for="is_homepage" >
+ <input type="checkbox" t-att-checked="widget.page.is_homepage ? true : undefined" id="is_homepage"/>
+ <span/>
+ </label>
+ </a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3" for="is_indexed">
+ Indexed
+ <i class="fa fa-question-circle-o" title="Hide this page from search results" aria-hidden="true"></i>
+ </label>
+ <div class="col-sm-2">
+ <a>
+ <label class="o_switch" for="is_indexed" >
+ <input type="checkbox" t-att-checked="widget.page.website_indexed ? true : undefined" id="is_indexed"/>
+ <span/>
+ </label>
+ </a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3" for="is_published">Publish</label>
+ <div class="col-sm-2">
+ <a>
+ <label class="o_switch js_publish_btn" for="is_published" >
+ <input type="checkbox" t-att-checked="widget.page.website_published ? true : undefined" id="is_published"/>
+ <span/>
+ </label>
+ </a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3" for="date_publish">Publishing Date</label>
+ <div class="col-sm-9">
+ <div class='input-group date' id='date_publish_container'>
+ <input type='text' class="form-control" name="date_publish" id="date_publish" />
+ <span class="input-group-addon">
+ <span class="fa fa-calendar"></span>
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
+</templates>