Index: openacs-4/packages/news/www/item-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/Attic/item-postgresql.xql,v
diff -u -r1.5 -r1.5.4.1
--- openacs-4/packages/news/www/item-postgresql.xql 8 Aug 2006 21:27:04 -0000 1.5
+++ openacs-4/packages/news/www/item-postgresql.xql 31 Jul 2008 10:29:23 -0000 1.5.4.1
@@ -17,4 +17,12 @@
+
+
+ select content
+ from cr_revisions
+ where revision_id = :live_revision
+
+
+
Index: openacs-4/packages/news/www/item.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item.adp,v
diff -u -r1.14 -r1.14.2.1
--- openacs-4/packages/news/www/item.adp 15 May 2007 20:14:50 -0000 1.14
+++ openacs-4/packages/news/www/item.adp 31 Jul 2008 10:29:23 -0000 1.14.2.1
@@ -3,10 +3,7 @@
@context;noquote@
@title;noquote@
-
- #news.lt_Could_not_find_the_re#
-
-
+
-
-
- - @comment_link;noquote@
-
-
- - @edit_link;noquote@
-
-
-
-
-
-
-
-
-
+
+
+
+ - @footer_links;noquote@
+
+
+
\ No newline at end of file
Index: openacs-4/packages/news/www/item.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item.tcl,v
diff -u -r1.15 -r1.15.2.1
--- openacs-4/packages/news/www/item.tcl 15 May 2007 20:14:50 -0000 1.15
+++ openacs-4/packages/news/www/item.tcl 31 Jul 2008 10:29:23 -0000 1.15.2.1
@@ -35,17 +35,8 @@
# live view of a news item in its active revision
-set item_exist_p [db_0or1row one_item "
-select item_id,
- live_revision,
- publish_title,
- html_p,
- publish_date,
- '' || item_creator || '' as creator_link
-from news_items_live_or_submitted
-where item_id = :item_id"]
+set item_exist_p [db_0or1row one_item {}]
-
if { $item_exist_p } {
# workaround to get blobs with >4000 chars into a var, content.blob_to_string fails!
@@ -54,70 +45,53 @@
# RAL: publish_body is already snagged in the 1st query above for postgres.
#
set get_content [db_map get_content]
- if {![string match "" $get_content]} {
- set publish_body [db_string get_content "select content
- from cr_revisions
- where revision_id = :live_revision"]
+ if { $get_content ne "" } {
+ set publish_body [db_string get_content {}]
}
# text-only body
- if {[info exists html_p] && [string equal $html_p "f"]} {
- set publish_body [ad_text_to_html -- $publish_body]
+ if { !$html_p } {
+ set publish_body "[ad_text_to_html -- $publish_body]
"
}
+ # Footer actions
+ set footer_links [list]
+
if { [ad_parameter SolicitCommentsP "news" 0] &&
[ad_permission_p $item_id general_comments_create] } {
- set comment_link [general_comments_create_link $item_id "[ad_conn package_url]item?item_id=$item_id"]
- set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 \
- $item_id "[ad_conn package_url]item?item_id=$item_id"]
+
+ lappend footer_links [general_comments_create_link \
+ -link_attributes { class="button" } \
+ $item_id \
+ "[ad_conn package_url]item?item_id=$item_id"]
+
+ set comments [general_comments_get_comments \
+ -print_content_p 1 \
+ -print_attachments_p 1 \
+ $item_id "[ad_conn package_url]item?item_id=$item_id"]
} else {
- set comment_link ""
set comments ""
}
if {[permission::permission_p -object_id $item_id -privilege write] } {
- set edit_link "[_ news.Revise]"
- } else {
- set edit_link ""
+ lappend footer_links "[_ news.Revise]"
}
+ set footer_links [join $footer_links "\n"]
set title $publish_title
set context [list $title]
set publish_title {}
set image_id [news_get_image_id $item_id]
set publish_image ""
- if {![empty_string_p $image_id]} {
+ if { $image_id ne "" } {
set image_url "image/$image_id"
set publish_image $image_url
- ns_log Notice "$image_url"
+ ns_log Debug "$image_url"
}
} else {
- set context {}
- set title "[_ news.Error]"
+ set title [_ news.Error]
+ set contect [list $title]
+ ad_return_complaint 1 [_ news.lt_Could_not_find_the_re]
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: openacs-4/packages/news/www/news.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/news.adp,v
diff -u -r1.7 -r1.7.8.1
--- openacs-4/packages/news/www/news.adp 26 Mar 2005 13:49:55 -0000 1.7
+++ openacs-4/packages/news/www/news.adp 31 Jul 2008 10:29:23 -0000 1.7.8.1
@@ -1,5 +1,5 @@
This is the default template to render news items in admin/. Comments are not shown here
-@publish_title@
+@publish_title@
@publish_lead@
@publish_body;noquote@