mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-01 12:38:27 +00:00
[website] [minor] moving to framework
This commit is contained in:
@@ -44,7 +44,7 @@ class DocType(DocTypeNestedSet):
|
||||
webnotes.msgprint("An item exists with same name (%s), please change the \
|
||||
item group name or rename the item" % self.doc.name, raise_exception=1)
|
||||
|
||||
def prepare_template_args(self):
|
||||
def get_context(self):
|
||||
from selling.utils.product import get_product_list_for_group, \
|
||||
get_parent_item_groups, get_group_item_count
|
||||
|
||||
|
||||
42
setup/doctype/item_group/templates/item_group.html
Normal file
42
setup/doctype/item_group/templates/item_group.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% 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 %}
|
||||
@@ -29,7 +29,7 @@ class DocType:
|
||||
else:
|
||||
return ''
|
||||
|
||||
def prepare_template_args(self):
|
||||
def get_context(self):
|
||||
address = webnotes.conn.get_value("Address",
|
||||
{"sales_partner": self.doc.name, "is_primary_address": 1},
|
||||
"*", as_dict=True)
|
||||
|
||||
Reference in New Issue
Block a user