|
|
@@ -538,10 +538,16 @@ def get_url(uri=None, full_address=False): |
|
|
|
def get_host_name(): |
|
|
|
return get_url().rsplit("//", 1)[-1] |
|
|
|
|
|
|
|
def get_url_to_form(doctype, name, label=None): |
|
|
|
def get_link_to_form(doctype, name, label=None): |
|
|
|
if not label: label = name |
|
|
|
|
|
|
|
return """<a href="/desk#!Form/%(doctype)s/%(name)s">%(label)s</a>""" % locals() |
|
|
|
return """<a href="{0}">{1}</a>""".format(get_url_to_form(doctype, name), label) |
|
|
|
|
|
|
|
def get_url_to_form(doctype, name): |
|
|
|
return get_url(uri = "desk/#Form/{0}/{1}".format(doctype, name)) |
|
|
|
|
|
|
|
def get_url_to_list(doctype): |
|
|
|
return get_url(uri = "desk/#List/{0}".format(doctype)) |
|
|
|
|
|
|
|
operator_map = { |
|
|
|
# startswith |
|
|
|