[minor] list is extensible

This commit is contained in:
Rushabh Mehta 2017-08-02 14:54:18 +05:30
parent 465d6b3431
commit 8bc72a1255
3 changed files with 6 additions and 2 deletions

View file

@ -1,2 +1,3 @@
# Bench
{index}

View file

@ -1,6 +1,8 @@
{% extends "templates/web.html" %}
{% block title %}{{ title or (_("{0} List").format(_(doctype))) }}{% endblock %}
{% block title %}
{{ title or (_("{0} List").format(_(doctype))) }}
{% endblock %}
{% block header %}
<h1>{{ title or (_("{0} List").format(_(doctype))) }}</h1>

View file

@ -11,9 +11,10 @@ from frappe import _
no_cache = 1
no_sitemap = 1
def get_context(context):
def get_context(context, **dict_params):
"""Returns context for a list standard list page.
Will also update `get_list_context` from the doctype module file"""
frappe.local.form_dict.update(dict_params)
doctype = frappe.local.form_dict.doctype
context.parents = [{"route":"me", "title":_("My Account")}]
context.update(get_list_context(context, doctype) or {})