Index: openacs-4/packages/content-includelet/content-includelet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/content-includelet.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/content-includelet/content-includelet.info 30 Aug 2008 00:31:47 -0000 1.3 +++ openacs-4/packages/content-includelet/content-includelet.info 30 Aug 2008 21:20:05 -0000 1.4 @@ -7,13 +7,13 @@ f f - + OpenACS 2008-07-11 OpenACS 0 - + Index: openacs-4/packages/content-includelet/catalog/content-includelet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/catalog/content-includelet.en_US.ISO-8859-1.xml,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/content-includelet/catalog/content-includelet.en_US.ISO-8859-1.xml 30 Aug 2008 00:31:48 -0000 1.1 +++ openacs-4/packages/content-includelet/catalog/content-includelet.en_US.ISO-8859-1.xml 30 Aug 2008 21:20:05 -0000 1.2 @@ -8,6 +8,7 @@ Delete Description Edit + Edit_Content You can update the title and content of this page below. Clicking on "OK" will make a new revision which will appear first in the list of revisions for this content portlet. Afterwards, you can review the changes made by clicking on "View". Clicking on "Publish" will then make the currently viewed version of the content "live". ID Live Version Index: openacs-4/packages/content-includelet/lib/content-includelet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/lib/content-includelet.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/content-includelet/lib/content-includelet.adp 11 Jul 2008 16:38:55 -0000 1.1 +++ openacs-4/packages/content-includelet/lib/content-includelet.adp 30 Aug 2008 21:20:05 -0000 1.2 @@ -4,7 +4,7 @@

- Edit Content + #content-includelet.Edit_Content#

Index: openacs-4/packages/content-includelet/tcl/content-includelet-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/tcl/content-includelet-callback-procs.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/content-includelet/tcl/content-includelet-callback-procs.tcl 11 Jul 2008 16:38:55 -0000 1.1 +++ openacs-4/packages/content-includelet/tcl/content-includelet-callback-procs.tcl 30 Aug 2008 21:20:05 -0000 1.2 @@ -7,7 +7,7 @@ } -ad_proc -public -callback search::datasource -impl content_portlet_revision {} { +ad_proc -public -callback search::datasource -impl content_includelet_revision {} { @author dhogaza@pacifier.com @creation_date 2007-11-15 @@ -17,11 +17,7 @@ search engine. } { - db_1row q { - select publish_date, data - from cr_revisionsi - where revision_id = :object_id - } + db_1row datasource { } return [list object_id $object_id \ title "" \ content $data \ @@ -30,7 +26,7 @@ mime text/html] } -ad_proc -public -callback search::url -impl content_portlet_revision {} { +ad_proc -public -callback search::url -impl content_includelet_revision {} { @author dhogaza@pacifier.com @@ -39,25 +35,11 @@ returns a url for a content portlet } { - db_1row q { - select s.node_id - from site_nodes s, site_nodes s1, cr_revisions r, cr_items i - where r.revision_id = :object_id - and i.item_id = r.item_id - and s1.object_id = i.parent_id - and s.node_id = s1.parent_id - } - db_1row q { - select p.element_id - from portal_element_parameters p, cr_revisions r - where r.revision_id = :object_id - and p.key = 'content_id' - and p.value = r.item_id - } - set page_id [portal::element::get_page_id -element_id $element_id] - array set page [portal::page::get -page_id $page_id] + db_1row node_id {} + db_1row element_id {} + set page_id [layout::element::get_page_id -element_id $element_id] + array set page [layout::page::get -page_id $page_id] set base [site_node::get_element -node_id $node_id -element url] - # Total kludge for The Learning Center - return [export_vars -base $base {{portal_id $page(portal_id)} {page_num $page(sort_key)}}] + return [export_vars -base $base {{pageset_id $page(pageset_id)} {page_num $page(sort_key)}}] } Index: openacs-4/packages/content-includelet/tcl/content-includelet-callback-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/tcl/content-includelet-callback-procs.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/content-includelet/tcl/content-includelet-callback-procs.xql 30 Aug 2008 21:20:05 -0000 1.1 @@ -0,0 +1,34 @@ + + + + + + + select publish_date, data + from cr_revisionsi + where revision_id = :object_id + + + + + + select s.node_id + from site_nodes s, site_nodes s1, cr_revisions r, cr_items i + where r.revision_id = :object_id + and i.item_id = r.item_id + and s1.object_id = i.parent_id + and s.node_id = s1.parent_id + + + + + + select p.element_id + from layout_element_parameters p, cr_revisions r + where r.revision_id = :object_id + and p.key like '%_id' + and p.value = r.item_id + + + +