浏览代码

[minor] list is extensible

version-14
Rushabh Mehta 8 年前
父节点
当前提交
8bc72a1255
共有 3 个文件被更改,包括 6 次插入2 次删除
  1. +1
    -0
      frappe/docs/user/en/bench/index.md
  2. +3
    -1
      frappe/www/list.html
  3. +2
    -1
      frappe/www/list.py

+ 1
- 0
frappe/docs/user/en/bench/index.md 查看文件

@@ -1,2 +1,3 @@
# Bench

{index}

+ 3
- 1
frappe/www/list.html 查看文件

@@ -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>


+ 2
- 1
frappe/www/list.py 查看文件

@@ -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 {})


正在加载...
取消
保存