Files
votervue/xsl/budgetDetails.xsl
2026-07-03 15:46:56 -04:00

101 lines
3.2 KiB
XML

<?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"/>
<!--<meta http-equiv="refresh" content="60"></meta>-->
<!-- Parameters -->
<xsl:param name="VERSION">1.0</xsl:param>
<xsl:param name="PAGE-TITLE">Budgets Months</xsl:param>
<xsl:param name="PAGE-NAME">viewBudgetMonths</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-calendar3 me-2"/>
<xsl:value-of select="$PAGE-TITLE"/>
</div>
<div class="card-body">
<!-- Action Buttons -->
<div class="buttons mt-2 mb-2">
<button type="button" class="btn btn-sm btn-primary me-1 mb-1 btnDone">
<i class="bi bi-box-arrow-left me-2"/>Done</button>
</div>
<hr class="mt-3 mb-2"/>
<xsl:choose>
<xsl:when test="count(//budgetmonths/record) = 0">
<div class="fs-5 text-danger fw-bold fst-italic mt-3 ">
<xsl:text>There are no Budget Months to view...</xsl:text>
</div>
</xsl:when>
<xsl:otherwise>
<div class="table-wrapper table-responsive scrollable">
<table class="table table-sm table-striped table-hover base-table" id="budgetmonth-table">
<thead class="sticky-header" data-theme="{$THEME}">
<!--<th class="text-nowrap">Month</th>-->
</thead>
<tbody>
<xsl:apply-templates select="//budgetmonths"/>
</tbody>
</table>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</div>
</xsl:template>
<!-- Template for table rows -->
<xsl:template match="budgetmonths/record">
<tr class="hoverable budgetmonth-row" data-budgetmonth-serial="{budgetmonth_serial}">
<td class="budget_month">
<xsl:value-of select="budgetmonth_month_verbose"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>