Index: openacs-4/packages/faq-portlet/faq-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/faq-portlet.info,v diff -u -r1.6 -r1.7 --- openacs-4/packages/faq-portlet/faq-portlet.info 25 Feb 2002 20:37:51 -0000 1.6 +++ openacs-4/packages/faq-portlet/faq-portlet.info 6 Apr 2002 23:41:34 -0000 1.7 @@ -31,7 +31,6 @@ - Index: openacs-4/packages/faq-portlet/www/faq-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/Attic/faq-portlet-oracle.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/faq-portlet/www/faq-portlet-oracle.xql 29 Mar 2002 19:41:14 -0000 1.5 +++ openacs-4/packages/faq-portlet/www/faq-portlet-oracle.xql 6 Apr 2002 23:41:34 -0000 1.6 @@ -1,24 +1,24 @@ -oracle8.1.6 + oracle8.1.6 - - - select f.faq_id, f.faq_name - from acs_objects o, faqs f - where object_id = f.faq_id - and context_id = :package_id - - + + + select acs_objects.context_id as package_id, + (select apm_packages.instance_name + from apm_packages + where apm_packages.package_id = apm_package.parent_id(acs_objects.context_id)) as community_name, + (select site_node.url(site_nodes.node_id) + from site_nodes + where site_nodes.object_id = acs_objects.context_id) as url, + faqs.faq_id, + faqs.faq_name + from faqs, + acs_objects + where faqs.faq_id = acs_objects.object_id + and acs_objects.context_id in ([join $list_of_package_ids ", "]) + + - - - select 1 - from dual where exists (select 1 from acs_objects o, faqs f - where object_id = f.faq_id - and context_id = :package_id) - - - Index: openacs-4/packages/faq-portlet/www/faq-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/faq-portlet.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/faq-portlet/www/faq-portlet.adp 29 Mar 2002 19:25:19 -0000 1.4 +++ openacs-4/packages/faq-portlet/www/faq-portlet.adp 6 Apr 2002 23:41:34 -0000 1.5 @@ -18,26 +18,67 @@ %> - + - + - -
    +<% + set new_package_id "" + set old_package_id "" +%> + + + + + + + - - @data@ - - - + + + +<% set new_package_id $faqs(package_id) %> + + + + +
  • + @faqs.faq_name@ +
  • +
    + + + + + + + + + + + + +<% + set old_package_id $new_package_id +%> + + + + + + + +
    NameGroup
    @faqs.faq_name@@faqs.community_name@
    +
    + - No FAQs + No FAQs -   +  Index: openacs-4/packages/faq-portlet/www/faq-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/faq-portlet.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/faq-portlet/www/faq-portlet.tcl 29 Mar 2002 19:25:19 -0000 1.11 +++ openacs-4/packages/faq-portlet/www/faq-portlet.tcl 6 Apr 2002 23:41:34 -0000 1.12 @@ -27,99 +27,7 @@ array set config $cf set shaded_p $config(shaded_p) - -# Should be a list already! set list_of_package_ids $config(package_id) -set data "" +set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] -if {[llength $list_of_package_ids] == 1} { - set one_instance_p 1 -} else { - set one_instance_p 0 -} - -if {[ad_parameter community_level_p] == 1} { -# if i'm in a comm, have the list UI - - foreach package_id $list_of_package_ids { - - if { [db_string faq_q_and_as_count_select {} ] != 0 } { - - set comm_name [site_nodes::get_parent_name \ - -instance_id $package_id - ] - - set comm_url [dotlrn_community::get_url_from_package_id -package_id $package_id] - - set f_check [db_0or1row faqs_check {}] - - if {!$one_instance_p && $f_check} { - append data "
  • $comm_name" - append data "
      " - } - - db_foreach faqs_select {} { - append data "
    • $faq_name
      " - } - - if {!$one_instance_p && $f_check} { - append data "
    " - } - - } - } - -} else { - # i'm at /dotlrn, so have the table UI, hack - - # - # this seems broken, but it was working ystr - aks 3/18 - # - - - - set one_instance_p 1 - set data "" - set data_start " - - - - " - - foreach package_id $list_of_package_ids { - - set comm_url [dotlrn_community::get_url_from_package_id -package_id $package_id] - - set comm_name [site_nodes::get_parent_name \ - -instance_id $package_id - ] - - set count 0 - - db_foreach faqs_select {} { - - if {[expr $count % 2] == 0} { - append data "" - } else { - append data "" - } - - incr count - } - } - - set data_end "
    NameGroup
    $faq_name$comm_name
    $faq_name$comm_name
    " - - if {$count != 0} { - append $data_start $data $data_end - } - - -} - -# portlets shouldn't disappear anymore (ben) -if {[empty_string_p $data]} { - set no_faqs_p "t" -} else { - set no_faqs_p "f" -} +db_multirow faqs select_faqs {} Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/faq-portlet/www/faq-portlet.xql'. Fisheye: No comparison available. Pass `N' to diff?