SEO move templates to website.seo.xml
bzr revid: ddm@openerp.com-20130905092038-a0ao4dxhjz902lqg
This commit is contained in:
parent
c68f584988
commit
98a0b8c2f8
|
@ -3,6 +3,8 @@
|
|||
// TODO l10n ?
|
||||
|
||||
var website = openerp.website;
|
||||
website.templates.push('/website/static/src/xml/website.seo.xml');
|
||||
|
||||
website.EditorBar.include({
|
||||
events: _.extend({}, website.EditorBar.prototype.events, {
|
||||
'click a[data-action=promote-current-page]': 'promotePage',
|
||||
|
@ -24,7 +26,7 @@
|
|||
return $(document.title).text();
|
||||
},
|
||||
headers: function (tag) {
|
||||
return $('#wrap h1').map(function () {
|
||||
return $('#wrap '+tag).map(function () {
|
||||
return $(this).text();
|
||||
});
|
||||
},
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="website.seo_configuration">
|
||||
<div class="modal fade oe_seo_configuration" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button title="Close" type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h2 class="modal-title">Promote <small class="js_seo_page_url"></small></h2>
|
||||
<h4>Get your page efficiently referenced in Google to attract more visitors.</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="js_seo_tips" />
|
||||
<section>
|
||||
<h3 class="page-header">1. Define keywords <small>describing your page content</small></h3>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Suggestions</dt>
|
||||
<dd>
|
||||
<ul class="list-inline js_seo_company_suggestions">
|
||||
<!-- filled in JS -->
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="seo_page_keywords" class="col-lg-2 control-label">New keyword</label>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="seo_page_keywords" class="form-control" maxlength="30"/>
|
||||
<span class="input-group-btn">
|
||||
<button data-action="add" class="btn btn-default" type="button">Add</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="dl-horizontal oe_seo_keywords_list">
|
||||
<dt>Current selection</dt>
|
||||
<dd class="js_seo_keywords_list">
|
||||
<!-- filled in JS -->
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h3 class="page-header">2. Choose a title and description <small>containing keywords relevant to what people are searching on the web</small></h3>
|
||||
<div class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="seo_page_title" class="col-lg-2 control-label">Title</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" name="seo_page_title" class="form-control" maxlength="70" size="70"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_page_description" class="col-lg-2 control-label">Description</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea name="seo_page_description" class="form-control" rows="3" cols="70" size="160"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h3 class="page-header">3. Describe your images</h3>
|
||||
<div class="row js_seo_image_list">
|
||||
<!-- filled in JS -->
|
||||
</div>
|
||||
</section>
|
||||
<hr/>
|
||||
<section>
|
||||
<button type="button" data-action="update" class="btn btn-primary">Apply changes</button> or <a data-action="discard" data-dismiss="modal" href="#">Discard</a>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_list">
|
||||
<ul class="list-inline">
|
||||
<!-- filled in JS -->
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_tip">
|
||||
<div t-attf-class="alert alert-#{widget.type}">
|
||||
<button title="Dismiss" type="button" class="close" data-action="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<t t-raw="widget.message"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_keyword">
|
||||
<li class="oe_seo_keyword">
|
||||
<span t-attf-class="label label-#{ widget.type } js_seo_keyword" t-att-data-keyword="widget.keyword">
|
||||
<t t-raw="widget.keyword"/>
|
||||
&nbsp;
|
||||
<a href="#" class="oe_remove" data-action="remove-keyword">x</a>
|
||||
</span>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_suggestion">
|
||||
<li class="oe_seo_suggestion">
|
||||
<span t-attf-class="label label-#{ widget.type } js_seo_suggestion" t-att-data-keyword="widget.keyword">
|
||||
<t t-raw="widget.keyword"/>
|
||||
</span>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_image">
|
||||
<div class="col-sm-6 col-md-3 oe_seo_image_preview">
|
||||
<img t-att-src="widget.src" class="img-rounded thumbnail"/>
|
||||
<input type="text" class="form-control" t-att-src="widget.src" t-att-value="widget.alt" placeholder="Description..."/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
|
@ -57,118 +57,6 @@
|
|||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_configuration">
|
||||
<div class="modal fade oe_seo_configuration" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button title="Close" type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h2 class="modal-title">Promote <small class="js_seo_page_url"></small></h2>
|
||||
<h4>Get your page efficiently referenced in Google to attract more visitors.</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="js_seo_tips" />
|
||||
<section>
|
||||
<h3 class="page-header">1. Define keywords <small>describing your page content</small></h3>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Suggestions</dt>
|
||||
<dd>
|
||||
<ul class="list-inline js_seo_company_suggestions">
|
||||
<!-- filled in JS -->
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="seo_page_keywords" class="col-lg-2 control-label">New keyword</label>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="seo_page_keywords" class="form-control" maxlength="30"/>
|
||||
<span class="input-group-btn">
|
||||
<button data-action="add" class="btn btn-default" type="button">Add</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="dl-horizontal oe_seo_keywords_list">
|
||||
<dt>Current selection</dt>
|
||||
<dd class="js_seo_keywords_list">
|
||||
<!-- filled in JS -->
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h3 class="page-header">2. Choose a title and description <small>containing keywords relevant to what people are searching on the web</small></h3>
|
||||
<div class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="seo_page_title" class="col-lg-2 control-label">Title</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" name="seo_page_title" class="form-control" maxlength="70" size="70"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_page_description" class="col-lg-2 control-label">Description</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea name="seo_page_description" class="form-control" rows="3" cols="70" size="160"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h3 class="page-header">3. Describe your images</h3>
|
||||
<div class="row js_seo_image_list">
|
||||
<!-- filled in JS -->
|
||||
</div>
|
||||
</section>
|
||||
<hr/>
|
||||
<section>
|
||||
<button type="button" data-action="update" class="btn btn-primary">Apply changes</button> or <a data-action="discard" data-dismiss="modal" href="#">Discard</a>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_list">
|
||||
<ul class="list-inline">
|
||||
<!-- filled in JS -->
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_tip">
|
||||
<div t-attf-class="alert alert-#{widget.type}">
|
||||
<button title="Dismiss" type="button" class="close" data-action="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<t t-raw="widget.message"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_keyword">
|
||||
<li class="oe_seo_keyword">
|
||||
<span t-attf-class="label label-#{ widget.type } js_seo_keyword" t-att-data-keyword="widget.keyword">
|
||||
<t t-raw="widget.keyword"/>
|
||||
&nbsp;
|
||||
<a href="#" class="oe_remove" data-action="remove-keyword">x</a>
|
||||
</span>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_suggestion">
|
||||
<li class="oe_seo_suggestion">
|
||||
<span t-attf-class="label label-#{ widget.type } js_seo_suggestion" t-att-data-keyword="widget.keyword">
|
||||
<t t-raw="widget.keyword"/>
|
||||
</span>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
<t t-name="website.seo_image">
|
||||
<div class="col-sm-6 col-md-3 oe_seo_image_preview">
|
||||
<img t-att-src="widget.src" class="img-rounded thumbnail"/>
|
||||
<input type="text" class="form-control" t-att-src="widget.src" t-att-value="widget.alt" placeholder="Description..."/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="website.carousel">
|
||||
<div class="item" style="background-image: url(/website/static/src/img/china.jpg); background-size: cover; background-position: bottom;" >
|
||||
<div class='container'>
|
||||
|
|
Loading…
Reference in New Issue