mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Cleanup: Moved authlist template into own file
This commit is contained in:
parent
4cf821d592
commit
b7a10102d1
@ -25,6 +25,7 @@ nobase_dist_admin_DATA = \
|
|||||||
includes/mountnav.xsl \
|
includes/mountnav.xsl \
|
||||||
includes/player.xsl \
|
includes/player.xsl \
|
||||||
includes/playlist.xsl \
|
includes/playlist.xsl \
|
||||||
|
includes/authlist.xsl \
|
||||||
includes/web-page.xsl \
|
includes/web-page.xsl \
|
||||||
ui/confirmdeleteuser.xsl \
|
ui/confirmdeleteuser.xsl \
|
||||||
ui/confirmkillclient.xsl \
|
ui/confirmkillclient.xsl \
|
||||||
|
24
admin/includes/authlist.xsl
Normal file
24
admin/includes/authlist.xsl
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
|
<xsl:template name="authlist">
|
||||||
|
<ul>
|
||||||
|
<xsl:for-each select="authentication/role">
|
||||||
|
<li>Role
|
||||||
|
<xsl:if test="@name">
|
||||||
|
<xsl:value-of select="@name" />
|
||||||
|
</xsl:if>
|
||||||
|
of type <xsl:value-of select="@type" />
|
||||||
|
<xsl:if test="@management-url">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@can-adduser='true' or @can-deleteuser='true'">
|
||||||
|
(<a href="{@management-url}">Manage</a>)
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="@can-listuser='true'">
|
||||||
|
(<a href="{@management-url}">List</a>)
|
||||||
|
</xsl:when>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
|
</li>
|
||||||
|
</xsl:for-each>
|
||||||
|
</ul>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
@ -3,34 +3,10 @@
|
|||||||
<xsl:include href="includes/page.xsl"/>
|
<xsl:include href="includes/page.xsl"/>
|
||||||
<xsl:include href="includes/mountnav.xsl"/>
|
<xsl:include href="includes/mountnav.xsl"/>
|
||||||
<xsl:include href="includes/player.xsl"/>
|
<xsl:include href="includes/player.xsl"/>
|
||||||
|
<xsl:include href="includes/authlist.xsl"/>
|
||||||
|
|
||||||
<xsl:variable name="title">Active Mountpoints</xsl:variable>
|
<xsl:variable name="title">Active Mountpoints</xsl:variable>
|
||||||
|
|
||||||
<!-- Auth template -->
|
|
||||||
<xsl:template name="authlist">
|
|
||||||
<ul>
|
|
||||||
<xsl:for-each select="authentication/role">
|
|
||||||
<li>Role
|
|
||||||
<xsl:if test="@name">
|
|
||||||
<xsl:value-of select="@name" />
|
|
||||||
</xsl:if>
|
|
||||||
of type <xsl:value-of select="@type" />
|
|
||||||
<xsl:if test="@management-url">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="@can-adduser='true' or @can-deleteuser='true'">
|
|
||||||
(<a href="{@management-url}">Manage</a>)
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:when test="@can-listuser='true'">
|
|
||||||
(<a href="{@management-url}">List</a>)
|
|
||||||
</xsl:when>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:if>
|
|
||||||
</li>
|
|
||||||
</xsl:for-each>
|
|
||||||
</ul>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:template name="content">
|
<xsl:template name="content">
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2><xsl:value-of select="$title" /></h2>
|
<h2><xsl:value-of select="$title" /></h2>
|
||||||
|
@ -4,36 +4,12 @@
|
|||||||
<xsl:include href="includes/mountnav.xsl"/>
|
<xsl:include href="includes/mountnav.xsl"/>
|
||||||
<xsl:include href="includes/player.xsl"/>
|
<xsl:include href="includes/player.xsl"/>
|
||||||
<xsl:include href="includes/playlist.xsl"/>
|
<xsl:include href="includes/playlist.xsl"/>
|
||||||
|
<xsl:include href="includes/authlist.xsl"/>
|
||||||
|
|
||||||
<xsl:param name="param-showall" />
|
<xsl:param name="param-showall" />
|
||||||
<xsl:param name="param-has-mount" />
|
<xsl:param name="param-has-mount" />
|
||||||
<xsl:variable name="title">Server status</xsl:variable>
|
<xsl:variable name="title">Server status</xsl:variable>
|
||||||
|
|
||||||
<!-- Auth template -->
|
|
||||||
<xsl:template name="authlist">
|
|
||||||
<ul>
|
|
||||||
<xsl:for-each select="authentication/role">
|
|
||||||
<li>Role
|
|
||||||
<xsl:if test="@name">
|
|
||||||
<xsl:value-of select="@name" />
|
|
||||||
</xsl:if>
|
|
||||||
of type <xsl:value-of select="@type" />
|
|
||||||
<xsl:if test="@management-url">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="@can-adduser='true' or @can-deleteuser='true'">
|
|
||||||
(<a href="{@management-url}">Manage</a>)
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:when test="@can-listuser='true'">
|
|
||||||
(<a href="{@management-url}">List</a>)
|
|
||||||
</xsl:when>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:if>
|
|
||||||
</li>
|
|
||||||
</xsl:for-each>
|
|
||||||
</ul>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:template name="content">
|
<xsl:template name="content">
|
||||||
<h2>Server status</h2>
|
<h2>Server status</h2>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user