Index: openacs-4/packages/news-portlet/news-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/news-portlet.info,v diff -u -r1.27.2.3 -r1.27.2.4 --- openacs-4/packages/news-portlet/news-portlet.info 1 Dec 2015 13:38:55 -0000 1.27.2.3 +++ openacs-4/packages/news-portlet/news-portlet.info 7 Jun 2016 10:16:56 -0000 1.27.2.4 @@ -9,14 +9,14 @@ f t - + OpenACS Portlet for the "new-portal" system for the news package 2015-10-04 DotLRN Consortium 2 - + @@ -26,6 +26,7 @@ + Index: openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/Attic/news-portlet-postgresql.xql,v diff -u -r1.4 -r1.4.10.1 --- openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql 8 Aug 2006 21:27:05 -0000 1.4 +++ openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql 7 Jun 2016 10:16:56 -0000 1.4.10.1 @@ -10,21 +10,20 @@ (select site_node__url(site_nodes.node_id) from site_nodes where site_nodes.object_id = news_items_approved.package_id) as url, - news_items_approved.item_id, - news_items_approved.publish_title, + item_id, + publish_title, to_char(news_items_approved.publish_date, 'YYYY-MM-DD HH24:MI:SS') as publish_date_ansi, item_creator, creation_user $content_column from news_items_approved - where news_items_approved.publish_date < current_timestamp - and (news_items_approved.archive_date >= current_timestamp or news_items_approved.archive_date is null) - and news_items_approved.package_id in ([join $list_of_package_ids ", "]) + where publish_date < current_timestamp + and (archive_date >= current_timestamp or archive_date is null) + and package_id in ([join $list_of_package_ids ", "]) order by package_id, parent_name, - news_items_approved.publish_date desc, - news_items_approved.publish_title - + publish_date desc, + publish_title Index: openacs-4/packages/news-portlet/www/news-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet.adp,v diff -u -r1.18.2.1 -r1.18.2.2 --- openacs-4/packages/news-portlet/www/news-portlet.adp 20 Sep 2015 16:09:57 -0000 1.18.2.1 +++ openacs-4/packages/news-portlet/www/news-portlet.adp 7 Jun 2016 10:16:56 -0000 1.18.2.2 @@ -22,15 +22,15 @@
- + object_id="@package_id;literal@" + pretty_name="News" + url="@news_url;literal@" > +
Subscribe via RSS#rss-support.Syndication_Feed# @@ -49,7 +49,24 @@
- + + + +

@news_items.parent_name@

+
+ +
    + +
  • + @news_items.publish_title@ + (#news-portlet.Contributed_by# @news_items.item_creator@ - @news_items.publish_date@) +
    @news_items.publish_lead@
    +
    @news_items.publish_body@
    +
  • +
    +
+
+
Index: openacs-4/packages/news-portlet/www/news-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet.tcl,v diff -u -r1.22.2.2 -r1.22.2.3 --- openacs-4/packages/news-portlet/www/news-portlet.tcl 20 Sep 2015 16:09:57 -0000 1.22.2.2 +++ openacs-4/packages/news-portlet/www/news-portlet.tcl 7 Jun 2016 10:16:56 -0000 1.22.2.3 @@ -26,6 +26,9 @@ array set config $cf set shaded_p $config(shaded_p) +if { $config(shaded_p)=="t" } { + return +} set news_url [ad_conn package_url] set comm_id [dotlrn_community::get_community_id_from_url -url $news_url] @@ -41,15 +44,30 @@ set list_of_package_ids $config(package_id) set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] -set display_item_content_p [parameter::get_from_package_key -package_key news-portlet -parameter display_item_content_p -default 0] -set display_subgroup_items_p [parameter::get_from_package_key -package_key news-portlet -parameter display_subgroup_items_p -default 0] -set display_item_attribution_p [parameter::get_from_package_key -package_key news-portlet -parameter display_item_attribution_p -default 1] +set display_item_content_p [parameter::get_from_package_key \ + -package_key news-portlet \ + -parameter display_item_content_p \ + -default 0] +set display_item_lead_p [parameter::get_from_package_key \ + -package_key news-portlet \ + -parameter display_item_lead_p \ + -default 1] +set display_subgroup_items_p [parameter::get_from_package_key \ + -package_key news-portlet \ + -parameter display_subgroup_items_p \ + -default 0] +set display_item_attribution_p [parameter::get_from_package_key \ + -package_key news-portlet \ + -parameter display_item_attribution_p \ + -default 1] + + if { $inside_comm_p } { set package_id $config(package_id) set rss_exists [rss_support::subscription_exists -summary_context_id $package_id -impl_name news] set rss_url "[news_util_get_url $package_id]rss/rss.xml" - set news_url [ad_return_url] + set news_url [news_util_get_url $package_id] if { $display_subgroup_items_p } { db_foreach select_subgroup_package_ids {} { @@ -59,17 +77,24 @@ } } +set content_column "" -if { $display_item_content_p } { - #Only pull out the full content if we have to. - set content_column " , content as publish_body, mime_type as publish_format " -} else { - set content_column "" +if { $display_item_content_p } { + lappend content_column publish_body publish_format } +if { $display_item_lead_p } { + lappend content_column publish_lead +} -db_multirow -extend { publish_date view_url } news_items select_news_items {} { +if {[llength $content_column] > 0 } { + set content_column ,[join $content_column ,] +} + +db_multirow -extend { publish_date view_url creator_url} news_items select_news_items {} { set publish_date [lc_time_fmt $publish_date_ansi "%q"] + if { [info exists ipackages($package_id)] } {set url $ipackages($package_id)} set view_url [export_vars -base "${url}item" { item_id }] + set creator_url "" # text-only body if {$display_item_content_p } { @@ -81,27 +106,6 @@ } } -set elms { - publish_date { - label "[_ news.Release_Date]" - } - publish_title { - label "[_ news.Title]" - link_url_col view_url - } -} - -if { !$inside_comm_p } { - lappend elms parent_name {label "[_ acs-kernel.Group]"} -} - -template::list::create -name news -multirow news_items -key item_id -pass_properties { - display_item_content_p - one_instance_p -} -elements $elms - - - # Local variables: # mode: tcl # tcl-indent-level: 4