1N/A## -*- coding: utf-8 -*-
1N/A## The contents of this file are subject to the terms of the
1N/A## Common Development and Distribution License (the "License").
1N/A## You may not use this file except in compliance with the License.
1N/A## See the License for the specific language governing permissions
1N/A## and limitations under the License.
1N/A## When distributing Covered Code, include this CDDL HEADER in each
1N/A## If applicable, add the following below this CDDL HEADER, with the
1N/A## fields enclosed by brackets "[]" replaced with your own identifying
1N/A## information: Portions Copyright [yyyy] [name of copyright owner]
1N/A## Copyright (c) 2008, 2016, Oracle
and/or its affiliates. All rights reserved.
1N/A## Returns the value of the named respository configuration property in the
1N/A<%def name="dcval(g_vars, section, name)"><%
1N/A return g_vars["config"].get_depot_property_value(section, name)
1N/A<%def name="rcval(g_vars, section, name)"><%
1N/A return g_vars["config"].get_repo_property_value(section, name)
1N/A## Returns the relative URI path to the named resource.
1N/A<%def name="rpath(g_vars, name)"><%
1N/A return g_vars["request"].get_rel_path(name)
1N/A## Returns path relative to the current request path for the current locale
1N/A<%def name="lrelpath(g_vars, path)"><%
1N/A return g_vars["request"].get_rel_path(path)[len("../"):]
1N/A## representing the version, and a label for that version. Entries are
1N/A## sorted by release and branch in descending order.
1N/A<%def name="get_releases(g_vars)"><%
1N/A catalog = g_vars["catalog"]
1N/A request = g_vars["request"]
1N/A ver_label = "2008.05 ({0})".format(ver_label)
1N/A ver_label = "2008.11 ({0})".format(ver_label)
ver_label = "2009.06 ({0})".format(ver_label)
versions[entry] = (
f.version, entry, ver_label)
## Returns a uri, relative to the current request path to the given resource
## based on the current theme, that is not locale or region specific.
<%def name="tpath(g_vars, resource)"><%
return g_vars["request"].get_rel_path("_themes/{0}/{1}".format(
g_vars["web_config"]["theme"], resource))
## Returns the %include path to the given resource based on the current theme,
## locale, and region information.
<%def name="ltipath(g_vars, resource)"><%
return "/_themes/{0}/{1}/{2}".format(g_vars["web_config"]["theme"],
g_vars["web_config"]["locale-region"], resource)
## Returns a uri, relative to the current request path, to the given resource
## based on the current locale and region information.
<%def name="ltupath(g_vars, resource)"><%
path = "_themes/{0}/{1}/{2}".format(g_vars["web_config"]["theme"],
g_vars["web_config"]["locale-region"], resource)
return g_vars["request"].get_rel_path(path)