mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-08 12:08:19 -05:00
docs: page.xsl: Convert repository edit URI into a parameter
Allow other sub-projects using the XSL template without modification. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -35,6 +35,7 @@ foreach data : html_xslt_gen
|
||||
'--stringparam', 'timestamp', docs_timestamp,
|
||||
'--stringparam', 'link_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'asset_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
|
||||
'--nonet',
|
||||
site_xsl,
|
||||
'@INPUT@',
|
||||
|
||||
@@ -103,6 +103,7 @@ foreach data : html_xslt_gen
|
||||
'--stringparam', 'timestamp', docs_timestamp,
|
||||
'--stringparam', 'link_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'asset_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
|
||||
'--nonet',
|
||||
site_xsl,
|
||||
'@INPUT@',
|
||||
|
||||
@@ -44,6 +44,7 @@ foreach data : html_xslt_gen
|
||||
'--stringparam', 'timestamp', docs_timestamp,
|
||||
'--stringparam', 'link_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'asset_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
|
||||
'--nonet',
|
||||
site_xsl,
|
||||
'@INPUT@',
|
||||
|
||||
@@ -55,6 +55,7 @@ foreach data : html_xslt_gen
|
||||
'--stringparam', 'timestamp', docs_timestamp,
|
||||
'--stringparam', 'link_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'asset_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
|
||||
'--nonet',
|
||||
site_xsl,
|
||||
'@INPUT@',
|
||||
|
||||
@@ -64,6 +64,7 @@ foreach data : html_xslt_gen
|
||||
'--stringparam', 'timestamp', docs_timestamp,
|
||||
'--stringparam', 'link_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'asset_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
|
||||
'--nonet',
|
||||
site_xsl,
|
||||
'@INPUT@',
|
||||
|
||||
@@ -154,6 +154,7 @@ foreach data : html_xslt_gen
|
||||
'--stringparam', 'timestamp', docs_timestamp,
|
||||
'--stringparam', 'link_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'asset_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
|
||||
'--nonet',
|
||||
site_xsl,
|
||||
'@INPUT@',
|
||||
|
||||
@@ -303,6 +303,7 @@ foreach data : html_xslt_gen
|
||||
'--stringparam', 'timestamp', docs_timestamp,
|
||||
'--stringparam', 'link_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'asset_href_base', data.get('href_base', ''),
|
||||
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
|
||||
'--nonet',
|
||||
site_xsl,
|
||||
'@INPUT@',
|
||||
|
||||
+3
-2
@@ -19,6 +19,7 @@
|
||||
<xsl:param name="timestamp"/>
|
||||
<xsl:param name="link_href_base"/>
|
||||
<xsl:param name="asset_href_base"/>
|
||||
<xsl:param name="edit_href_base"/>
|
||||
<xsl:text disable-output-escaping="yes"><!DOCTYPE html>
|
||||
</xsl:text>
|
||||
<html lang="en" data-sourcedoc="{$pagesrc}">
|
||||
@@ -105,11 +106,11 @@
|
||||
<li><a href="https://serverfault.com/questions/tagged/libvirt">serverfault</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<xsl:if test="$pagesrc != ''">
|
||||
<xsl:if test="$pagesrc != '' and $edit_href_base != ''">
|
||||
<div id="contribute">
|
||||
<h3>Contribute</h3>
|
||||
<ul>
|
||||
<li><a href="https://gitlab.com/libvirt/libvirt/-/blob/master/{$pagesrc}">edit this page</a></li>
|
||||
<li><a href="{$edit_href_base}{$pagesrc}">edit this page</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<xsl:with-param name="timestamp" select="$timestamp"/>
|
||||
<xsl:with-param name="link_href_base" select="$link_href_base"/>
|
||||
<xsl:with-param name="asset_href_base" select="$asset_href_base"/>
|
||||
<xsl:with-param name="edit_href_base" select="$edit_href_base"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user