Merge branch 'master' into survey

* master: (127 commits)
  Prefill in the email address in the ITransact credentials form from the user's Shop address.
  fixed Matrix best/worst rated lists
  Fix bad form variable for phone number in EMS Badge address info.
  - Added a switch to allow the use of non-WebGUI objects with the Workflow
  fixing a problem with previous survey fix
  fixed #9671: Survey - breaks admin bar
  fixed a Matrix sql problem
  i18n the image labels and title for the asset manager, manage screen.
  Prevent an imported package from changing the a current asset's status from pending to anything else.
  Remove trailing comma in Shop/Transaction JS so IE6 works.
  fixed documentation
  fixed a bug when a matrix listing didn't have a forum attached
  small char encoding fix to merged upgrade
  fix small issue in addChild
  adding merge point
  Fix a problem with purging an EMS.
  Update this template so that it passes the template i18n test.
  Fix a broken i18n label in answer edit template for the Survey.
  Unify all Survey CSS into 1 file, and use it.
  Adding/fixing Survey i18n and Help
  ...

Conflicts:
	lib/WebGUI/Asset/Wobject/Survey.pm
	lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm
	lib/WebGUI/i18n/English/Asset_Survey.pm
	www/extras/wobject/Survey/editsurvey/object.js
This commit is contained in:
Patrick Donelan 2009-02-10 07:57:42 +00:00
commit b0c5c09461
127 changed files with 5481 additions and 677 deletions

View file

@ -550,22 +550,20 @@ sub view {
foreach my $category (keys %{$self->getCategories}) {
my $data;
my $sql = "
select
select
assetData.title as productName,
assetData.url,
listing.assetId,
rating.meanValue,
rating.medianValue,
rating.countValue
from MatrixListing as listing
left join asset on listing.assetId = asset.assetId
left join MatrixListing_ratingSummary as rating on rating.listingId = listing.assetId
left join assetData on assetData.assetId = listing.assetId and listing.revisionDate =
assetData.revisionDate
where
asset.parentId=?
and asset.state='published'
and asset.className='WebGUI::Asset::MatrixListing'
rating.listingId,
rating.meanValue,
asset.parentId
from
MatrixListing_ratingSummary as rating
left join asset on (rating.listingId = asset.assetId)
left join assetData on assetData.assetId = rating.listingId
where
rating.category =?
and asset.parentId=?
and asset.state='published'
and assetData.revisionDate=(
select
max(revisionDate)
@ -575,13 +573,11 @@ assetData.revisionDate
assetData.assetId=asset.assetId
and (status='approved' or status='archived')
)
and status='approved'
and rating.category=?
group by
assetData.assetId
order by rating.meanValue ";
$data = $db->quickHashRef($sql." desc limit 1",[$self->getId,$category]);
$data = $db->quickHashRef($sql." desc limit 1",[$category,$self->getId]);
push(@{ $var->{best_rating_loop} },{
url=>'/'.$data->{url},
category=>$category,
@ -590,7 +586,7 @@ assetData.revisionDate
median=>$data->{medianValue},
count=>$data->{countValue}
});
$data = $db->quickHashRef($sql." asc limit 1",[$self->getId,$category]);
$data = $db->quickHashRef($sql." asc limit 1",[$category,$self->getId]);
push(@{ $var->{worst_rating_loop} },{
url=>'/'.$data->{url},
category=>$category,