#xowiki.edit# ·
#xotcl-core.revisions# ·
#xowiki.new# ·
Index: openacs-4/packages/xowiki/www/admin/portal-element-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/portal-element-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/xowiki/www/admin/portal-element-add.tcl 28 Jan 2007 23:03:26 -0000 1.1
@@ -0,0 +1,43 @@
+::xowiki::Package initialize -ad_doc {
+ Add an element to a given portal
+
+ @author Gustaf Neumann (gustaf.neumann@wu-wien.ac.at)
+ @creation-date Oct 23, 2005
+ @cvs-id $Id: portal-element-add.tcl,v 1.1 2007/01/28 23:03:26 gustafn Exp $
+
+ @param object_type show objects of this class and its subclasses
+} -parameter {
+ {-portal_id}
+ {-page_name}
+ {-referer .}
+}
+
+
+set page_id [$package_id resolve_request -path $page_name]
+set page_id [::Generic::CrItem lookup -name $page_name -parent_id [$package_id folder_id]]
+
+ns_log notice "we have page=$page_id\n::Generic::CrItem lookup -name $page_name -parent_id [$package_id folder_id]"
+db_transaction {
+ns_log notice "portal::add_element \
+ -portal_id $portal_id \
+ -portlet_name [xowiki_portlet::get_my_name] \
+ -pretty_name [$page_id title] \
+ -force_region [parameter::get_from_package_key \
+ -parameter xowiki_portal_content_force_region \
+ -package_key xowiki-portlet]"
+
+ set element_id [portal::add_element \
+ -portal_id $portal_id \
+ -portlet_name [xowiki_portlet::get_my_name] \
+ -pretty_name [$page_id title] \
+ -force_region [parameter::get_from_package_key \
+ -parameter "xowiki_portal_content_force_region" \
+ -package_key "xowiki-portlet"]
+ ]
+ portal::set_element_param $element_id package_id $package_id
+ portal::set_element_param $element_id page_name [$page_id name]
+}
+
+ad_returnredirect $referer
+ad_script_abort
+
Index: openacs-4/packages/xowiki/www/admin/portal-element-remove.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/portal-element-remove.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/xowiki/www/admin/portal-element-remove.tcl 28 Jan 2007 23:03:26 -0000 1.1
@@ -0,0 +1,19 @@
+::xowiki::Package initialize -ad_doc {
+ Add an element to a given portal
+
+ @author Gustaf Neumann (gustaf.neumann@wu-wien.ac.at)
+ @creation-date Oct 23, 2005
+ @cvs-id $Id: portal-element-remove.tcl,v 1.1 2007/01/28 23:03:26 gustafn Exp $
+
+} -parameter {
+ {-element_id}
+ {-portal_id}
+ {-referer .}
+}
+
+# permissions?
+portal::remove_element -element_id $element_id
+# redirect and abort
+ad_returnredirect $referer
+ad_script_abort
+
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 -r1.13 -r1.14
--- openacs-4/packages/xowiki/www/resources/xowiki.css 9 Jan 2007 11:05:58 -0000 1.13
+++ openacs-4/packages/xowiki/www/resources/xowiki.css 28 Jan 2007 23:03:26 -0000 1.14
@@ -5,8 +5,10 @@
#wikicmds {position: relative; top: -24px; right: 0px; height: 0px;
text-align: right; font-family: sans-serif; font-size: 85%;color: #7A7A78;}
-#portal #wikicmds {top: -90px}
-#page-body #wikicmds {top: -30px}
+/*#portal #wikicmds {top: -90px;}*/
+div.portlet #wikicmds {float: inherit ! important; top: 0px ! important; height: inherit;}
+#page-body #wikicmds {top: -30px;}
+
#wikicmds a, #wikicmds a:visited { color: #7A7A78; text-decoration: none;}
#wikicmds a:hover {text-decoration: underline;}
#wikicmds a:active {color: rgb(255,153,51);}