Index: openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl 13 Mar 2007 10:27:31 -0000 1.1 @@ -0,0 +1,232 @@ +ad_library { + XoWiki - adp generator procs: remove redundancy in adp files by generating it + + @creation-date 2007-03-13 + @author Gustaf Neumann + @cvs-id $Id: adp-generator-procs.tcl,v 1.1 2007/03/13 10:27:31 gustafn Exp $ +} + + +namespace eval ::xowiki { + + Class ADP_Generator -parameter { + {master 1} + {wikicmds 1} + {footer 1} + {recreate 0} + {extra_header_stuff ""} + } + + ADP_Generator instproc ajax_tag_definition {} { + # if we have no footer, we have no tag form + if {![my footer]} {return ""} + + return {} + } + + ADP_Generator instproc master_part {} { + return [subst -novariables -nobackslashes \ +{ + @title;noquote@ + @context;noquote@ + @header_stuff;noquote@[my extra_header_stuff] + + [my ajax_tag_definition] + }]\n + } + + ADP_Generator instproc wikicmds_part {} { + if {![my wikicmds]} {return ""} + return {
+ #xowiki.edit# · + #xotcl-core.revisions# · + #xowiki.new# · + #xowiki.delete# · + #xowiki.admin# · + #xowiki.notifications# + @notification_image;noquote@ · + #xowiki.search# · + #xowiki.index# + +
} + } + + ADP_Generator instproc footer_part {} { + if {![my footer]} {return ""} + return {
+
+ +
Digg!
+
+ +
Add to your del.icio.usdel.icio.us
+
+ +
+Add to My Yahoo!
+
+ +#xowiki.references_label# @references;noquote@ @lang_links.found;noquote@
+
+ +#xowiki.create_this_page_in_language# @lang_links.undefined;noquote@
+
+ +#xowiki.your_tags_label#: @tags_with_links;noquote@ +(#xowiki.edit_link#, +#xowiki.popular_tags_link#) + +
+
+ +Categories: @per_object_categories_with_links;noquote@ + +
+ +

#general-comments.Comments# +

+
+ +

@gc_link;noquote@

+
} + } + + ADP_Generator instproc content_part {} { + return "@top_portlets;noquote@\n@content;noquote@" + } + + + ADP_Generator instproc generate {} { + my instvar master wikicmds footer + set _ "\n" + + # if we include the master, we include the primitive js function + if {$master} { + append _ [my master_part] + } + + append _ \ +{ + +
} \n + + append _ [my wikicmds_part] \n + append _ [my content_part] \n + append _ [my footer_part] \n + append _ "
\n" + } + + ADP_Generator instproc init {} { + set name [namespace tail [self]] + set filename [file dirname [info script]]/../www/$name.adp + # generate the adp file, if it does not exist + if {![file exists $filename]} { + set f [open $filename w] + puts -nonewline $f [my generate] + close $f + } + my destroy_on_cleanup + } + + ADP_Generator create view-plain -master 0 -wikicmds 0 -footer 0 + ADP_Generator create view-links -master 0 -footer 0 + ADP_Generator create view-default -master 1 -footer 1 + + ADP_Generator create oacs-view -master 1 -footer 1 \ + -extra_header_stuff { + + + } \ + -proc content_part {} { + return [subst -novariables -nobackslashes \ +{
+
+ +
+
+[next] +
+}] + } + + # + # similar to oacs view (categories left), but having as well a right bar + # + ADP_Generator create oacs-view2 -master 1 -footer 1 \ + -extra_header_stuff { + + + + } \ + -proc content_part {} { + return [subst -novariables -nobackslashes \ +{
+
+ +
+
+
+[next] +
+ +
+}] + } + +#{{adp portlets/weblog-mini-calendar {page weblog}}} +#{{tags -decoration plain -page weblog-portlet}} +#{{tags -popular 1 -limit 30 -decoration plain -page weblog-portlet}} + + +} Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -N -r1.48 -r1.49 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 9 Mar 2007 18:29:50 -0000 1.48 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 13 Mar 2007 10:27:31 -0000 1.49 @@ -102,7 +102,7 @@ prototypes 1 ressources 1 revisions 1 - view-default view-links view-plain oacs-view + view-default 1 view-links 1 view-plain 1 oacs-view 1 } Package ad_instproc pretty_link { Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v diff -u -N -r1.25 -r1.26 --- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 12 Mar 2007 08:03:38 -0000 1.25 +++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 13 Mar 2007 10:27:31 -0000 1.26 @@ -88,6 +88,12 @@ set id [expr {[my exists id] ? "id='[my id]'" : ""}] return "
[next]
" } + + Class ::xowiki::portlet::decoration=rightbox -instproc render {} { + set class [namespace tail [my info class]] + set id [expr {[my exists id] ? "id='[my id]'" : ""}] + return "
[next]
" + } } namespace eval ::xowiki::portlet { @@ -193,8 +199,6 @@ $cattree($plevel) add $c set category($cid) $c lappend categories $cid - #set itemobj [Object new -set name en:index -set title MyTitle -set prefix "" -set suffix ""] - #$cattree(0) add_to_category -category $c -itemobj $itemobj -orderby title } set sql "category_object_map c, cr_items ci, cr_revisions r, xowiki_page p \ @@ -503,7 +507,7 @@ # Class create presence \ -superclass ::xowiki::Portlet \ - -parameter {{__decoration plain}} + -parameter {{__decoration rightbox}} # TODO make display style -decoration Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -N -r1.41 -r1.42 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 8 Mar 2007 12:05:32 -0000 1.41 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 13 Mar 2007 10:27:31 -0000 1.42 @@ -7,6 +7,7 @@ @cvs-id $Id$ } + namespace eval ::xowiki { Page instproc view {} { @@ -498,4 +499,4 @@ return $out } -} +} \ No newline at end of file Index: openacs-4/packages/xowiki/www/oacs-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/oacs-view.adp,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/xowiki/www/oacs-view.adp 30 Jan 2007 11:46:55 -0000 1.21 +++ openacs-4/packages/xowiki/www/oacs-view.adp 13 Mar 2007 10:27:32 -0000 1.22 @@ -1,11 +1,13 @@ + @title;noquote@ @context;noquote@ @header_stuff;noquote@ - - - - + + + - - - + + - -
@top_portlets;noquote@ -@content;noquote@
+
+@top_portlets;noquote@ +@content;noquote@ +
+
-
+
Digg!
@@ -67,7 +69,6 @@
Add to My Yahoo!
-
#xowiki.references_label# @references;noquote@ @lang_links.found;noquote@
@@ -86,7 +87,7 @@ Categories: @per_object_categories_with_links;noquote@ -

