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.21.2.4 -r1.21.2.5 --- openacs-4/packages/news-portlet/news-portlet.info 22 Jun 2008 21:40:44 -0000 1.21.2.4 +++ openacs-4/packages/news-portlet/news-portlet.info 4 Aug 2008 12:06:52 -0000 1.21.2.5 @@ -7,14 +7,14 @@ f t - + OpenACS 2008-06-22 OpenACS - + - + 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.16.2.1 -r1.16.2.2 --- openacs-4/packages/news-portlet/www/news-portlet.adp 30 Jul 2008 13:30:35 -0000 1.16.2.1 +++ openacs-4/packages/news-portlet/www/news-portlet.adp 4 Aug 2008 12:06:52 -0000 1.16.2.2 @@ -18,32 +18,41 @@ %> - + + +
+ +
+ @notification_chunk;noquote@ + +
+ Subscribe via RSS#rss-support.Syndication_Feed# +
+
+
+
+ + - - - - - + - - + + + + + + - + #news-portlet.No_News# - #news-portlet.No_News# + + #new-portal.when_portlet_shaded# + - -

#news-portlet.Add_a_News_Item#

-
-
- - - #new-portal.when_portlet_shaded# - - 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.19.2.2 -r1.19.2.3 --- openacs-4/packages/news-portlet/www/news-portlet.tcl 29 Jul 2008 21:16:25 -0000 1.19.2.2 +++ openacs-4/packages/news-portlet/www/news-portlet.tcl 4 Aug 2008 12:06:52 -0000 1.19.2.3 @@ -45,7 +45,17 @@ 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" + + # add news email notification + set notification_chunk [notification::display::request_widget -type one_news_item_notif -object_id $package_id -pretty_name "News" -url [ad_return_url] ] +} + if { $inside_comm_p && $display_subgroup_items_p } { + db_foreach select_subgroup_package_ids {} { set one_instance_p 0 lappend list_of_package_ids $package_id @@ -59,54 +69,36 @@ set content_column "" } -template::list::create -name news -multirow news_items -key item_id -html {width 100%} -pass_properties { - display_item_content_p - one_instance_p -} -elements { - item { - label "" - html {valign top} - display_template { - @news_items.parent_name@
- - -

@news_items.publish_body;noquote@

- -

#news-portlet.Contributed_by# @news_items.item_creator@ - - - - » @news_items.publish_title@ - @news_items.publish_date@ - - - Subscribe via RSS -
- - } - } - action { - label "" - html {valign top} - display_template { - @news_items.notification_chunk;noquote@ - } - } -} - -db_multirow -extend { publish_date view_url rss_exists rss_url notification_chunk} news_items select_news_items {} { - set publish_date [lc_time_fmt $publish_date_ansi "%x"] +db_multirow -extend { publish_date view_url } news_items select_news_items {} { + set publish_date [lc_time_fmt $publish_date_ansi "%q"] set view_url [export_vars -base "${url}item" { item_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" - # add news email notification - set notification_chunk [notification::display::request_widget -type one_news_item_notif -object_id $package_id -pretty_name "News" -url [ad_return_url] ] - + # text-only body - if {$display_item_content_p && [string equal $html_p "f"]} { + if {$display_item_content_p && $html_p eq "f" } { set publish_body "[ad_text_to_html $publish_body]" } if { $display_item_attribution_p } { set creator_url [acs_community_member_url -user_id $creation_user] } } + +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 + + Index: openacs-4/packages/news-portlet/www/summary.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/summary.adp,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/news-portlet/www/summary.adp 15 May 2007 20:14:51 -0000 1.9 +++ openacs-4/packages/news-portlet/www/summary.adp 4 Aug 2008 12:06:52 -0000 1.9.2.1 @@ -3,7 +3,7 @@

@publish_body;noquote@ @more_link;noquote@ +

#news-portlet.Contributed_by# @item_creator@

-