Index: openacs-4/packages/new-portal/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/index.adp 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,18 @@ + +Welcome to Portals + + + + You have not configured any portals. Create a portal now + + + + + Goto portal @users_portals.name@ (edit|delete) + +
+
+ + + Create another portal + Index: openacs-4/packages/new-portal/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/index.tcl 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,23 @@ +# www/index.tcl + +ad_page_contract { + Page that displays a list of the user's portals and gives + the option to create a new/additional portal + + @author Arjun Sanyal (arjun@openforce.net) + @creation-date + @cvs-id $Id: index.tcl,v 1.1 2001/12/10 20:27:23 oracle Exp $ +} { } + + +set user_id [ad_conn user_id] +set master_template [ad_parameter master_template] + +set query "select + portal_id, name + from portals" + +template::query get_users_portals users_portals multirow $query + +ad_return_template + Index: openacs-4/packages/new-portal/www/admin/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/Attic/master.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/master.adp 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,8 @@ + + +

@title@

+ +
+ +
+<%= [ad_footer] %> Index: openacs-4/packages/new-portal/www/admin/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/Attic/master.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/master.tcl 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,27 @@ +# www/master.tcl + +ad_page_contract { + Portal master template. + + @author Arjun Sanyal + @creation-date 9/28/2001 + @cvs-id $Id: master.tcl,v 1.1 2001/12/10 20:27:23 oracle Exp $ +} + +# This could be implemented entirely using the default master if it +# supplied a method for adding stuff to the document header. I heard +# somewhere that it will soon, so maybe we'll switch to doing that +# soon. + +set css_path [ad_parameter css_path] + +if { [exists_and_not_null css_path] } { + # if it starts with a "/", it's outside of this package. + if { [regexp {^/} $css_path] } { + set extra_stuff "" + } else { + set extra_stuff "" + } +} else { + set extra_stuff {} +} Index: openacs-4/packages/new-portal/www/admin/portal-config-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/portal-config-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/portal-config-2.tcl 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,18 @@ +# www/element-layout-2.tcl +ad_page_contract { + Do the actual moving/removing of the elements, or redirect to add. + + @author Arjun Sanyal + @creation-date 9/28/2001 + @cvs_id $Id: portal-config-2.tcl,v 1.1 2001/12/10 20:27:23 oracle Exp $ +} { } + +set form [ns_getform] +set portal_id [ns_set get $form portal_id] + +set user_id [ad_conn user_id] + +portal::configure_dispatch $portal_id $form + +ns_returnredirect "portal-config?portal_id=$portal_id" + Index: openacs-4/packages/new-portal/www/admin/portal-config.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/portal-config.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/portal-config.adp 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,5 @@ + +Configure page: @name@ +

+ +@rendered_page@ Index: openacs-4/packages/new-portal/www/admin/portal-config.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/portal-config.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/portal-config.tcl 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,18 @@ +# www/portal-config.tcl + +ad_page_contract { + Main configuration page for a portal + + @author Arjun Sanyal (arjun@openforce.net) + @creation-date 10/20/2001 + @cvs-id $Id: portal-config.tcl,v 1.1 2001/12/10 20:27:23 oracle Exp $ +} { + portal_id:naturalnum,notnull +} + +# Get the portal's name for the title +set name [portal::get_name $portal_id] + +set rendered_page [portal::configure $portal_id "index.tcl"] + +ad_return_template Index: openacs-4/packages/new-portal/www/admin/portal-show.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/admin/portal-show.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/admin/portal-show.tcl 10 Dec 2001 20:27:23 -0000 1.1 @@ -0,0 +1,17 @@ +# www/show-portal.tcl + +ad_page_contract { + Just a test script to display the portal. + + @author AKS + @creation-date + @cvs-id $Id: portal-show.tcl,v 1.1 2001/12/10 20:27:23 oracle Exp $ +} { + portal_id:naturalnum,notnull +} + + + +ns_return 200 text/html [portal::render $portal_id] + +