742N/A## -*- coding: utf-8 -*-
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## See the License for the specific language governing permissions
742N/A## and limitations under the License.
742N/A## When distributing Covered Code, include this CDDL HEADER in each
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]
3158N/A## Copyright 2009, 2013 Oracle
and/or its affiliates. All rights reserved.
742N/A catalog = g_vars["catalog"]
742N/A config = g_vars["config"]
742N/A request = g_vars["request"]
742N/A<%def name="page_title(g_vars)"><%
742N/A return "Package Catalog"
2028N/A <p>Information about packages is not available when the server
2028N/A is operating in mirror mode.</p>
2028N/A <p>This package repository is empty or no default publisher has
2651N/A # Add an "All" selection so that user can view entire catalog.
2651N/A if versions and selected_val != "" and not selected_match:
742N/A # Either a version wasn't already selected, or the version
742N/A # provided didn't match a valid one, so default to the first in
2651N/A selected_match = versions[1][0]
2651N/A selected_val = versions[1][1]
742N/A <label for="version">Release and Branch</label>
742N/A <select id="version" name="version">
852N/A if val == selected_val:
742N/A attrs = 'selected="selected" '
742N/A <input id="submit-browse" type="submit"
742N/A name="action" value="Browse"/>
852N/A <input id="show-all-versions" type="checkbox"
852N/A name="show_all_versions" value="1"/>
852N/A <label for="show-all-versions" title="By
852N/A default, only the latest versions of packages are shown. To show all versions,
852N/A check this checkbox.">Show all versions</label>
2651N/A <input id="show-obsolete" type="checkbox"
2651N/A name="show_obsolete" value="1"/>
2651N/A <label for="show-obsolete" title="By
2651N/A default, obsolete packages are not shown. To show obsolete
2651N/A packages, check this checkbox.">Show obsolete packages</label>
2651N/A <input id="show-renamed" type="checkbox"
2651N/A name="show_renamed" value="1"/>
2651N/A <label for="show-renamed" title="By
2651N/A default, renamed packages are not shown. To show renamed
2651N/A packages, check this checkbox.">Show renamed packages</label>
1319N/A <input id="show-all-versions" type="checkbox"
1319N/A name="show_all_versions" value="1"/>
1319N/A <label for="show-all-versions" title="By
1319N/A default, only the latest versions of packages are shown. To show all versions,
1319N/A check this checkbox and click Refresh.">Show all versions</label>
2651N/A <input id="show-obsolete" type="checkbox"
2651N/A name="show_obsolete" value="1"/>
2651N/A <label for="show-obsolete" title="By
2651N/A default, obsolete packages are not shown. To show obsolete
2651N/A packages, check this checkbox.">Show obsolete packages</label>
2651N/A <input id="show-renamed" type="checkbox"
2651N/A name="show_renamed" value="1"/>
2651N/A <label for="show-renamed" title="By
2651N/A default, renamed packages are not shown. To show renamed
2651N/A packages, check this checkbox.">Show renamed packages</label>
1319N/A <input id="submit-browse" type="submit"
1319N/A name="action" value="Refresh"/>
742N/A <div class="yui-b results">
817N/A <table summary="A list of packages available in the repository
817N/A restricted by the specified listing criteria.">
742N/A # Output each FMRI that we have in the catalog.
852N/A if selected_val and selected_match:
2651N/A # Entries need to be in descending version order.
2651N/A% for pfmri, states in flist:
2651N/A if not show_all_versions and pkg_name in found:
2651N/A # For renames and obsoletes, only use package state for the
2651N/A # The pkg_name should only be added to the list of stems
2651N/A # to omit if the latest version of the package listed is
2651N/A # renamed or obsolete. If not all versions are being
2651N/A # shown, then this is the latest version.
2651N/A if not (show_renamed or show_obsolete):
2651N/A # Only possible states are OBSOLETE or RENAMED.
2651N/A if not show_all_versions or \
2651N/A if not show_all_versions or \
2651N/A if not show_all_versions or \
2651N/A if show_all_versions and pkg_name in omit_stems:
2651N/A # Terminal version found that is allowed by selected
2651N/A # filter criteria; so omit all versions of that package.
742N/A if rclass is None or rclass == ' class="odd"':
742N/A rclass = ' class="odd"'
1117N/A # XXX the .p5i extension is a bogus hack because
1117N/A # packagemanager requires it and shouldn't.
1117N/A <a title="Package Information Summary"
1117N/A title="Launch the Package Manager and install this package"
1117N/A href="${p5ihref}">Install</a>
1117N/A <a title="Package Manifest"
1117N/A href="${mhref}">Manifest</a>
2651N/A <td colspan="4" scope="row">${total} package(s)</td>