From 48d1f4f09ecd3af5d834f03a78c61963f51c2fee Mon Sep 17 00:00:00 2001 From: santipalenque Date: Tue, 18 Nov 2014 15:42:26 -0300 Subject: [PATCH] [spalenque] - #6968 *QA CHANGES --- .../SapphireElectionRepository.php | 8 +- .../frontend/DistributionsDirectoryPage.php | 2 +- .../code/ui/frontend/css/marketplace.css | 7 +- .../ui/utils/ConsultantSapphireRender.php | 4 +- .../Layout/CloudsDirectoryPage_cloud.ss | 56 +++++++------- .../Layout/CloudsDirectoryPage_pdf.ss | 74 +++++++++---------- .../ConsultantsDirectoryPage_consultant.ss | 44 +++++------ .../Layout/ConsultantsDirectoryPage_pdf.ss | 44 +++++------ .../Layout/DistributionsDirectoryPage_pdf.ss | 58 +++++++-------- ...rketPlaceAdminPage_implementations_list.ss | 24 +++--- openstack/code/sangria/SangriaPage.php | 2 +- openstack/code/user-stories/UserStory.php | 2 - 12 files changed, 161 insertions(+), 164 deletions(-) diff --git a/elections/code/infrastructure/repositories/SapphireElectionRepository.php b/elections/code/infrastructure/repositories/SapphireElectionRepository.php index f75169d..39fd5ca 100644 --- a/elections/code/infrastructure/repositories/SapphireElectionRepository.php +++ b/elections/code/infrastructure/repositories/SapphireElectionRepository.php @@ -39,9 +39,13 @@ final class SapphireElectionRepository extends SapphireRepository public function getEarliestElectionSince($years) { $sql = 'select * from Election where ElectionsClose >= date_add(now(), interval -'.$years.' year) ORDER BY ElectionsClose ASC LIMIT 0,1;'; - $res = DB::query($sql); + $result = DB::query($sql); // let Silverstripe work the magic - $elections = singleton('Election')->buildDataObjectSet($res); + $elections = new ArrayList(); + foreach($result as $rowArray) { + // concept: new Product($rowArray) + $elections->push(new $rowArray['ClassName']($rowArray)); + } return $elections->first(); } } \ No newline at end of file diff --git a/marketplace/code/ui/frontend/DistributionsDirectoryPage.php b/marketplace/code/ui/frontend/DistributionsDirectoryPage.php index 0db90c4..6f378ff 100644 --- a/marketplace/code/ui/frontend/DistributionsDirectoryPage.php +++ b/marketplace/code/ui/frontend/DistributionsDirectoryPage.php @@ -174,7 +174,7 @@ class DistributionsDirectoryPage_Controller extends MarketPlaceDirectoryPage_Con $appliance = $this->appliance_repository->getBy($query); if(!$appliance) throw new NotFoundEntityException('',''); if($appliance->getCompany()->URLSegment != $company_url_segment) throw new NotFoundEntityException('',''); - $render = new ApplianceSapphirgit eRender($appliance); + $render = new ApplianceSapphireRender($appliance); return $render->draw(); } catch (Exception $ex) { diff --git a/marketplace/code/ui/frontend/css/marketplace.css b/marketplace/code/ui/frontend/css/marketplace.css index f260ed8..51a01bf 100644 --- a/marketplace/code/ui/frontend/css/marketplace.css +++ b/marketplace/code/ui/frontend/css/marketplace.css @@ -490,12 +490,7 @@ h1.marketplace a,h1.marketplace a.visited{ background:url("/marketplace/code/ui/frontend/images/api/full.png") no-repeat scroll center center rgba(0,0,0,0); display:inline-block; height:20px; - color: black; - /*text-indent:-3000px; uncomment this to hide text inside icon*/ - font-size: 7px; - text-align: center; - line-height: 19px; - font-weight: bold; + text-indent:-3000px; width:20px; } diff --git a/marketplace/code/ui/utils/ConsultantSapphireRender.php b/marketplace/code/ui/utils/ConsultantSapphireRender.php index 1138aef..90f7085 100644 --- a/marketplace/code/ui/utils/ConsultantSapphireRender.php +++ b/marketplace/code/ui/utils/ConsultantSapphireRender.php @@ -64,8 +64,8 @@ final class ConsultantSapphireRender { return Controller::curr()->Customise( array( 'Consultant' => $this->consultant, - 'Services' => new DataObjectSet(array_values($unique_services)), - 'Regions' => new DataObjectSet(array_values($unique_regions)), + 'Services' => new ArrayList(array_values($unique_services)), + 'Regions' => new ArrayList(array_values($unique_regions)), ) )->renderWith(array('ConsultantsDirectoryPage_pdf')); } diff --git a/marketplace/templates/Layout/CloudsDirectoryPage_cloud.ss b/marketplace/templates/Layout/CloudsDirectoryPage_cloud.ss index 312a51b..ee336f3 100644 --- a/marketplace/templates/Layout/CloudsDirectoryPage_cloud.ss +++ b/marketplace/templates/Layout/CloudsDirectoryPage_cloud.ss @@ -19,24 +19,24 @@ Service OpenStack Version - <% control Capabilities %> + <% loop Capabilities %> - <% control ReleaseSupportedApiVersion %> - <% control OpenStackComponent %> + <% loop ReleaseSupportedApiVersion %> + <% loop OpenStackComponent %> $Name - <% end_control %> - <% end_control %> + <% end_loop %> + <% end_loop %> - <% control ReleaseSupportedApiVersion %> - <% control Release %> + <% loop ReleaseSupportedApiVersion %> + <% loop Release %> $Name - <% end_control %> - <% end_control %> + <% end_loop %> + <% end_loop %> - <% end_control %> + <% end_loop %> <% end_if %> @@ -45,13 +45,13 @@

Pricing Options

- <% control Top.PricingSchemas %> + <% loop Top.PricingSchemas %> - <% end_control %> + <% end_loop %>
$Type