[website] [minor] moving to framework

This commit is contained in:
Rushabh Mehta
2013-09-09 17:31:19 +05:30
parent bb4c6eb630
commit bdb846f665
9 changed files with 42 additions and 65 deletions

View File

@@ -258,7 +258,7 @@ class DocType(DocListController):
def get_tax_rate(self, tax_type):
return { "tax_rate": webnotes.conn.get_value("Account", tax_type, "tax_rate") }
def prepare_template_args(self):
def get_context(self):
from selling.utils.product import get_parent_item_groups
self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{"name":self.doc.name}]
self.doc.title = self.doc.item_name

View File

@@ -1,42 +0,0 @@
{% extends "app/website/templates/html/page.html" %}
{% block content %}
{% include 'app/website/templates/html/product_search_box.html' %}
{% include 'app/website/templates/html/product_breadcrumbs.html' %}
<div class="col-md-12">
{% if slideshow %}<!-- slideshow -->
{% include "app/website/templates/html/slideshow.html" %}
{% endif %}
{% if description %}<!-- description -->
<div>{{ description or ""}}</div>
{% else %}
<h3>{{ name }}</h3>
{% endif %}
</div>
<div class="col-md-12">
{% if sub_groups %}
<hr />
<div class="row">
{% for d in sub_groups %}
<div class="col-md-4">
<a href="{{ d.page_name }}">{{ d.name }} ({{ d.count }})</a>
</div>
{% endfor %}
</div>
<hr />
{% endif %}
{% if items %}
<div id="search-list" class="row">
{% for item in items %}
{{ item }}
{% endfor %}
</div>
{% if len(items)==100 %}
<div class="alert info">Showing top 100 items.</div>
{% endif %}
{% else %}
<div class="alert">No items listed.</div>
{% endif %}
</div>
{% endblock %}