+

#general-comments.Comments#

    @gc_comments;noquote@

Index: openacs-4/packages/xowiki/www/oacs-view2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/oacs-view2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/oacs-view2.adp 13 Mar 2007 10:27:32 -0000 1.1 @@ -0,0 +1,122 @@ + + + @title;noquote@ + @context;noquote@ + @header_stuff;noquote@ + + + + + + + + + +
+ +
+
+ +
+
+
+@top_portlets;noquote@ +@content;noquote@ +
+ +
+ +
+
+ +
Digg!
+
+ + + + +
+Add to My Yahoo!
+
+ +#xowiki.references_label# @references;noquote@ @lang_links.found;noquote@
+
+ +#xowiki.create_this_page_in_language# @lang_links.undefined;noquote@
+
+ +#xowiki.your_tags_label#: @tags_with_links;noquote@ +(#xowiki.edit_link#, +#xowiki.popular_tags_link#) + +
+
+ +Categories: @per_object_categories_with_links;noquote@ + +
+ +

#general-comments.Comments# +

    @gc_comments;noquote@

+
+ +

@gc_link;noquote@

+
+
Index: openacs-4/packages/xowiki/www/view-default.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/view-default.adp,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/xowiki/www/view-default.adp 30 Jan 2007 11:46:59 -0000 1.17 +++ openacs-4/packages/xowiki/www/view-default.adp 13 Mar 2007 10:27:32 -0000 1.18 @@ -1,9 +1,10 @@ + @title;noquote@ @context;noquote@ @header_stuff;noquote@ - - - - + +
@top_portlets;noquote@ @content;noquote@ -
+
Digg!
Index: openacs-4/packages/xowiki/www/view-links.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/view-links.adp,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/xowiki/www/view-links.adp 9 Jan 2007 18:53:39 -0000 1.7 +++ openacs-4/packages/xowiki/www/view-links.adp 13 Mar 2007 10:27:32 -0000 1.8 @@ -1,17 +1,22 @@ + + + Index: openacs-4/packages/xowiki/www/view-plain.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/view-plain.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/xowiki/www/view-plain.adp 9 Jan 2007 18:53:39 -0000 1.3 +++ openacs-4/packages/xowiki/www/view-plain.adp 13 Mar 2007 10:27:32 -0000 1.4 @@ -1,3 +1,9 @@ + + +
+ +@top_portlets;noquote@ @content;noquote@ -
+ +
Index: openacs-4/packages/xowiki/www/resources/xowiki.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/xowiki.css,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/xowiki/www/resources/xowiki.css 30 Jan 2007 11:36:07 -0000 1.15 +++ openacs-4/packages/xowiki/www/resources/xowiki.css 13 Mar 2007 10:27:32 -0000 1.16 @@ -103,7 +103,7 @@ a:visited.rss {color: #FFF} a:link.rss {color: #FFF} -div.presence {float:right; right: 1em; clear: right; font-size: 75%; padding: 5px; +div.rightbox {float:right; right: 1em; clear: right; font-size: 75%; padding: 5px; border:dotted; border-width:1px;background: #f8f8f8 } div.presence h1 {font-size: 90%; margin-bottom: 0px}