[MERGE]Merge lp:~openerp-dev/openobject-addons/trunk-website-al.

bzr revid: bth@tinyerp.com-20130930102430-vnjn78mn65mq03r0
This commit is contained in:
bth-openerp
2013-09-30 15:54:30 +05:30
14 changed files with 174 additions and 62 deletions
+4 -4
View File
@@ -265,16 +265,16 @@ class Website(openerp.addons.web.controllers.main.Home):
hashed_session = hashlib.md5(request.session_id).hexdigest()
retag = hashed_session
try:
ids = Model.read(request.cr, request.uid, [('id', '=', id)], request.context)
id = int(id)
ids = Model.search(request.cr, request.uid, [('id', '=', id)], context=request.context)
if not ids:
id = Model.read(request.cr, openerp.SUPERUSER_ID, [('id', '=', id), ('website_published', '=', True)], request.context)[0]
id = Model.search(request.cr, openerp.SUPERUSER_ID, [('id', '=', id), ('website_published', '=', True)], context=request.context)[0]
if etag:
date = Model.read(request.cr, openerp.SUPERUSER_ID, [id], [last_update], request.context)[0].get(last_update)
if hashlib.md5(date).hexdigest() == etag:
return werkzeug.wrappers.Response(status=304)
res = Model.read(request.cr, openerp.SUPERUSER_ID, [id], [last_update, field], request.context)[0]
res = Model.read(request.cr, openerp.SUPERUSER_ID, [id], [last_update, field], context=request.context)[0]
retag = hashlib.md5(res.get(last_update)).hexdigest()
image_base64 = res.get(field)
+3 -8
View File
@@ -345,18 +345,13 @@ footer {
/* Parallax Theme */
.parallax_full {
background: #eeeeee top left repeat;
background: #eeeeee bottom center repeat fixed;
min-height: 650px;
width: 100%;
overflow: hidden;
position: relative;
}
.parallax_full > img {
position: absolute;
top: 0;
left: 0;
}
/* overflow: hidden
* position: relative */
/* -- Hack for removing double scrollbar from mobile preview -- */
div#mobile-preview.modal {
overflow: hidden;
+4 -7
View File
@@ -264,15 +264,12 @@ footer
/* Parallax Theme */
.parallax_full
background: #eee top left repeat
background: #eee bottom center repeat fixed
min-height: 650px
width: 100%
/*
overflow: hidden
position: relative
> img
position: absolute
top: 0
left: 0
position: relative */
/* -- Hack for removing double scrollbar from mobile preview -- */
div#mobile-preview.modal
@@ -309,4 +306,4 @@ ul.nav-stacked > li > a
/* display: block*/
::selection
background: rgba(150, 150, 220, 0.3)
background: rgba(150, 150, 220, 0.3)
+26 -22
View File
@@ -278,6 +278,7 @@
<t t-raw="res_company.name"></t>
</t>
<div id="wrap">
<div class="oe_structure"/>
<div class="container">
<h1>Contact us</h1>
<div class="row">
@@ -306,6 +307,7 @@
</div>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
@@ -314,28 +316,30 @@
<t t-call="website.layout">
<t t-set="title">About <t t-raw="res_company.name"></t>
</t>
<div id="wrap" class="oe_structure">
<div class="container mb32">
<div class="row col-wrap" id="aboutus">
<div class="col-sm-12 text-center">
<h1>About us</h1>
<h3 class="text-muted">A passion for great products</h3>
</div>
<div class="col-sm-8 mt16">
<p>
We are a team of passionated people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
<p>
Our products are designed for small to medium companies willing to optimize
their performance.
</p>
</div><div class="col-sm-3 col-sm-offset-1">
<img src="/website/static/src/img/library/business_conference.jpg" class="img img-responsive shadow" alt="Out Team"/>
</div>
</div>
</div>
<div id="wrap">
<div class="oe_structure"/>
<div class="container mb32">
<div class="row col-wrap" id="aboutus">
<div class="col-sm-12 text-center">
<h1>About us</h1>
<h3 class="text-muted">A passion for great products</h3>
</div>
<div class="col-sm-8 mt16">
<p>
We are a team of passionated people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
<p>
Our products are designed for small to medium companies willing to optimize
their performance.
</p>
</div><div class="col-sm-3 col-sm-offset-1">
<img src="/website/static/src/img/library/business_conference.jpg" class="img img-responsive shadow" alt="Out Team"/>
</div>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
+2 -3
View File
@@ -30,8 +30,8 @@ import werkzeug
class website_mail(http.Controller):
_category_post_per_page = 2
_post_comment_per_page = 2
_category_post_per_page = 6
_post_comment_per_page = 6
@website.route([
'/blog/',
@@ -143,7 +143,6 @@ class website_mail(http.Controller):
'blog_posts': blog_posts,
'pager': pager,
'nav_list': nav,
'uid': request.uid,
'unable_editor': post.get('unable_editor')
}
@@ -14,8 +14,6 @@
}
.blog_content a.oe_mail_expand {
font-weight: bold;
display: block;
margin-top: 10px;
}
p.post-meta {
@@ -13,8 +13,6 @@
content: " →"
a.oe_mail_expand
font-weight: bold
display: block
margin-top: 10px
p.post-meta
position: relative
@@ -91,7 +91,7 @@
<h4>Leave a Comment</h4>
<form id="comment" t-attf-action="/blog/#{blog_post.category_id.id}/#{blog_post.id}/post#post"
method="POST">
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.users&amp;field=image_small&amp;id='+str(uid)" style="width: 50px; margin-right: 10px;"/>
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
<div class="pull-left" style="width: 75%%">
<textarea rows="3" class="form-control" placeholder="Write a comment..."></textarea>
<button type="submit" class="btn btn-danger mt8">Post</button>
+2 -1
View File
@@ -77,7 +77,8 @@ class BlogPost(osv.Model):
max_length=self._shorten_max_char,
expand_options={
'oe_expand_href': '/blog/%d/%d' % (page.category_id.id, page.id),
}
'oe_expand_a_class': 'oe_mail_expand btn btn-info'
}, br=True
)
except Exception:
body_short = False
+86 -4
View File
@@ -108,7 +108,7 @@
</div>
<div class="col-md-6 col-md-offset-3 mb16 mt16">
<p class="text-center">
<b>No installation required</b>
<b>New Features Launched</b>
</p>
<p class="text-center">
OpenERP's Point of Sale introduces a super clean
@@ -116,9 +116,6 @@
online and offline on modern hardware. Laptops,
tablets, industrial POS, it runs on everything.
</p>
<p class="text-center">
<a href="/page/website.contactus">Get more information »</a>
</p>
</div>
</div>
</div>
@@ -263,5 +260,90 @@ Think of it as an out-of-the-box solution to boost your business' productivity.
</field>
</record>
<record id="blog_post_4" model="blog.post">
<field name="name">Announcig a New Partnership</field>
<field name="category_id" ref="blog_category_1"/>
<field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
<field name="content"><![CDATA[
<section data-snippet-id='image-text'>
<div class="container">
<div class="row">
<div class="col-md-6 mt16 mb16">
<img class="img-responsive shadow" src="/website/static/src/img/text_image.png"/>
</div>
<div class="col-md-6 mt16">
<p>
We are proud to announce a new partnership with
the company OpenERP. Their open source application suite
will allow us to reach new market, specifically in
the accounting area.
</p><p>
The full integration with the company inventory
and accounting, will give our customers real time statistics
without the hassle of integrating several applications.
</p>
</div>
</div>
</div>
</section>
<section class="mt16 mb16" data-snippet-id='text-block'>
<div class="container">
<div class="row">
<div class="col-md-12 text-center mt16 mb32">
<h2>
Linked with Project Management
</h2>
<h3 class="text-muted">Infinitely flexible. Incredibly easy to use.</h3>
</div>
<div class="col-md-12 mb16 mt16">
<p>
OpenERP's <b>collaborative and realtime</b> project
management helps your team get work done. Keep
track of everything, from the big picture to the
minute details, from the customer contract to the
billing.
</p><p>
Organize projects around <b>your own processes</b>. Work
on tasks and issues using the kanban view, schedule
tasks using the gantt chart and control deadlines
in the calendar view. Every project may have it's
own stages allowing teams to optimize their job.
</p>
</div>
</div>
</div>
</section>
<section class="dark mt16 mb16" data-snippet-id='big-picture'>
<div class="container">
<div class="row">
<div class="col-md-12 text-center mt32 mb32">
<h2>Work with the hardware you already have...</h2>
</div>
<div class="col-md-12">
<img class="img-responsive" src="/website/static/src/img/big_picture.png" style="margin: 0 auto;"/>
</div>
<div class="col-md-6 col-md-offset-3 mb16 mt16">
<p class="text-center">
<b>No installation required</b>
</p>
<p class="text-center">
OpenERP's Point of Sale introduces a super clean
interface with no installation required that runs
online and offline on modern hardware. Laptops,
tablets, industrial POS, it runs on everything.
</p>
<p class="text-center">
<a href="/page/website.contactus">Get more information »</a>
</p>
</div>
</div>
</div>
</section>
]]>
</field>
</record>
</data>
</openerp>
+13 -3
View File
@@ -7,20 +7,30 @@
<field name="public_info">Designer, UI Expert</field>
</record>
<record id="hr.employee_stw" model="hr.employee">
<record id="hr.employee_fp" model="hr.employee">
<field name="website_published" eval="True"/>
<field name="public_info">Like Coding</field>
<field name="public_info">Lean Management Expert</field>
</record>
<record id="hr.employee_mit" model="hr.employee">
<record id="hr.employee_qdp" model="hr.employee">
<field name="website_published" eval="True"/>
<field name="public_info">Designer, UI Expert</field>
</record>
<record id="hr.employee_fpi" model="hr.employee">
<field name="website_published" eval="True"/>
<field name="public_info">Customer Service Oriented</field>
</record>
<record id="hr.employee_al" model="hr.employee">
<field name="website_published" eval="True"/>
<field name="public_info">Like Coding</field>
</record>
<record id="hr.employee_jgo" model="hr.employee">
<field name="website_published" eval="True"/>
<field name="public_info">Driven by Customer Satisfaction</field>
</record>
</data>
</openerp>
@@ -111,6 +111,23 @@
height: 280px;
}
@media (max-width: 728px) {
.oe_product {
float: left;
width: 100%;
height: 200px;
display: inline-block;
}
#products_grid table, #products_grid tbody, #products_grid tr, #products_grid td {
float: left;
width: 100%;
display: inline-block;
}
#products_grid table td.oe-height-2 {
display: none;
}
}
@media (min-width: 992px) {
.col-md-12 .oe-height-1 {
height: 95px;
@@ -138,7 +155,6 @@
height: 288px;
}
}
@media (min-width: 1200px) {
.col-md-12 .oe-height-1 {
height: 125px;
@@ -166,7 +182,6 @@
height: 380px;
}
}
/* ---- Product list style ---- */
.oe_list_products {
border: none;
@@ -103,6 +103,20 @@
.oe-height-4
height: 280px
@media (max-width: 728px)
.oe_product
float: left
width: 100%
height: 200px
display: inline-block
#products_grid
table, tbody,tr, td
float: left
width: 100%
display: inline-block
table td.oe-height-2
display: none
@media (min-width: 992px)
.col-md-12
.oe-height-1
@@ -143,7 +157,6 @@
.oe-height-4
height: 380px
/* ---- Product list style ---- */
.oe_list_products
border: none
+2 -2
View File
@@ -287,8 +287,8 @@
<li class='dropdown-submenu'>
<a tabindex="-1" href="#">Promote</a>
<ul class="dropdown-menu" name="sequence">
<li><a href="#" class="js_go_to_top">Push on top</a></li>
<li><a href="#" class="js_go_to_bottom">Push on bottom</a></li>
<li><a href="#" class="js_go_to_top">Push to top</a></li>
<li><a href="#" class="js_go_to_bottom">Push to bottom</a></li>
</ul>
</li>
</t>