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_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-->
|
||||
<str id="results_for_query">results for query</str>
|
||||
|
||||
|
|
|
@ -64,13 +64,23 @@ div
|
|||
|
||||
div.messagebox
|
||||
{
|
||||
background-color: #90f090;
|
||||
border-color: #606060;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
margin: 1.5em;
|
||||
}
|
||||
|
||||
div.messagebox#error,
|
||||
div.messagebox#warning
|
||||
{
|
||||
background-color: #f09090;
|
||||
}
|
||||
|
||||
div.messagebox#information
|
||||
{
|
||||
background-color: #90f090;
|
||||
}
|
||||
|
||||
div.messagebox img
|
||||
{
|
||||
margin: 0.5em;
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
<page
|
||||
locale="en-US"
|
||||
message="error_http_404"
|
||||
stylesheet="./style/gnutube.css"
|
||||
username="pedobear@myopenid.net"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
>
|
||||
<message type="information" text="information_logged_in" />
|
||||
<video>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="./videos/zwobot-01-test.ogg">
|
||||
|
|
|
@ -133,7 +133,6 @@
|
|||
|
||||
<hr />
|
||||
|
||||
<xsl:call-template name="messagebox"/>
|
||||
<xsl:apply-templates />
|
||||
|
||||
<div class="footer">
|
||||
|
@ -230,11 +229,26 @@
|
|||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="messagebox">
|
||||
<xsl:template match="message">
|
||||
|
||||
<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" />
|
||||
<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>
|
||||
|
||||
</xsl:template>
|
||||
|
|
Loading…
Reference in a new issue