Index: openacs-4/packages/news/catalog/news.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/catalog/news.en_US.ISO-8859-1.xml,v
diff -u -r1.23 -r1.23.2.1
--- openacs-4/packages/news/catalog/news.en_US.ISO-8859-1.xml 10 Dec 2007 09:12:37 -0000 1.23
+++ openacs-4/packages/news/catalog/news.en_US.ISO-8859-1.xml 1 Aug 2008 10:54:26 -0000 1.23.2.1
@@ -36,6 +36,7 @@
Going live in %n_days_until_publish% days, scheduled for archive in %n_days_until_archive% days
History
HTML
+ Image
Image must be one of the following types:
It will go live on
It will move into the archive on
Index: openacs-4/packages/news/www/item-create.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item-create.tcl,v
diff -u -r1.4.8.1 -r1.4.8.2
--- openacs-4/packages/news/www/item-create.tcl 30 Jul 2008 12:38:50 -0000 1.4.8.1
+++ openacs-4/packages/news/www/item-create.tcl 1 Aug 2008 10:54:26 -0000 1.4.8.2
@@ -87,7 +87,7 @@
{value "[split $archive_date_ansi -]"}
{format {$lc_format}}
}
- {Permanent_p:text(checkbox)
+ {Permanent_p:text(checkbox),optional
{label "[_ news.never]"}
{options {{"#news.show_it_permanently#" t}}}}
}
Index: openacs-4/packages/news/www/admin/revision-add-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/Attic/revision-add-oracle.xql,v
diff -u -r1.3 -r1.3.8.1
--- openacs-4/packages/news/www/admin/revision-add-oracle.xql 24 Feb 2005 18:03:05 -0000 1.3
+++ openacs-4/packages/news/www/admin/revision-add-oracle.xql 1 Aug 2008 10:54:26 -0000 1.3.8.1
@@ -24,13 +24,4 @@
-
-
- select content
-from cr_revisions
-where revision_id = :revision_id
-
-
-
-
Index: openacs-4/packages/news/www/admin/revision-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/revision-add.adp,v
diff -u -r1.10.2.1 -r1.10.2.2
--- openacs-4/packages/news/www/admin/revision-add.adp 29 Jul 2008 17:22:17 -0000 1.10.2.1
+++ openacs-4/packages/news/www/admin/revision-add.adp 1 Aug 2008 10:54:26 -0000 1.10.2.2
@@ -4,57 +4,4 @@
@title;noquote@
-#news.Use_the_following_form_to_define#
-
-
-
-
-
-
-
-
-
-
+
Index: openacs-4/packages/news/www/admin/revision-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/revision-add.tcl,v
diff -u -r1.6 -r1.6.8.1
--- openacs-4/packages/news/www/admin/revision-add.tcl 24 Feb 2005 18:03:05 -0000 1.6
+++ openacs-4/packages/news/www/admin/revision-add.tcl 1 Aug 2008 10:54:26 -0000 1.6.8.1
@@ -29,69 +29,80 @@
hidden_vars:onevalue
}
-db_1row news_item_info {
- select
- item_name,
- creator_id,
- item_creator
- from
- news_item_full_active
- where item_id = :item_id
-}
+db_1row news_item_info {}
-set title "Add revision"
+set title [_ news.Add_a_new_revision]
set context [list $title]
# get active revision of news item
-db_1row item "
-select
- item_id,
- package_id,
- revision_id,
- publish_title,
- publish_lead,
- html_p,
- publish_date,
- NVL(archive_date, sysdate+[ad_parameter ActiveDays "news" 14]) as archive_date,
- status
-from
- news_item_full_active
-where
- item_id = :item_id"
+db_1row item {}
# workaround to get blobs with >4000 chars into a var, content.blob_to_string fails!
# when this'll work, you get publish_body by selecting 'publish_body' directly from above view
#
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 = :revision_id"]
+if { $get_content ne "" } {
+ set publish_body [db_string get_content {}]
}
+set lc_format [lc_get formbuilder_date_format]
-set never_checkbox ""
-
-
-set publish_date_select [dt_widget_datetime -default $publish_date publish_date days]
-set archive_date_select [dt_widget_datetime -default $archive_date archive_date days]
-
-
set action "[_ news.Revision]"
-set hidden_vars [export_form_vars item_id action]
set image_id [news_get_image_id $item_id]
-if {![empty_string_p $image_id]} { set image_url "../image/$image_id" }
+set image_html ""
+if { $image_id ne "" } {
+ set image_url "../image/$image_id"
+ set image_html [subst {
}]
+}
-ad_return_template
+ad_form -name "news_revision" -export {item_id action} -html {enctype "multipart/form-data"} -action "../preview" -form {
+ {publish_title:text(text)
+ {label "[_ news.Title]"}
+ {html {size 61 maxlength 400}}
+ {value $publish_title}
+ }
+ {publish_lead:text(textarea),optional
+ {label "[_ news.Lead]"}
+ {html {cols 60 rows 3}}
+ {value $publish_lead}
+ }
+ {publish_body:text(textarea),optional
+ {label "[_ news.Body]"}
+ {html {cols 60 rows 20}}
+ {value $publish_body}
+ }
+ {text_file:file(file),optional
+ {label "[_ news.or_upload_text_file]"}
+ }
+ {html_p:text(radio)
+ {label "[_ news.The_text_is_formatted_as]"}
+ {options {{"#news.Plain_text#" f} {"#news.HTML#" t}}}
+ {value $html_p}
+ }
+ {news_image:text(inform)
+ {label "[_ news.Image]"}
+ {value "[_ news.use_preview_to_revise_image]\n$image_html"}
+ }
+ {publish_date:date,optional
+ {label "[_ news.Release_Date]"}
+ {value "[split $publish_date -]"}
+ {format {$lc_format}}
+ }
+ {archive_date:date,optional
+ {label "[_ news.Archive_Date]"}
+ {value "[split $archive_date -]"}
+ {format {$lc_format}}
+ }
+ {permanent_p:text(checkbox),optional
+ {label "[_ news.never]"}
+ {options {{"#news.show_it_permanently#" t}}}
+ }
+ {revision_log:text(text)
+ {label "[_ news.Revision_log]"}
+ {html {size 61 maxlength 400}}
+ }
+}
-
-
-
-
-
+ad_return_template
Index: openacs-4/packages/news/www/admin/revision-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/revision-add.xql,v
diff -u -r1.2 -r1.2.20.1
--- openacs-4/packages/news/www/admin/revision-add.xql 16 Oct 2001 10:10:19 -0000 1.2
+++ openacs-4/packages/news/www/admin/revision-add.xql 1 Aug 2008 10:54:26 -0000 1.2.20.1
@@ -1,7 +1,7 @@
-
+
select
@@ -13,7 +13,14 @@
where item_id = :item_id
-
+
+
+
+ select content
+ from cr_revisions
+ where revision_id = :revision_id
+
+