[website] [partners listing] first cut

This commit is contained in:
Anand Doshi
2013-06-13 14:40:57 +05:30
parent 48519ef8ae
commit 8e2ea5fed6
6 changed files with 185 additions and 58 deletions

View File

@@ -0,0 +1,11 @@
# Copyright (c) 2012 Web Notes Technologies Pvt Ltd.
# License: GNU General Public License (v3). For more information see license.txt
from __future__ import unicode_literals
import webnotes
def get_partner_args():
return {
"partners": webnotes.conn.sql("""select * from `tabSales Partner`
where show_in_website=1 order by name asc""", as_dict=True),
}

View File

@@ -0,0 +1,28 @@
{% extends "app/website/templates/html/page.html" %}
{% block content %}
<div class="col col-lg-12" itemscope itemtype="http://schema.org/Organization">
<div class="row">
<div class="col col-lg-4">
{% if logo -%}
<img itemprop="brand" src="{{ logo }}" class="partner-logo"
alt="{{ partner_name }}" title="{{ partner_name }}" />
<br><br>
{%- endif %}
<div>
<address>
{% if partner_website -%}<p><a href="{{ partner_website }}"
target="_blank">{{ partner_website }}</a></p>{%- endif %}
{% if partner_address -%}<p>{{ partner_address }}</p>{%- endif %}
{% if phone -%}<p>{{ phone }}</p>{%- endif %}
{% if email -%}<p><a href="mailto:{{ email }}">{{ email }}</a></p>{%- endif %}
</address>
</div>
</div>
<div class="col col-lg-8">
<h3 itemprop="name" style="margin-top: 0px;">{{ partner_name }}</h3>
<p>{{ description }}</p>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,30 @@
{% extends "app/website/templates/html/page.html" %}
{% set title="Sales Partners" %}
{% block content %}
<div class="col col-lg-12">
<h2 id="blog-title">Sales Partners</h2>
<hr>
{% for partner_info in partners %}
<div class="row">
<div class="col col-lg-3">
{% if partner_info.logo -%}
<a href="{{ partner_info.page_name }}">
<img itemprop="brand" src="{{ partner_info.logo }}" class="partner-logo"
alt="{{ partner_info.partner_name }}" title="{{ partner_info.partner_name }}" />
</a>
{%- endif %}
</div>
<div class="col col-lg-9">
<a href="{{ partner_info.page_name }}">
<h4>{{ partner_info.partner_name }}</h4>
</a>
<p style="color: #999">{{ partner_info.territory }} - {{ partner_info.partner_type }}</p>
<p>{{ partner_info.introduction }}</p>
</div>
</div>
<hr>
{% endfor %}
</div>
{% endblock %}