[IMP] rename website_crm_partner_assign to website_worldmap
bzr revid: chm@openerp.com-20130829122113-uzau2huz0sb067f8
This commit is contained in:
@@ -9,7 +9,7 @@ OpenERP Blog
|
||||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website', 'sale', 'website_crm_partner_assign'],
|
||||
'depends': ['website', 'sale', 'website_worldmap'],
|
||||
'data': [
|
||||
'views/website_contract.xml',
|
||||
],
|
||||
|
||||
@@ -36,7 +36,16 @@
|
||||
<t t-set="classname">pull-left</t>
|
||||
</t>
|
||||
<form action="/references/" method="get" class="navbar-search pull-right pagination">
|
||||
<input type="text" name="search" class="search-query span2" placeholder="Search" t-att-value="searches.get('search') or '' or ''"/>
|
||||
<input type="text" name="search" class="search-query span2 mt4" placeholder="Search" t-att-value="searches.get('search') or '' or ''"/>
|
||||
<select class="search-query span2 mt4" name="country" t-if="len(countries) > 1" onchange="submit()">
|
||||
<t t-foreach="countries">
|
||||
<t t-if="country_id">
|
||||
<option t-att-selected="searches.get('country') == str(country_id and country_id[0]) and 'selected'" t-att-value="country_id[0]">
|
||||
<t t-esc="country_id[1]"/> (<t t-esc="country_id_count"/>)
|
||||
</option>
|
||||
</t>
|
||||
</t>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,19 +66,13 @@
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="ref_country" inherit_id="website_contract.index" inherit_option_id="website_contract.index" name="Left Country Categories">
|
||||
<template id="ref_country" inherit_id="website_contract.index" inherit_option_id="website_contract.index" name="Left World Map">
|
||||
<xpath expr="//div[@id='ref_content']" position="before">
|
||||
<div class="span4">
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">World Map</li>
|
||||
<iframe t-attf-src="/worldmap/?width=320&height=240&partner_ids=#{ worldmap_partner_ids }&partner_url=/references/"
|
||||
style="width:320px; height:260px; border:0; padding:0; margin:0;"></iframe>
|
||||
<li class="nav-header">Location</li>
|
||||
<t t-foreach="countries">
|
||||
<li t-if="country_id" t-att-class="searches.get('country') == str(country_id and country_id[0]) and 'active' or ''">
|
||||
<a t-attf-href="/references/#{ search_path }&country=#{ country_id[0] }"><t t-esc="country_id[1]"/><small>(<t t-esc="country_id_count"/>)</small></a>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
import controllers
|
||||
import website_crm_partner_assign
|
||||
@@ -0,0 +1,2 @@
|
||||
import controllers
|
||||
import website_worldmap
|
||||
+1
-1
@@ -9,7 +9,7 @@ OpenERP Website Worldmap
|
||||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website', 'website_crm', 'crm_partner_assign'],
|
||||
'depends': ['website', 'crm_partner_assign'],
|
||||
'data': [
|
||||
'views/worldmap.xml',
|
||||
],
|
||||
+1
-15
@@ -7,22 +7,8 @@ import simplejson
|
||||
import werkzeug.wrappers
|
||||
from datetime import datetime
|
||||
|
||||
from urllib import quote_plus
|
||||
|
||||
class contactus(http.Controller):
|
||||
|
||||
@http.route(['/crm/contactus'], type='http', auth="admin")
|
||||
def contactus(self, *arg, **post):
|
||||
website = request.registry['website']
|
||||
post['user_id'] = False
|
||||
request.registry['crm.lead'].create(request.cr, request.uid, post)
|
||||
values = website.get_rendering_context()
|
||||
company = values['res_company']
|
||||
values.update({
|
||||
'google_map_url': "http://maps.googleapis.com/maps/api/staticmap?center=%s&sensor=false&zoom=8&size=298x298" % quote_plus('%s, %s %s, %s' % (company.street, company.city, company.zip, company.country_id and company.country_id.name_get()[0][1] or ''))
|
||||
})
|
||||
return website.render("website_crm.thanks", values)
|
||||
|
||||
@http.route(['/worldmap/'], type='http', auth="admin")
|
||||
def worldmap(self, *arg, **post):
|
||||
website = request.registry['website']
|
||||
@@ -31,7 +17,7 @@ class contactus(http.Controller):
|
||||
values['width'] = post.get('width', 900)
|
||||
values['height'] = post.get('height', 460)
|
||||
values['partner_url'] = post.get('partner_url')
|
||||
return website.render("website_crm_partner_assign.worldmap", values)
|
||||
return website.render("website_worldmap.worldmap", values)
|
||||
|
||||
@http.route(['/worldmap/partners.json'], type='http', auth="admin")
|
||||
def worldmap_data(self, *arg, **post):
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
+1
-1
@@ -14,7 +14,7 @@ function initialize(pt) {
|
||||
infoWindow.close();
|
||||
});
|
||||
|
||||
var partners = new google.maps.MarkerImage("/website_crm_partner_assign/static/src/img/partners.png",new google.maps.Size(25, 25));
|
||||
var partners = new google.maps.MarkerImage("/website_worldmap/static/src/img/partners.png",new google.maps.Size(25, 25));
|
||||
|
||||
var markers = [];
|
||||
|
||||
+2
-2
@@ -28,9 +28,9 @@
|
||||
<script>var partner_url = '<t t-raw="partner_url or ''"/>';</script>
|
||||
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
||||
<script type="text/javascript" t-attf-src="/worldmap/partners.json?partner_ids=#{ partner_ids }"></script>
|
||||
<script type="text/javascript" src="/website_crm_partner_assign/static/src/js/markerclusterer_compiled.js"></script>
|
||||
<script type="text/javascript" src="/website_worldmap/static/src/js/markerclusterer_compiled.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
|
||||
<script type="text/javascript" src="/website_crm_partner_assign/static/src/js/worldmap.js"></script>
|
||||
<script type="text/javascript" src="/website_worldmap/static/src/js/worldmap.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map" t-attf-style="width: #{ width }px; height: #{ height }px"></div>
|
||||
Reference in New Issue
Block a user