742N/A## -*- coding: utf-8 -*-
742N/A##
742N/A## CDDL HEADER START
742N/A##
742N/A## The contents of this file are subject to the terms of the
742N/A## Common Development and Distribution License (the "License").
742N/A## You may not use this file except in compliance with the License.
742N/A##
742N/A## You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
742N/A## or http://www.opensolaris.org/os/licensing.
742N/A## See the License for the specific language governing permissions
742N/A## and limitations under the License.
742N/A##
742N/A## When distributing Covered Code, include this CDDL HEADER in each
742N/A## file and include the License file at usr/src/OPENSOLARIS.LICENSE.
742N/A## If applicable, add the following below this CDDL HEADER, with the
742N/A## fields enclosed by brackets "[]" replaced with your own identifying
742N/A## information: Portions Copyright [yyyy] [name of copyright owner]
742N/A##
742N/A## CDDL HEADER END
742N/A##
2852N/A## Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
742N/A##
742N/A<%!
742N/A import pkg.server.api as api
742N/A%>\
742N/A<%namespace name="shared" file="../shared.shtml" inheritable="True"/>\
742N/A<%page args="g_vars"/>\
742N/A<%
2651N/A CLIENT_API_VERSION = 12
742N/A base = g_vars["base"]
742N/A catalog = api.CatalogInterface(CLIENT_API_VERSION, base)
742N/A config = api.ConfigInterface(CLIENT_API_VERSION, base)
742N/A request = api.RequestInterface(CLIENT_API_VERSION, base)
742N/A g_vars["catalog"] = catalog
742N/A g_vars["config"] = config
742N/A g_vars["request"] = request
742N/A
742N/A rpath = request.path_info.strip("/")
2028N/A comps = rpath.split("/")
2028N/A pub = g_vars["pub"]
2028N/A if pub and comps[0] == pub:
2028N/A # Ignore publisher component of path.
2028N/A comps.pop(0)
2028N/A g_vars["web_config"] = { "locale-region": comps[0] }
742N/A%>\
742N/A<%include file="../config.shtml" args="g_vars=g_vars"/>\
742N/A<%def name="global_menu_items(g_vars)"><%
742N/A if g_vars["config"].mirror:
742N/A # Only statistics are available in mirror mode.
742N/A return [("stats.shtml", "Statistics")]
2852N/A if g_vars["http_depot"]:
2852N/A # Apache can't return statistics via the BUI
2852N/A # but does have a top level list of all repositories.
2852N/A return [
2852N/A ("/", "Repositories"),
2852N/A ("catalog.shtml", "Packages"),
2852N/A ("search.shtml", "Search"),
2852N/A ]
742N/A return [
742N/A ("catalog.shtml", "Packages"),
742N/A ("search.shtml", "Search"),
742N/A ("stats.shtml", "Statistics")
742N/A ]
742N/A%></%def>\
742N/A<%def name="document_class()"><%
742N/A return ""
742N/A%></%def>\
742N/A<%def name="page_crumbs(g_vars)"><%
742N/A return [
742N/A ("index.shtml", "Home")
742N/A ]
742N/A%></%def>\
742N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
742N/A "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
742N/A<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
742N/A<head>
742N/A <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
742N/A <title>${self.page_title(g_vars)}</title>
742N/A% if not config.mirror:
742N/A <link rel="alternate" type="application/atom+xml"
1968N/A title="${self.shared.dcval(g_vars, "pkg_bui", "feed_name")}"
742N/A href="${self.shared.rpath(g_vars, "feed")}"/>
742N/A% endif
742N/A<%include file="${self.shared.ltipath(g_vars, 'head_end.shtml')}"
742N/A args="g_vars=g_vars"/>\
742N/A</head>
742N/A<body>
742N/A${next.body(g_vars)}
742N/A<%include file="${self.shared.ltipath(g_vars, 'body_end.shtml')}"
742N/A args="g_vars=g_vars"/>\
742N/A</body>
742N/A</html>