Index: openacs-4/packages/forums/lib/user/post-history-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/lib/user/post-history-chunk.adp 8 Apr 2005 08:28:08 -0000 1.2 +++ openacs-4/packages/forums/lib/user/post-history-chunk.adp 4 Mar 2007 23:06:09 -0000 1.3 @@ -19,33 +19,8 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -55,35 +30,12 @@ -
#forums.Forum##forums.Subject##forums.Posted#
@messages.forum_name@@messages.subject@@messages.posting_date_pretty@
-

-
+

#forums.Summary_Posting_history_for#

-

- - - - - - +

- - - - - - - - - - - - - - - - + @@ -92,47 +44,6 @@ - -
#forums.Forum##forums.Number_of_Posts##forums.Posted#
@posts.name@@posts.num_msg@@posts.last_post@
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@messages.forum_name@

#forums.Subject##forums.Posted#
@messages.subject@@messages.posting_date_pretty@
-
- -
- -
-
Index: openacs-4/packages/forums/lib/user/post-history-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/lib/user/post-history-chunk.tcl 8 Apr 2005 08:28:08 -0000 1.2 +++ openacs-4/packages/forums/lib/user/post-history-chunk.tcl 4 Mar 2007 23:06:09 -0000 1.3 @@ -6,6 +6,8 @@ @creation-date 2002-05-29 @cvs-id $Id$ +} { + groupby:optional } set package_id [ad_conn package_id] @@ -28,15 +30,85 @@ set query select_messages if {[string equal $view forum]} { set query select_messages_by_forum + template::list::create \ + -html {width 50%} \ + -name messages \ + -multirow messages \ + -key message_id \ + -elements { + forum_name { + label "\#forums.Forum\#" + hide_p t + html {align left} + display_template {@messages.forum_name@} + } + subject { + label "\#forums.Subject\#" + html {align left} + display_template {@messages.subject@} + } + posting_date_pretty { + label "\#forums.Posted\#" + html {align right} + } + } -groupby { + label "\#forums.Forum\#" + values { "\#forums.Forum\#" {{groupby forum_name} {orderby forum_name,desc}}} + } +} else { + template::list::create \ + -html {width 50%} \ + -name messages \ + -multirow messages \ + -key message_id \ + -elements { + forum_name { + label "\#forums.Forum\#" + html {align left} + display_template {@messages.forum_name@} + } + subject { + label "\#forums.Subject\#" + html {align left} + display_template {@messages.subject@} + } + posting_date_pretty { + label "\#forums.Posted\#" + html {align right} + } + } } + # Select the postings db_multirow -extend { posting_date_pretty } messages $query {} { set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] } +template::list::create \ + -name posts \ + -multirow posts \ + -key message_id \ + -elements { + name { + label "\#forums.Forum\#" + html {align left} + display_template {@posts.name@} + } + num_msg { + label "\#forums.Number_of_Posts\#" + html {align left} + } + posting_date_pretty { + label "\#forums.Posted\#" + html {align right} + } + } + # select number of post from this user -db_multirow posts select_num_post {} +db_multirow -extend { posting_date_pretty } posts select_num_post {} { + set posting_date_pretty [lc_time_fmt $last_post "%x %X"] +} set dimensional_chunk [ad_dimensional $dimensional_list] Index: openacs-4/packages/forums/lib/user/post-history-chunk.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/lib/user/post-history-chunk.xql 8 Apr 2005 08:28:08 -0000 1.2 +++ openacs-4/packages/forums/lib/user/post-history-chunk.xql 4 Mar 2007 23:06:09 -0000 1.3 @@ -5,6 +5,7 @@ select forums_messages.message_id, + forums_forums.forum_id, forums_messages.subject, to_char(forums_messages.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, forums_forums.forum_id, @@ -14,13 +15,14 @@ where forums_messages.user_id = :user_id and forums_messages.forum_id = forums_forums.forum_id and forums_forums.package_id = :package_id - order by forums_messages.posting_date desc + [template::list::filter_where_clauses -and -name messages] select forums_messages.message_id, + forums_forums.forum_id, forums_messages.subject, to_char(forums_messages.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, forums_forums.forum_id, @@ -30,8 +32,7 @@ where forums_messages.user_id = :user_id and forums_messages.forum_id = forums_forums.forum_id and forums_forums.package_id = :package_id - order by forum_name, - forums_messages.posting_date desc + [template::list::filter_where_clauses -and -name messages] @@ -45,4 +46,22 @@ + + + select forums_messages.message_id, + forums_messages.subject, + to_char(forums_messages.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, + forums_forums.forum_id, + forums_forums.name as forum_name + from forums_messages, + forums_forums + where forums_messages.user_id = :user_id + [template::list::filter_where_clauses -and -name messages] + forums_messages.forum_id = forums_forums.forum_id + and forums_forums.package_id = :package_id + order by forums_messages.posting_date desc + + + + Index: openacs-4/packages/forums/www/user-history.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/user-history.adp,v diff -u -r1.11 -r1.12 --- openacs-4/packages/forums/www/user-history.adp 17 Dec 2003 15:45:30 -0000 1.11 +++ openacs-4/packages/forums/www/user-history.adp 4 Mar 2007 23:06:09 -0000 1.12 @@ -4,6 +4,6 @@
- +
Index: openacs-4/packages/forums/www/user-history.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/user-history.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/forums/www/user-history.tcl 17 Dec 2003 15:45:30 -0000 1.12 +++ openacs-4/packages/forums/www/user-history.tcl 4 Mar 2007 23:06:09 -0000 1.13 @@ -9,6 +9,7 @@ } { user_id:integer,notnull {view "date"} + {groupby "forum_name"} } # Get user information