richter 2005/08/13 09:53:24
Modified: . Changes.pod
eg/web base.epl epwebapp.pl podbase.xsl
eg/webutil db.schema
Log:
- Updated xsl stylesheet and css styles of website for better display
of code sections.
- Updated db/epwebapp.pl to make it more robust and fix some minor bugs
and also allows to set edit and view_level (anonymous, login, admin)
for every table.
Revision Changes Path
1.286 +5 -1 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -r1.285 -r1.286
--- Changes.pod 9 Aug 2005 05:12:19 -0000 1.285
+++ Changes.pod 13 Aug 2005 16:53:24 -0000 1.286
@@ -5,7 +5,11 @@
- http headers from %http_headers_out will now also be send when the
init method of an application object return non zero (e.g. 302 for
redirect).
-
+ - Updated xsl stylesheet and css styles of website for better display
+ of code sections.
+ - Updated db/epwebapp.pl to make it more robust and fix some minor bugs
+ and also allows to set edit and view_level (anonymous, login, admin)
+ for every table.
=head4 2.0rc5 7. August 2005
1.5 +1 -3 embperl/eg/web/base.epl
Index: base.epl
===================================================================
RCS file: /home/cvs/embperl/eg/web/base.epl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- base.epl 2 Jan 2003 07:39:44 -0000 1.4
+++ base.epl 13 Aug 2005 16:53:24 -0000 1.5
@@ -42,9 +42,7 @@
.cListOnlyText {[+ $base12 +] }
.cItemText {[+ $base14 +] font-weight: bold; }
.cPodVerbatim {font-family: monospace; font-size: 12px;
background: #eeeeee;
- border-left: solid 1px black; border-right:
solid 1px black;
- padding-top: 3px}
-
+ border: solid 1px black; padding: 13px;
margin: 20px 40px 20px 40px}
.cFoot {[+ $base10 +]}
body {[+ $base12 +]}
1.10 +6 -5 embperl/eg/web/epwebapp.pl
Index: epwebapp.pl
===================================================================
RCS file: /home/cvs/embperl/eg/web/epwebapp.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- epwebapp.pl 7 Aug 2005 15:59:09 -0000 1.9
+++ epwebapp.pl 13 Aug 2005 16:53:24 -0000 1.10
@@ -5,8 +5,6 @@
use Embperl::Recipe::EmbperlPODXSLT ;
use Embperl::Constant ;
-use Data::Dumper ;
-
sub fill_menu
@@ -263,15 +261,18 @@
my ($class, $r, $config, $param) = @_ ;
$config -> xsltstylesheet('pod.xsl') ;
+ my $page = $fdat{page} || 0 ;
$r -> param -> uri =~ /^.*\/(.*)\.(.*?)$/ ;
- $param -> xsltparam({
- page => $fdat{page} || 0,
+ my $p = {
+ page => "'$page'",
basename => "'$1'",
extension => "'$2'",
imageuri => "'$r->{imageuri}'",
baseuri => "'$r->{baseuri}'",
language => "'" . $r -> param -> language . "'" ,
- }) ;
+ } ;
+
+ $param -> xsltparam($p) ;
}
1.4 +25 -31 embperl/eg/web/podbase.xsl
Index: podbase.xsl
===================================================================
RCS file: /home/cvs/embperl/eg/web/podbase.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- podbase.xsl 8 Jan 2003 07:42:48 -0000 1.3
+++ podbase.xsl 13 Aug 2005 16:53:24 -0000 1.4
@@ -81,45 +81,39 @@
<!-- - - - - code - - - - -->
- <!--
+<!--
<xsl:template match="verbatim">
- <xsl:if test="not(preceding-sibling::node()[position() =
2][name()='verbatim'])">
- <table width="100%" cellpadding="10">
- <tr>
+ <xsl:if test="not(preceding-sibling::node()[1][name()='verbatim'])">
+ <table width="100%" cellspacing="0"><tr>
<td width="5%"><xsl:text
disable-output-escaping="yes">&nbsp;</xsl:text></td>
- <td class="cPodVerbatim" width="90%">
- <pre class="cPodVerbatim"><xsl:value-of select="."/>
-
- <xsl:apply-templates
select="following-sibling::node()[position() < 3][name()='verbatim']"
mode="verbatim"/>
+ <td class="cPodVerbatim" width="90%">
+ <br/><pre>
+ <xsl:apply-templates/>
+ <xsl:apply-templates
select="following-sibling::node()[1][name()='verbatim']" mode="verbatim"/>
</pre>
</td>
<td width="5%"><xsl:text
disable-output-escaping="yes">&nbsp;</xsl:text></td>
- </tr>
- </table>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="verbatim" mode="verbatim">
- <xsl:value-of select="."/>
- <xsl:apply-templates
select="following-sibling::node()[position() < 3][name()='verbatim']"
mode="verbatim"/>
+ </tr></table>
+ </xsl:if>
</xsl:template>
- -->
+-->
<xsl:template match="verbatim">
- <table width="100%" cellspacing="0"><tr>
- <td width="5%"><xsl:text
disable-output-escaping="yes">&nbsp;</xsl:text></td>
- <td class="cPodVerbatim" width="90%">
- <br/><pre>
- <xsl:apply-templates/>
+ <xsl:if test="not(preceding-sibling::node()[1][name()='verbatim'])">
+ <pre class="cPodVerbatim">
+ <xsl:apply-templates/>
+ <xsl:apply-templates
select="following-sibling::node()[1][name()='verbatim']" mode="verbatim"/>
</pre>
- </td>
- <td width="5%"><xsl:text
disable-output-escaping="yes">&nbsp;</xsl:text></td>
- </tr></table>
+ </xsl:if>
</xsl:template>
+
<xsl:template match="verbatim" mode="verbatim">
- <xsl:value-of select="."/>
- <xsl:apply-templates
select="following-sibling::node()[position() < 3][name()='verbatim']"
mode="verbatim"/>
+ <xsl:text>
+
+</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:apply-templates
select="following-sibling::node()[1][name()='verbatim']" mode="verbatim"/>
</xsl:template>
<!-- - - - - link - - - - -->
@@ -158,16 +152,16 @@
<a
href="{$basename}.-page-{$page}-.{$extension}"><xsl:value-of select="$txt"/></a>
</xsl:when>
<xsl:otherwise>
- <xsl:variable name="page">
+ <xsl:variable name="page2">
<xsl:apply-templates
select="//sect1[sect2/title=$uri]" mode="number"/>
</xsl:variable>
- <xsl:variable name="sect">
+ <xsl:variable name="sect2">
<xsl:apply-templates
select="//sect2[title=$uri]" mode="number"/>
</xsl:variable>
<xsl:choose>
- <xsl:when test="$page!=''">
- <a
href="{$basename}.-page-{$page}-.{$extension}#sect_{$sect}"><xsl:value-of
select="$txt"/></a>
+ <xsl:when test="$page2!=''">
+ <a
href="{$basename}.-page-{$page2}-.{$extension}#sect_{$sect2}"><xsl:value-of
select="$txt"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
1.7 +7 -4 embperl/eg/webutil/db.schema
Index: db.schema
===================================================================
RCS file: /home/cvs/embperl/eg/webutil/db.schema,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- db.schema 7 Aug 2005 15:59:09 -0000 1.6
+++ db.schema 13 Aug 2005 16:53:24 -0000 1.7
@@ -133,10 +133,15 @@
'id' => 'counter',
'state' => 'integer',
'table_type' => 'tinytext',
- 'viev_level' => 'integer',
+ 'view_level' => 'integer',
'edit_level' => 'integer',
],
'!PrimKey' => 'id',
+ '!Default' =>
+ {
+ 'view_level' => 0,
+ 'edit_level' => 1,
+ },
'!Init' =>
[
{ id => 1, state => 1, 'table_type' => 'item', edit_level => 2 }
,
@@ -265,8 +270,6 @@
{ id => 11, category_id => 6, language_id => 'de', 'category' =>
'Module und Beispiele für Embperl' } ,
{ id => 12, category_id => 6, language_id => 'en', 'category' =>
'Modules and examples for Embperl' } ,
- { id => 13, category_id => 7, language_id => 'de', 'category' =>
'Was ist Foobar?!?' } ,
- { id => 14, category_id => 7, language_id => 'en', 'category' =>
'What is foobar?!?' } ,
],
},
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]