Index: openacs-4/packages/forums/catalog/forums.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/catalog/forums.en_US.ISO-8859-1.xml,v diff -u -r1.21 -r1.22 --- openacs-4/packages/forums/catalog/forums.en_US.ISO-8859-1.xml 17 Dec 2003 15:45:29 -0000 1.21 +++ openacs-4/packages/forums/catalog/forums.en_US.ISO-8859-1.xml 30 Dec 2003 23:10:02 -0000 1.22 @@ -3,13 +3,13 @@ Administer Administration - approve Anonymous + approve Are you sure you want to delete this message and <strong>all replies to it</strong>? Attach? Attachments: Author - <a href="%thread_url%">Back</a> to %forum.name% + Back to %forum.name% Body by Date by Forum Index: openacs-4/packages/forums/lib/forums/admin-forums-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/admin-forums-chunk.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/lib/forums/admin-forums-chunk.tcl 17 Dec 2003 15:45:29 -0000 1.1 +++ openacs-4/packages/forums/lib/forums/admin-forums-chunk.tcl 30 Dec 2003 23:10:03 -0000 1.2 @@ -11,6 +11,11 @@ template::list::create \ -name forums \ -multirow forums \ + -actions [list \ + [_ forums.Create_a_New_Forum] forum-new {} \ + [_ forums.Parameters] [export_vars -base "/shared/parameters" { { return_url [ad_return_url] } { package_id {[ad_conn package_id]} } }] {} \ + [_ acs-subsite.Permissions] [export_vars -base "permissions" { { object_id {[ad_conn package_id]} } }] {} + ]\ -elements { edit { label {} Index: openacs-4/packages/forums/lib/forums/forums-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/forums-chunk.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/lib/forums/forums-chunk.adp 17 Dec 2003 15:45:29 -0000 1.1 +++ openacs-4/packages/forums/lib/forums/forums-chunk.adp 30 Dec 2003 23:10:03 -0000 1.2 @@ -1,48 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#forums.Forum_Name##forums.Threads##forums.Last_Post#
- - - - @forums.name@ - - - - -
@forums.charter;noquote@ -
-
- @forums.n_threads@ - - - @forums.last_post_ansi@ -   -
- #forums.No_Forums# -
+ Index: openacs-4/packages/forums/lib/forums/forums-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/forums-chunk.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/lib/forums/forums-chunk.tcl 17 Dec 2003 15:45:29 -0000 1.1 +++ openacs-4/packages/forums/lib/forums/forums-chunk.tcl 30 Dec 2003 23:10:03 -0000 1.2 @@ -11,13 +11,52 @@ set package_id [ad_conn package_id] set user_id [ad_verify_and_get_user_id] +set admin_p [permission::permission_p -object_id $package_id -privilege admin] + # get the colors from the params set table_border_color [parameter::get -parameter table_border_color] set table_bgcolor [parameter::get -parameter table_bgcolor] set table_other_bgcolor [parameter::get -parameter table_other_bgcolor] -db_multirow -extend { last_modified_pretty } forums select_forums {} { +set actions [list] +if { $admin_p } { + lappend actions [_ forums.New_Forum] "admin/forum-new" {} + lappend actions [_ forums.Administration] "admin/" {} +} + +template::list::create \ + -name forums \ + -actions $actions \ + -no_data [_ forums.No_Forums] \ + -elements { + name { + label {\#forums.Forum_Name\#} + link_url_col forum_view_url + display_template { + + + + @forums.name@ + + + + } + } + n_threads { + label {\#forums.Threads\#} + display_col n_threads_pretty + html { align right } + } + last_post { + label {\#forums.Last_Post\#} + display_col last_modified_pretty + } + } + +db_multirow -extend { forum_view_url last_modified_pretty n_threads_pretty } forums select_forums {} { set last_modified_pretty [lc_time_fmt $last_post_ansi "%x %X"] + set forum_view_url [export_vars -base forum-view { forum_id }] + set n_threads_pretty [lc_numeric $n_threads] } if {[exists_and_not_null alt_template]} { Index: openacs-4/packages/forums/lib/message/threads-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/threads-chunk.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/lib/message/threads-chunk.tcl 17 Dec 2003 15:45:29 -0000 1.1 +++ openacs-4/packages/forums/lib/message/threads-chunk.tcl 30 Dec 2003 23:10:03 -0000 1.2 @@ -12,14 +12,29 @@ forum::get -forum_id $forum_id -array forum set query messages_select -if {$moderate_p} { +if { $moderate_p } { set query messages_select_moderator } +set actions [list] + +if { [template::util::is_true $permissions(post_p)] } { + lappend actions [_ forums.Post_a_New_Message] [export_vars -base "message-post" { forum_id }] {} +} + +if { [template::util::is_true $permissions(admin_p)] } { + lappend actions [_ forums.Administer] [export_vars -base "admin/forum-edit" { forum_id {return_url [ad_return_url]}}] {} +} + +if { [template::util::is_true $permissions(moderate_p)] } { + lappend actions [_ forums.ManageModerate] [export_vars -base "moderate/forum" { forum_id }] {} +} + template::list::create \ -name messages \ -multirow messages \ -pass_properties { moderate_p } \ + -actions $actions \ -elements { subject { label "#forums.Subject#" Index: openacs-4/packages/forums/www/forum-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view.adp,v diff -u -r1.24 -r1.25 --- openacs-4/packages/forums/www/forum-view.adp 17 Dec 2003 15:45:30 -0000 1.24 +++ openacs-4/packages/forums/www/forum-view.adp 30 Dec 2003 23:10:03 -0000 1.25 @@ -6,34 +6,14 @@ @notification_chunk;noquote@ - - -

- » #forums.Post_a_New_Message# -

-
- - #forums.Search#  - - -
- [ - - #forums.Administer# - | - - - #forums.ManageModerate# - - ]
-
+ #forums.Search#  + - - + -

+ Index: openacs-4/packages/forums/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/index.adp,v diff -u -r1.21 -r1.22 --- openacs-4/packages/forums/www/index.adp 17 Dec 2003 15:45:30 -0000 1.21 +++ openacs-4/packages/forums/www/index.adp 30 Dec 2003 23:10:03 -0000 1.22 @@ -2,30 +2,12 @@ #forums.Forums# @context;noquote@ -
- - - - - +
+ + + #forums.Search_colon#  + + +
-
- - [ #forums.New_Forum# | #forums.Administration# ] - - -   - - - - - #forums.Search_colon#  - - -
- -
- - - -
+ Index: openacs-4/packages/forums/www/message-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.adp,v diff -u -r1.21 -r1.22 --- openacs-4/packages/forums/www/message-view.adp 17 Dec 2003 15:45:30 -0000 1.21 +++ openacs-4/packages/forums/www/message-view.adp 30 Dec 2003 23:10:03 -0000 1.22 @@ -9,7 +9,7 @@
- #forums.Back_to_thread_link# + #forums.Back_to_thread_label#   Index: openacs-4/packages/forums/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/index.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/forums/www/admin/index.adp 17 Dec 2003 15:45:31 -0000 1.9 +++ openacs-4/packages/forums/www/admin/index.adp 30 Dec 2003 23:10:04 -0000 1.10 @@ -2,19 +2,6 @@ #forums.lt_Forums_Administration# -

#forums.Forums#

+ -

-

- » #forums.Create_a_New_Forum# -

- -

- » #forums.Parameters# -

- -

- » #acs-subsite.Permissions# -

- Index: openacs-4/packages/forums/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/index.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/forums/www/admin/index.tcl 17 Dec 2003 15:45:31 -0000 1.7 +++ openacs-4/packages/forums/www/admin/index.tcl 30 Dec 2003 23:10:04 -0000 1.8 @@ -8,5 +8,3 @@ } -set parameters_url [export_vars -base "/shared/parameters" { { return_url [ad_return_url] } { package_id {[ad_conn package_id]} } }] -set permissions_url [export_vars -base "permissions" { { object_id {[ad_conn package_id]} } }]