Files

96 lines
3.3 KiB
XML
Raw Permalink Normal View History

2026-07-03 15:46:56 -04:00
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="utf-8" indent="yes"/>
<!-- Parameters -->
<xsl:param name="VERSION">1.0</xsl:param>
<xsl:param name="PAGE-TITLE">My Subscriptions</xsl:param>
<xsl:param name="PAGE-NAME">userSubscriptions</xsl:param>
<!-- Main Template -->
<xsl:template match="/">
<script src="js/{$PAGE-NAME}.js?version={$VERSION}"/>
<div class="{$PAGE-NAME}">
<div class="card">
<div class="card-header bg-primary text-white p-1 ps-3">
<i class="bi bi-list-check me-2"/>
<xsl:value-of select="$PAGE-TITLE"/>
</div>
<div class="card-body">
<xsl:choose>
<xsl:when test="count(//usersubscriptions/record) = 0">
<div class="fs-5 text-danger fw-bold fst-italic mt-2 mb-2">
<xsl:text>There are no Subscriptions to view... Please Contact Support</xsl:text>
</div>
</xsl:when>
<xsl:otherwise>
<div class="table-wrapper table-responsive">
<table class="table table-sm table-striped table-hover base-table table-auto" id="usersubscription-table">
<thead class="sticky-header" data-theme="{$THEME}">
<th class="text-nowrap">Name</th>
<th class="text-nowrap">Start Date</th>
<th class="text-nowrap">End Date</th>
</thead>
<tbody>
<xsl:apply-templates select="//usersubscriptions"/>
</tbody>
</table>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</div>
</xsl:template>
<!-- Template for table rows -->
<xsl:template match="usersubscriptions/record">
<tr class="hoverable usersubscription-row" data-usersubscription-subscription="{usersubscription_subscription}" data-usersubscription-serial="{usersubscription_serial}">
<td class="subscription_title">
<xsl:value-of select="subscription_full_title"/>
</td>
<td class="usersubscription_start_date_verbose">
<xsl:value-of select="usersubscription_start_date_verbose"/>
</td>
<td class="usersubscription_end_date_verbose">
<xsl:value-of select="usersubscription_end_date_verbose"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>