Index: openacs-4/packages/ratings/lib/ratings.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ratings/lib/ratings.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/ratings/lib/ratings.tcl 14 Jun 2004 14:17:54 -0000 1.1 +++ openacs-4/packages/ratings/lib/ratings.tcl 29 Jul 2005 23:08:24 -0000 1.1.2.1 @@ -45,25 +45,32 @@ display_template {@ratings.rated;noquote@} } -if {[empty_string_p $object_id]} { +if {![empty_string_p $object_id]} { lappend elements object_title { label {Item} display_template {@ratings.object_title@ (ratings)} } } +lappend elements dimension { + label { Dimension } + display_template {@ratings.description@ } +} + if { 0 } { lappend elements extra { label {Debug} display_template {o.title:@ratings.obj_title@ url:@ratings.url_one@ type:@ratings.object_type@} } } if {$admin_p} { - set bulk [list "Delete ratings" delete] + set bulk [list "Delete ratings" delete] } else { set bulk {} } + + template::list::create \ -name ratings \ -multirow ratings \ @@ -92,12 +99,13 @@ set now [clock_to_ansi [clock seconds]] db_multirow -extend {rated rating_img user_url user_ratings_url object_ratings_url url_one} ratings ratings " - SELECT r.rating_id, u.first_names || ' ' || u.last_name as name, u.user_id, u.email, r.owner_id, r.rating, to_char(o.last_modified,'YYYY-MM-DD HH24:MI:SS') as rated_on, acs_object__name(o2.object_id) as object_title, r.object_id, o2.title as obj_title, o2.object_type - FROM acs_users_all u, ratings r, acs_objects o, acs_objects o2 + SELECT r.rating_id, r.dimension_id, rd.description, u.first_names || ' ' || u.last_name as name, u.user_id, u.email, r.owner_id, r.rating, to_char(o.last_modified,'YYYY-MM-DD HH24:MI:SS') as rated_on, acs_object__name(o2.object_id) as object_title, r.object_id, o2.title as obj_title, o2.object_type + FROM acs_users_all u, ratings r, acs_objects o, acs_objects o2, rating_dimensions rd WHERE r.owner_id = u.user_id $clause and o.object_id = r.rating_id and o2.object_id = r.object_id + and r.dimension_id = rd.dimension_id [template::list::orderby_clause -orderby -name "ratings"]" { set rating_img [ratings::icon::html_fragment -rating $rating] set user_url [acs_community_member_url -user_id $user_id]