messageboxes fully implemented
there are 3 types: error, information and warning git-svn-id: http://yolanda.mister-muffin.de/svn@115 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
1de3dba3e3
commit
f12588fbc8
4 changed files with 39 additions and 6 deletions
|
@ -32,6 +32,15 @@
|
||||||
<str id="query_mostdownloads">most downloads</str>
|
<str id="query_mostdownloads">most downloads</str>
|
||||||
<str id="query_bestrated">best rated</str>
|
<str id="query_bestrated">best rated</str>
|
||||||
|
|
||||||
|
<!-- errors -->
|
||||||
|
<str id="error_202c">Error 202c - Access forbidden by government.</str>
|
||||||
|
|
||||||
|
<!-- information -->
|
||||||
|
<str id="information_logged_in">You are now logged in.</str>
|
||||||
|
<str id="information_logged_out">You are now logged out.</str>
|
||||||
|
|
||||||
|
<!-- warnings -->
|
||||||
|
|
||||||
<!-- results page-->
|
<!-- results page-->
|
||||||
<str id="results_for_query">results for query</str>
|
<str id="results_for_query">results for query</str>
|
||||||
|
|
||||||
|
|
|
@ -64,13 +64,23 @@ div
|
||||||
|
|
||||||
div.messagebox
|
div.messagebox
|
||||||
{
|
{
|
||||||
background-color: #90f090;
|
|
||||||
border-color: #606060;
|
border-color: #606060;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
margin: 1.5em;
|
margin: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.messagebox#error,
|
||||||
|
div.messagebox#warning
|
||||||
|
{
|
||||||
|
background-color: #f09090;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.messagebox#information
|
||||||
|
{
|
||||||
|
background-color: #90f090;
|
||||||
|
}
|
||||||
|
|
||||||
div.messagebox img
|
div.messagebox img
|
||||||
{
|
{
|
||||||
margin: 0.5em;
|
margin: 0.5em;
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
<page
|
<page
|
||||||
locale="en-US"
|
locale="en-US"
|
||||||
message="error_http_404"
|
|
||||||
stylesheet="./style/gnutube.css"
|
stylesheet="./style/gnutube.css"
|
||||||
username="pedobear@myopenid.net"
|
username="pedobear@myopenid.net"
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:cc="http://web.resource.org/cc/"
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
>
|
>
|
||||||
|
<message type="information" text="information_logged_in" />
|
||||||
<video>
|
<video>
|
||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="./videos/zwobot-01-test.ogg">
|
<cc:Work rdf:about="./videos/zwobot-01-test.ogg">
|
||||||
|
|
|
@ -133,7 +133,6 @@
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<xsl:call-template name="messagebox"/>
|
|
||||||
<xsl:apply-templates />
|
<xsl:apply-templates />
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
@ -230,11 +229,26 @@
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="messagebox">
|
<xsl:template match="message">
|
||||||
|
|
||||||
<div class="messagebox">
|
<div class="messagebox">
|
||||||
|
<xsl:attribute name="id">
|
||||||
|
<xsl:value-of select="@type" />
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@type='error'">
|
||||||
|
<img src="./images/tango/dialog-error.png" />
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="@type='information'">
|
||||||
<img src="./images/tango/dialog-information.png" />
|
<img src="./images/tango/dialog-information.png" />
|
||||||
<span style="information">You are now logged in as "pedobear".</span>
|
</xsl:when>
|
||||||
|
<xsl:when test="@type='warning'">
|
||||||
|
<img src="./images/tango/dialog-warning.png" />
|
||||||
|
</xsl:when>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:variable name="messagetext" select="@text" />
|
||||||
|
<xsl:value-of select="$locale_strings/str[@id=$messagetext]" />
|
||||||
|
<!-- probably one can do this on one line, dunno how -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
Loading…
Reference in a new issue