[spalenque] - #6968 *DONE
Conflicts: marketplace/code/infrastructure/repositories/SapphireRegionalSupportedCompanyServiceRepository.php marketplace/code/interfaces/restfull_api/marketplace/ConsultantsCrudApi.php marketplace/code/ui/admin/MarketPlaceAdminPage.php
This commit is contained in:
parent
9057a0cd67
commit
1f26e7d5e6
@ -63,7 +63,7 @@ class CompanyService
|
|||||||
|
|
||||||
public function isDraft()
|
public function isDraft()
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCompany(ICompany $company)
|
public function setCompany(ICompany $company)
|
||||||
|
@ -53,7 +53,7 @@ class CompanyServiceDraft
|
|||||||
|
|
||||||
public function isDraft()
|
public function isDraft()
|
||||||
{
|
{
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCompany(ICompany $company)
|
public function setCompany(ICompany $company)
|
||||||
|
@ -80,9 +80,10 @@ final class ApplianceCrudApi extends CompanyServiceCrudApi {
|
|||||||
// filters ...
|
// filters ...
|
||||||
$this_var = $this;
|
$this_var = $this;
|
||||||
$current_user = $this->current_user;
|
$current_user = $this->current_user;
|
||||||
$repository = $this->appliance_draft_repository;
|
$repository = $this->appliance_repository;
|
||||||
|
$draft_repository = $this->appliance_draft_repository;
|
||||||
|
|
||||||
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user,$repository){
|
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user){
|
||||||
$data = $this_var->getJsonRequest();
|
$data = $this_var->getJsonRequest();
|
||||||
if (!$data) return $this_var->serverError();
|
if (!$data) return $this_var->serverError();
|
||||||
|
|
||||||
@ -99,9 +100,11 @@ final class ApplianceCrudApi extends CompanyServiceCrudApi {
|
|||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository){
|
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository,$draft_repository){
|
||||||
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
||||||
$company_service = $repository->getById($company_service_id);
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
$company_service = ($is_draft) ? $draft_repository->getById($company_service_id) : $repository->getById($company_service_id);
|
||||||
|
|
||||||
if(!$current_user->isMarketPlaceAdminOfCompany(IAppliance::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
if(!$current_user->isMarketPlaceAdminOfCompany(IAppliance::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
@ -113,7 +116,7 @@ final class ApplianceCrudApi extends CompanyServiceCrudApi {
|
|||||||
*/
|
*/
|
||||||
static $url_handlers = array(
|
static $url_handlers = array(
|
||||||
'GET $COMPANY_SERVICE_ID!' => 'getAppliance',
|
'GET $COMPANY_SERVICE_ID!' => 'getAppliance',
|
||||||
'DELETE $COMPANY_SERVICE_ID!' => 'deleteCompanyService',
|
'DELETE $COMPANY_SERVICE_ID!/$IS_DRAFT!' => 'deleteCompanyService',
|
||||||
'POST ' => 'addCompanyService',
|
'POST ' => 'addCompanyService',
|
||||||
'PUT ' => 'updateCompanyService',
|
'PUT ' => 'updateCompanyService',
|
||||||
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
||||||
@ -178,8 +181,24 @@ final class ApplianceCrudApi extends CompanyServiceCrudApi {
|
|||||||
|
|
||||||
public function deleteCompanyService(){
|
public function deleteCompanyService(){
|
||||||
try {
|
try {
|
||||||
parent::deleteCompanyService();
|
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
||||||
return parent::deleteCompanyServiceDraft();
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
|
||||||
|
if ($is_draft) {
|
||||||
|
$this->draft_manager->unRegister($this->draft_factory->buildCompanyServiceById($company_service_id));
|
||||||
|
} else {
|
||||||
|
$this->manager->unRegister($this->factory->buildCompanyServiceById($company_service_id));
|
||||||
|
$company_service_draft = $this->appliance_draft_repository->getByLiveServiceId($company_service_id);
|
||||||
|
if ($company_service_draft) {
|
||||||
|
$this->draft_manager->unRegister($company_service_draft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->deleted();
|
||||||
|
}
|
||||||
|
catch (NotFoundEntityException $ex1) {
|
||||||
|
SS_Log::log($ex1,SS_Log::ERR);
|
||||||
|
return $this->notFound($ex1->getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception $ex) {
|
catch (Exception $ex) {
|
||||||
SS_Log::log($ex,SS_Log::ERR);
|
SS_Log::log($ex,SS_Log::ERR);
|
||||||
|
@ -171,38 +171,30 @@ abstract class CompanyServiceCrudApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return SS_HTTPResponse
|
|
||||||
*/
|
|
||||||
public function deleteCompanyServiceDraft(){
|
|
||||||
try {
|
|
||||||
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
|
||||||
$this->draft_manager->unRegister($this->draft_factory->buildCompanyServiceById($company_service_id));
|
|
||||||
return $this->deleted();
|
|
||||||
}
|
|
||||||
catch (NotFoundEntityException $ex1) {
|
|
||||||
SS_Log::log($ex1,SS_Log::ERR);
|
|
||||||
return $this->notFound($ex1->getMessage());
|
|
||||||
}
|
|
||||||
catch (Exception $ex) {
|
|
||||||
SS_Log::log($ex,SS_Log::ERR);
|
|
||||||
return $this->serverError();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return SS_HTTPResponse
|
* @return SS_HTTPResponse
|
||||||
*/
|
*/
|
||||||
public function publishCompanyService(){
|
public function publishCompanyService(){
|
||||||
try {
|
try {
|
||||||
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
$company_service_live_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
||||||
$data = $this->getJsonRequest();
|
$data = $this->getJsonRequest();
|
||||||
if (!$data) return $this->serverError();
|
if (!$data) return $this->serverError();
|
||||||
//save the draft
|
|
||||||
$this->draft_manager->updateCompanyService($data);
|
|
||||||
//save the live version
|
//save the live version
|
||||||
|
if ($company_service_live_id == 0) { // this means is a draft without a live version yet
|
||||||
|
$data['live_service_id'] = $this->manager->addCompanyService($data)->getIdentifier();
|
||||||
|
//save the draft
|
||||||
|
if ($data['id']) { //it could be that the draft was never saved yet, in that case id should be 0
|
||||||
|
$this->draft_manager->updateCompanyService($data);
|
||||||
|
} else {
|
||||||
|
$this->draft_manager->addCompanyService($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { //if there is a live version of this draft, update it
|
||||||
|
$this->draft_manager->updateCompanyService($data);
|
||||||
$data['id'] = $data['live_service_id'];
|
$data['id'] = $data['live_service_id'];
|
||||||
$this->manager->updateCompanyService($data);
|
$this->manager->updateCompanyService($data);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->published();
|
return $this->published();
|
||||||
}
|
}
|
||||||
catch (EntityAlreadyExistsException $ex1) {
|
catch (EntityAlreadyExistsException $ex1) {
|
||||||
|
@ -16,10 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
final class ConsultantsCrudApi extends CompanyServiceCrudApi {
|
final class ConsultantsCrudApi extends CompanyServiceCrudApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
static $url_handlers = array(
|
static $url_handlers = array(
|
||||||
'GET languages' => 'getLanguages',
|
'GET languages' => 'getLanguages',
|
||||||
'GET $COMPANY_SERVICE_ID!' => 'getConsultant',
|
'GET $COMPANY_SERVICE_ID!' => 'getConsultant',
|
||||||
'DELETE $COMPANY_SERVICE_ID!' => 'deleteCompanyService',
|
'DELETE $COMPANY_SERVICE_ID!/$IS_DRAFT!' => 'deleteCompanyService',
|
||||||
'POST ' => 'addCompanyService',
|
'POST ' => 'addCompanyService',
|
||||||
'PUT ' => 'updateCompanyService',
|
'PUT ' => 'updateCompanyService',
|
||||||
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
||||||
@ -132,8 +135,9 @@ final class ConsultantsCrudApi extends CompanyServiceCrudApi {
|
|||||||
$this_var = $this;
|
$this_var = $this;
|
||||||
$current_user = $this->current_user;
|
$current_user = $this->current_user;
|
||||||
$repository = $this->consultant_repository;
|
$repository = $this->consultant_repository;
|
||||||
|
$draft_repository = $this->consultant_draft_repository;
|
||||||
|
|
||||||
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user, $repository){
|
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user){
|
||||||
$data = $this_var->getJsonRequest();
|
$data = $this_var->getJsonRequest();
|
||||||
if (!$data) return $this->serverError();
|
if (!$data) return $this->serverError();
|
||||||
$company_id = intval(@$data['company_id']);
|
$company_id = intval(@$data['company_id']);
|
||||||
@ -148,14 +152,17 @@ final class ConsultantsCrudApi extends CompanyServiceCrudApi {
|
|||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository){
|
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository,$draft_repository){
|
||||||
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
||||||
$company_service = $repository->getById($company_service_id);
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
$company_service = ($is_draft) ? $draft_repository->getById($company_service_id) : $repository->getById($company_service_id);
|
||||||
|
|
||||||
if(!$current_user->isMarketPlaceAdminOfCompany(IConsultant::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
if(!$current_user->isMarketPlaceAdminOfCompany(IConsultant::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getConsultant(){
|
public function getConsultant(){
|
||||||
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
||||||
$consultant = $this->consultant_repository->getById($company_service_id);
|
$consultant = $this->consultant_repository->getById($company_service_id);
|
||||||
@ -216,8 +223,24 @@ final class ConsultantsCrudApi extends CompanyServiceCrudApi {
|
|||||||
|
|
||||||
public function deleteCompanyService(){
|
public function deleteCompanyService(){
|
||||||
try {
|
try {
|
||||||
parent::deleteCompanyService();
|
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
||||||
return parent::deleteCompanyServiceDraft();
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
|
||||||
|
if ($is_draft) {
|
||||||
|
$this->draft_manager->unRegister($this->draft_factory->buildCompanyServiceById($company_service_id));
|
||||||
|
} else {
|
||||||
|
$this->manager->unRegister($this->factory->buildCompanyServiceById($company_service_id));
|
||||||
|
$company_service_draft = $this->consultant_draft_repository->getByLiveServiceId($company_service_id);
|
||||||
|
if ($company_service_draft) {
|
||||||
|
$this->draft_manager->unRegister($company_service_draft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->deleted();
|
||||||
|
}
|
||||||
|
catch (NotFoundEntityException $ex1) {
|
||||||
|
SS_Log::log($ex1,SS_Log::ERR);
|
||||||
|
return $this->notFound($ex1->getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception $ex) {
|
catch (Exception $ex) {
|
||||||
SS_Log::log($ex,SS_Log::ERR);
|
SS_Log::log($ex,SS_Log::ERR);
|
||||||
|
@ -80,9 +80,10 @@ final class DistributionCrudApi extends CompanyServiceCrudApi {
|
|||||||
// filters ...
|
// filters ...
|
||||||
$this_var = $this;
|
$this_var = $this;
|
||||||
$current_user = $this->current_user;
|
$current_user = $this->current_user;
|
||||||
$repository = $this->distribution_draft_repository;
|
$repository = $this->distribution_repository;
|
||||||
|
$draft_repository = $this->distribution_draft_repository;
|
||||||
|
|
||||||
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user, $repository){
|
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user){
|
||||||
$data = $this_var->getJsonRequest();
|
$data = $this_var->getJsonRequest();
|
||||||
if (!$data) return $this->serverError();
|
if (!$data) return $this->serverError();
|
||||||
$company_id = intval(@$data['company_id']);
|
$company_id = intval(@$data['company_id']);
|
||||||
@ -97,9 +98,11 @@ final class DistributionCrudApi extends CompanyServiceCrudApi {
|
|||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository){
|
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository,$draft_repository){
|
||||||
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
||||||
$company_service = $repository->getById($company_service_id);
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
$company_service = ($is_draft) ? $draft_repository->getById($company_service_id) : $repository->getById($company_service_id);
|
||||||
|
|
||||||
if(!$current_user->isMarketPlaceAdminOfCompany(IDistribution::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
if(!$current_user->isMarketPlaceAdminOfCompany(IDistribution::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
@ -110,7 +113,7 @@ final class DistributionCrudApi extends CompanyServiceCrudApi {
|
|||||||
*/
|
*/
|
||||||
static $url_handlers = array(
|
static $url_handlers = array(
|
||||||
'GET $COMPANY_SERVICE_ID!' => 'getDistribution',
|
'GET $COMPANY_SERVICE_ID!' => 'getDistribution',
|
||||||
'DELETE $COMPANY_SERVICE_ID!' => 'deleteCompanyService',
|
'DELETE $COMPANY_SERVICE_ID!/$IS_DRAFT!' => 'deleteCompanyService',
|
||||||
'POST ' => 'addCompanyService',
|
'POST ' => 'addCompanyService',
|
||||||
'PUT ' => 'updateCompanyService',
|
'PUT ' => 'updateCompanyService',
|
||||||
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
||||||
@ -175,8 +178,24 @@ final class DistributionCrudApi extends CompanyServiceCrudApi {
|
|||||||
|
|
||||||
public function deleteCompanyService(){
|
public function deleteCompanyService(){
|
||||||
try {
|
try {
|
||||||
parent::deleteCompanyService();
|
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
||||||
return parent::deleteCompanyServiceDraft();
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
|
||||||
|
if ($is_draft) {
|
||||||
|
$this->draft_manager->unRegister($this->draft_factory->buildCompanyServiceById($company_service_id));
|
||||||
|
} else {
|
||||||
|
$this->manager->unRegister($this->factory->buildCompanyServiceById($company_service_id));
|
||||||
|
$company_service_draft = $this->distribution_draft_repository->getByLiveServiceId($company_service_id);
|
||||||
|
if ($company_service_draft) {
|
||||||
|
$this->draft_manager->unRegister($company_service_draft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->deleted();
|
||||||
|
}
|
||||||
|
catch (NotFoundEntityException $ex1) {
|
||||||
|
SS_Log::log($ex1,SS_Log::ERR);
|
||||||
|
return $this->notFound($ex1->getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception $ex) {
|
catch (Exception $ex) {
|
||||||
SS_Log::log($ex,SS_Log::ERR);
|
SS_Log::log($ex,SS_Log::ERR);
|
||||||
|
@ -100,14 +100,15 @@ final class PrivateCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
SapphireTransactionManager::getInstance()
|
SapphireTransactionManager::getInstance()
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::__construct($manager,$draft_manager,new PublicCloudFactory,new PublicCloudDraftFactory);
|
parent::__construct($manager,$draft_manager,new PrivateCloudFactory,new PrivateCloudDraftFactory);
|
||||||
|
|
||||||
// filters ...
|
// filters ...
|
||||||
$this_var = $this;
|
$this_var = $this;
|
||||||
$current_user = $this->current_user;
|
$current_user = $this->current_user;
|
||||||
$repository = $this->private_cloud_repository;
|
$repository = $this->private_cloud_repository;
|
||||||
|
$draft_repository = $this->private_cloud_draft_repository;
|
||||||
|
|
||||||
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user, $repository){
|
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user){
|
||||||
$data = $this_var->getJsonRequest();
|
$data = $this_var->getJsonRequest();
|
||||||
if (!$data) return $this_var->serverError();
|
if (!$data) return $this_var->serverError();
|
||||||
$company_id = intval(@$data['company_id']);
|
$company_id = intval(@$data['company_id']);
|
||||||
@ -122,9 +123,11 @@ final class PrivateCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository){
|
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository,$draft_repository){
|
||||||
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
||||||
$company_service = $repository->getById($company_service_id);
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
$company_service = ($is_draft) ? $draft_repository->getById($company_service_id) : $repository->getById($company_service_id);
|
||||||
|
|
||||||
if(!$current_user->isMarketPlaceAdminOfCompany(IPrivateCloudService::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
if(!$current_user->isMarketPlaceAdminOfCompany(IPrivateCloudService::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
@ -136,7 +139,7 @@ final class PrivateCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
*/
|
*/
|
||||||
static $url_handlers = array(
|
static $url_handlers = array(
|
||||||
'GET $COMPANY_SERVICE_ID!' => 'getPrivateCloud',
|
'GET $COMPANY_SERVICE_ID!' => 'getPrivateCloud',
|
||||||
'DELETE $COMPANY_SERVICE_ID!' => 'deleteCompanyService',
|
'DELETE $COMPANY_SERVICE_ID!/$IS_DRAFT!' => 'deleteCompanyService',
|
||||||
'POST ' => 'addCompanyService',
|
'POST ' => 'addCompanyService',
|
||||||
'PUT ' => 'updateCompanyService',
|
'PUT ' => 'updateCompanyService',
|
||||||
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
||||||
@ -217,8 +220,24 @@ final class PrivateCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
|
|
||||||
public function deleteCompanyService(){
|
public function deleteCompanyService(){
|
||||||
try {
|
try {
|
||||||
parent::deleteCompanyService();
|
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
||||||
return parent::deleteCompanyServiceDraft();
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
|
||||||
|
if ($is_draft) {
|
||||||
|
$this->draft_manager->unRegister($this->draft_factory->buildCompanyServiceById($company_service_id));
|
||||||
|
} else {
|
||||||
|
$this->manager->unRegister($this->factory->buildCompanyServiceById($company_service_id));
|
||||||
|
$company_service_draft = $this->private_cloud_draft_repository->getByLiveServiceId($company_service_id);
|
||||||
|
if ($company_service_draft) {
|
||||||
|
$this->draft_manager->unRegister($company_service_draft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->deleted();
|
||||||
|
}
|
||||||
|
catch (NotFoundEntityException $ex1) {
|
||||||
|
SS_Log::log($ex1,SS_Log::ERR);
|
||||||
|
return $this->notFound($ex1->getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception $ex) {
|
catch (Exception $ex) {
|
||||||
SS_Log::log($ex,SS_Log::ERR);
|
SS_Log::log($ex,SS_Log::ERR);
|
||||||
|
@ -106,8 +106,9 @@ class PublicCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
$this_var = $this;
|
$this_var = $this;
|
||||||
$current_user = $this->current_user;
|
$current_user = $this->current_user;
|
||||||
$repository = $this->public_cloud_repository;
|
$repository = $this->public_cloud_repository;
|
||||||
|
$draft_repository = $this->public_cloud_draft_repository;
|
||||||
|
|
||||||
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user, $repository){
|
$this->addBeforeFilter('addCompanyService','check_add_company',function ($request) use($this_var, $current_user){
|
||||||
$data = $this_var->getJsonRequest();
|
$data = $this_var->getJsonRequest();
|
||||||
if (!$data) return $this->serverError();
|
if (!$data) return $this->serverError();
|
||||||
$company_id = intval(@$data['company_id']);
|
$company_id = intval(@$data['company_id']);
|
||||||
@ -122,9 +123,11 @@ class PublicCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository){
|
$this->addBeforeFilter('deleteCompanyService','check_delete_company',function ($request) use($this_var, $current_user,$repository,$draft_repository){
|
||||||
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
$company_service_id = intval($request->param('COMPANY_SERVICE_ID'));
|
||||||
$company_service = $repository->getById($company_service_id);
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
$company_service = ($is_draft) ? $draft_repository->getById($company_service_id) : $repository->getById($company_service_id);
|
||||||
|
|
||||||
if(!$current_user->isMarketPlaceAdminOfCompany(IPublicCloudService::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
if(!$current_user->isMarketPlaceAdminOfCompany(IPublicCloudService::MarketPlaceGroupSlug, $company_service->getCompany()->getIdentifier()))
|
||||||
return $this_var->permissionFailure();
|
return $this_var->permissionFailure();
|
||||||
});
|
});
|
||||||
@ -136,7 +139,7 @@ class PublicCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
*/
|
*/
|
||||||
static $url_handlers = array(
|
static $url_handlers = array(
|
||||||
'GET $COMPANY_SERVICE_ID!' => 'getPublicCloud',
|
'GET $COMPANY_SERVICE_ID!' => 'getPublicCloud',
|
||||||
'DELETE $COMPANY_SERVICE_ID!' => 'deleteCompanyService',
|
'DELETE $COMPANY_SERVICE_ID!/$IS_DRAFT!' => 'deleteCompanyService',
|
||||||
'POST ' => 'addCompanyService',
|
'POST ' => 'addCompanyService',
|
||||||
'PUT ' => 'updateCompanyService',
|
'PUT ' => 'updateCompanyService',
|
||||||
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
'PUT $COMPANY_SERVICE_ID!' => 'publishCompanyService',
|
||||||
@ -217,8 +220,24 @@ class PublicCloudCrudApi extends CompanyServiceCrudApi {
|
|||||||
|
|
||||||
public function deleteCompanyService(){
|
public function deleteCompanyService(){
|
||||||
try {
|
try {
|
||||||
parent::deleteCompanyService();
|
$company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
|
||||||
return parent::deleteCompanyServiceDraft();
|
$is_draft = intval($this->request->param('IS_DRAFT'));
|
||||||
|
|
||||||
|
if ($is_draft) {
|
||||||
|
$this->draft_manager->unRegister($this->draft_factory->buildCompanyServiceById($company_service_id));
|
||||||
|
} else {
|
||||||
|
$this->manager->unRegister($this->factory->buildCompanyServiceById($company_service_id));
|
||||||
|
$company_service_draft = $this->public_cloud_draft_repository->getByLiveServiceId($company_service_id);
|
||||||
|
if ($company_service_draft) {
|
||||||
|
$this->draft_manager->unRegister($company_service_draft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->deleted();
|
||||||
|
}
|
||||||
|
catch (NotFoundEntityException $ex1) {
|
||||||
|
SS_Log::log($ex1,SS_Log::ERR);
|
||||||
|
return $this->notFound($ex1->getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception $ex) {
|
catch (Exception $ex) {
|
||||||
SS_Log::log($ex,SS_Log::ERR);
|
SS_Log::log($ex,SS_Log::ERR);
|
||||||
|
@ -250,6 +250,10 @@ abstract class CompanyServiceManager {
|
|||||||
$company_service = $repository->getById($id);
|
$company_service = $repository->getById($id);
|
||||||
if(!$company_service) throw new NotFoundEntityException('CompanyService',sprintf("id %s",$id));
|
if(!$company_service) throw new NotFoundEntityException('CompanyService',sprintf("id %s",$id));
|
||||||
$company_service->setName($data['name']);
|
$company_service->setName($data['name']);
|
||||||
|
if ($company_service->isDraft()) {
|
||||||
|
$live_service_id = (isset($data['live_service_id'])) ? $data['live_service_id'] : 0;
|
||||||
|
$company_service->setLiveServiceId($live_service_id);
|
||||||
|
}
|
||||||
|
|
||||||
$query = new QueryObject($company_service);
|
$query = new QueryObject($company_service);
|
||||||
$query->addAddCondition(QueryCriteria::equal('Name',$company_service->getName()));
|
$query->addAddCondition(QueryCriteria::equal('Name',$company_service->getName()));
|
||||||
|
@ -302,9 +302,15 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
public function getCurrentDistribution()
|
public function getCurrentDistribution()
|
||||||
{
|
{
|
||||||
$distribution_id = intval($this->request->getVar('id'));
|
$distribution_id = intval($this->request->getVar('id'));
|
||||||
|
$is_draft = intval($this->request->getVar('is_draft'));
|
||||||
$distribution = false;
|
$distribution = false;
|
||||||
if ($distribution_id > 0) {
|
if ($distribution_id > 0) {
|
||||||
|
if ($is_draft) {
|
||||||
|
$distribution = $this->distribution_draft_repository->getById($distribution_id);
|
||||||
|
} else {
|
||||||
$distribution = $this->distribution_draft_repository->getByLiveServiceId($distribution_id);
|
$distribution = $this->distribution_draft_repository->getByLiveServiceId($distribution_id);
|
||||||
|
}
|
||||||
|
|
||||||
//if no draft found we pull the live one to create the draft from it when saved
|
//if no draft found we pull the live one to create the draft from it when saved
|
||||||
if (!$distribution) {
|
if (!$distribution) {
|
||||||
$distribution = $this->distribution_repository->getById($distribution_id);
|
$distribution = $this->distribution_repository->getById($distribution_id);
|
||||||
@ -316,9 +322,16 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
public function getCurrentAppliance()
|
public function getCurrentAppliance()
|
||||||
{
|
{
|
||||||
$appliance_id = intval($this->request->getVar('id'));
|
$appliance_id = intval($this->request->getVar('id'));
|
||||||
|
$is_draft = intval($this->request->getVar('is_draft'));
|
||||||
|
|
||||||
$appliance = false;
|
$appliance = false;
|
||||||
if ($appliance_id > 0) {
|
if ($appliance_id > 0) {
|
||||||
|
if ($is_draft) {
|
||||||
|
$appliance = $this->appliance_draft_repository->getById($appliance_id);
|
||||||
|
} else {
|
||||||
$appliance = $this->appliance_draft_repository->getByLiveServiceId($appliance_id);
|
$appliance = $this->appliance_draft_repository->getByLiveServiceId($appliance_id);
|
||||||
|
}
|
||||||
|
|
||||||
//if no draft found we pull the live one to create the draft from it when saved
|
//if no draft found we pull the live one to create the draft from it when saved
|
||||||
if (!$appliance) {
|
if (!$appliance) {
|
||||||
$appliance = $this->appliance_repository->getById($appliance_id);
|
$appliance = $this->appliance_repository->getById($appliance_id);
|
||||||
@ -531,26 +544,11 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
return new ArrayList($list);
|
return new ArrayList($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConsultants()
|
public function sortCompanyService(&$query, $sort, $dir)
|
||||||
{
|
{
|
||||||
$product_name = trim(Convert::raw2sql($this->request->getVar('name')));
|
|
||||||
$company_id = intval($this->request->getVar('company_id'));
|
|
||||||
$sort = $this->request->getVar('sort');
|
|
||||||
$query = new QueryObject(new CompanyService);
|
|
||||||
$query->addAlias(QueryAlias::create('Company'));
|
|
||||||
if (!empty($product_name)) {
|
|
||||||
$query->addOrCondition(QueryCriteria::like('CompanyService.Name', $product_name));
|
|
||||||
$query->addOrCondition(QueryCriteria::like('Company.Name', $product_name));
|
|
||||||
}
|
|
||||||
if ($company_id > 0) {
|
|
||||||
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
|
||||||
}
|
|
||||||
|
|
||||||
//set sorting
|
|
||||||
if (!empty($sort)) {
|
|
||||||
$dir = $this->getSortDir('consultants');
|
|
||||||
switch ($sort) {
|
switch ($sort) {
|
||||||
case 'company': {
|
case 'company': {
|
||||||
|
$query->addAlias(QueryAlias::create('Company'));
|
||||||
if ($dir == 'asc')
|
if ($dir == 'asc')
|
||||||
$query->addOrder(QueryOrder::asc('Company.Name'));
|
$query->addOrder(QueryOrder::asc('Company.Name'));
|
||||||
else
|
else
|
||||||
@ -563,6 +561,14 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
else
|
else
|
||||||
$query->addOrder(QueryOrder::desc('Name'));
|
$query->addOrder(QueryOrder::desc('Name'));
|
||||||
}
|
}
|
||||||
|
case 'type': {
|
||||||
|
$query->addAlias(QueryAlias::create('MarketPlaceType'));
|
||||||
|
if ($dir == 'asc') {
|
||||||
|
$query->addOrder(QueryOrder::asc('MarketPlaceType.Name'));
|
||||||
|
} else {
|
||||||
|
$query->addOrder(QueryOrder::desc('MarketPlaceType.Name'));
|
||||||
|
}
|
||||||
|
}
|
||||||
case 'status': {
|
case 'status': {
|
||||||
if ($dir == 'asc')
|
if ($dir == 'asc')
|
||||||
$query->addOrder(QueryOrder::asc('Active'));
|
$query->addOrder(QueryOrder::asc('Active'));
|
||||||
@ -593,19 +599,58 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getConsultants()
|
||||||
|
{
|
||||||
|
$product_name = trim(Convert::raw2sql($this->request->getVar('name')));
|
||||||
|
$company_id = intval($this->request->getVar('company_id'));
|
||||||
|
$sort = $this->request->getVar('sort');
|
||||||
|
$query = new QueryObject(new CompanyService);
|
||||||
|
$query_draft = new QueryObject(new CompanyServiceDraft);
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('LiveServiceID', 0)); //only drafts without live version
|
||||||
|
|
||||||
|
$query->addAlias(QueryAlias::create('Company'));
|
||||||
|
$query_draft->addAlias(QueryAlias::create('Company'));
|
||||||
|
|
||||||
|
if (!empty($product_name)) {
|
||||||
|
$query->addOrCondition(QueryCriteria::like('CompanyService.Name', $product_name));
|
||||||
|
$query->addOrCondition(QueryCriteria::like('Company.Name', $product_name));
|
||||||
|
$query_draft->addOrCondition(QueryCriteria::like('CompanyService.Name', $product_name));
|
||||||
|
$query_draft->addOrCondition(QueryCriteria::like('Company.Name', $product_name));
|
||||||
|
}
|
||||||
|
if ($company_id > 0) {
|
||||||
|
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
//set sorting
|
||||||
|
if (!empty($sort)) {
|
||||||
|
$dir = $this->getSortDir('consultants');
|
||||||
|
$this->sortCompanyService($query,$sort,$dir);
|
||||||
|
$this->sortCompanyService($query_draft,$sort,$dir);
|
||||||
}
|
}
|
||||||
//get consultants
|
//get consultants
|
||||||
list($list, $size) = $this->consultant_repository->getAll($query, 0, 1000);
|
list($list1, $size1) = $this->consultant_repository->getAll($query, 0, 1000);
|
||||||
|
list($list2, $size2) = $this->consultant_draft_repository->getAll($query_draft, 0, 1000);
|
||||||
|
|
||||||
//return on view model
|
//return on view model
|
||||||
return new ArrayList($list);
|
return new ArrayList(array_merge($list1,$list2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCurrentConsultant()
|
public function getCurrentConsultant()
|
||||||
{
|
{
|
||||||
$consultant_id = intval($this->request->getVar('id'));
|
$consultant_id = intval($this->request->getVar('id'));
|
||||||
|
$is_draft = intval($this->request->getVar('is_draft'));
|
||||||
$consultant = false;
|
$consultant = false;
|
||||||
if ($consultant_id > 0) {
|
if ($consultant_id > 0) {
|
||||||
|
if ($is_draft) {
|
||||||
|
$consultant = $this->consultant_draft_repository->getById($consultant_id);
|
||||||
|
} else {
|
||||||
$consultant = $this->consultant_draft_repository->getByLiveServiceId($consultant_id);
|
$consultant = $this->consultant_draft_repository->getByLiveServiceId($consultant_id);
|
||||||
|
}
|
||||||
|
|
||||||
//if no draft found we pull the live one to create the draft from it when saved
|
//if no draft found we pull the live one to create the draft from it when saved
|
||||||
if (!$consultant) {
|
if (!$consultant) {
|
||||||
$consultant = $this->consultant_repository->getById($consultant_id);
|
$consultant = $this->consultant_repository->getById($consultant_id);
|
||||||
@ -648,82 +693,46 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
|
|
||||||
$sort = $this->request->getVar('sort');
|
$sort = $this->request->getVar('sort');
|
||||||
$query = new QueryObject(new CompanyService);
|
$query = new QueryObject(new CompanyService);
|
||||||
|
$query_draft = new QueryObject(new CompanyServiceDraft);
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('LiveServiceID', 0));
|
||||||
|
|
||||||
if (!empty($product_name)) {
|
if (!empty($product_name)) {
|
||||||
$query->addAddCondition(QueryCriteria::like('Name', $product_name));
|
$query->addAddCondition(QueryCriteria::like('Name', $product_name));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::like('Name', $product_name));
|
||||||
}
|
}
|
||||||
if ($implementation_type_id > 0) {
|
if ($implementation_type_id > 0) {
|
||||||
$query->addAddCondition(QueryCriteria::equal('MarketPlaceType.ID', $implementation_type_id));
|
$query->addAddCondition(QueryCriteria::equal('MarketPlaceType.ID', $implementation_type_id));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('MarketPlaceType.ID', $implementation_type_id));
|
||||||
}
|
}
|
||||||
if ($company_id > 0) {
|
if ($company_id > 0) {
|
||||||
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
}
|
}
|
||||||
//set sorting
|
//set sorting
|
||||||
if (!empty($sort)) {
|
if (!empty($sort)) {
|
||||||
$dir = $this->getSortDir('distributions');
|
$dir = $this->getSortDir('distributions');
|
||||||
switch ($sort) {
|
$this->sortCompanyService($query,$sort,$dir);
|
||||||
case 'company': {
|
$this->sortCompanyService($query_draft,$sort,$dir);
|
||||||
$query->addAlias(QueryAlias::create('Company'));
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Company.Name'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Company.Name'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'name': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Name'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Name'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'type': {
|
|
||||||
$query->addAlias(QueryAlias::create('MarketPlaceType'));
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('MarketPlaceType.Name'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('MarketPlaceType.Name'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'status': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Active'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Active'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'updated': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('LastEdited'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('LastEdited'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'updatedby': {
|
|
||||||
$query->addAlias(QueryAlias::create('Member'));
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Member.Email'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Member.Email'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('ID'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('ID'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//get distributions
|
//get distributions
|
||||||
$list1 = array();
|
$list1 = array();
|
||||||
$list2 = array();
|
$list2 = array();
|
||||||
if ($this->canAdmin('distributions'))
|
|
||||||
|
$list3 = array();
|
||||||
|
|
||||||
|
if ($this->canAdmin('distributions')) {
|
||||||
list($list1, $size1) = $this->distribution_repository->getAll($query, 0, 1000);
|
list($list1, $size1) = $this->distribution_repository->getAll($query, 0, 1000);
|
||||||
if ($this->canAdmin('appliances'))
|
list($list2, $size2) = $this->distribution_draft_repository->getAll($query_draft, 0, 1000);
|
||||||
list($list2, $size2) = $this->appliance_repository->getAll($query, 0, 1000);
|
}
|
||||||
|
|
||||||
|
if ($this->canAdmin('appliances')) {
|
||||||
|
list($list3, $size3) = $this->appliance_repository->getAll($query, 0, 1000);
|
||||||
|
list($list4, $size4) = $this->appliance_draft_repository->getAll($query_draft, 0, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
//return on view model
|
//return on view model
|
||||||
return new ArrayList(array_merge($list1,$list2));
|
return new ArrayList(array_merge($list1,$list2,$list3,$list4));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -736,77 +745,47 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
$company_id = intval($this->request->getVar('company_id'));
|
$company_id = intval($this->request->getVar('company_id'));
|
||||||
$sort = $this->request->getVar('sort');
|
$sort = $this->request->getVar('sort');
|
||||||
$query = new QueryObject(new CompanyService);
|
$query = new QueryObject(new CompanyService);
|
||||||
|
$query_draft = new QueryObject(new CompanyServiceDraft);
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('LiveServiceID', 0));
|
||||||
|
|
||||||
if (!empty($product_name)) {
|
if (!empty($product_name)) {
|
||||||
$query->addAddCondition(QueryCriteria::like('Name', $product_name));
|
$query->addAddCondition(QueryCriteria::like('Name', $product_name));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::like('Name', $product_name));
|
||||||
}
|
}
|
||||||
if ($company_id > 0) {
|
if ($company_id > 0) {
|
||||||
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
//set sorting
|
//set sorting
|
||||||
if (!empty($sort)) {
|
if (!empty($sort)) {
|
||||||
$dir = $this->getSortDir('public.clouds');
|
$dir = $this->getSortDir('public.clouds');
|
||||||
|
|
||||||
switch ($sort) {
|
$this->sortCompanyService($query,$sort,$dir);
|
||||||
case 'company': {
|
$this->sortCompanyService($query_draft,$sort,$dir);
|
||||||
$query->addAlias(QueryAlias::create('Company'));
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Company.Name'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Company.Name'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'name': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Name'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Name'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'status': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Active'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Active'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'updated': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('LastEdited'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('LastEdited'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'updatedby': {
|
|
||||||
$query->addAlias(QueryAlias::create('Member'));
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Member.Email'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Member.Email'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('ID'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('ID'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//get public clouds
|
//get public clouds
|
||||||
list($list, $size) = $this->public_clouds_repository->getAll($query, 0, 1000);
|
list($list1, $size1) = $this->public_clouds_repository->getAll($query, 0, 1000);
|
||||||
|
list($list2, $size2) = $this->public_clouds_draft_repository->getAll($query_draft, 0, 1000);
|
||||||
|
|
||||||
//return on view model
|
//return on view model
|
||||||
return new ArrayList($list);
|
|
||||||
|
return new ArrayList(array_merge($list1,$list2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCurrentPublicCloud()
|
public function getCurrentPublicCloud()
|
||||||
{
|
{
|
||||||
$public_cloud_id = intval($this->request->getVar('id'));
|
$public_cloud_id = intval($this->request->getVar('id'));
|
||||||
|
$is_draft = intval($this->request->getVar('is_draft'));
|
||||||
$public_cloud = false;
|
$public_cloud = false;
|
||||||
if ($public_cloud_id > 0) {
|
if ($public_cloud_id > 0) {
|
||||||
|
if ($is_draft) {
|
||||||
|
$public_cloud = $this->public_clouds_draft_repository->getById($public_cloud_id);
|
||||||
|
} else {
|
||||||
$public_cloud = $this->public_clouds_draft_repository->getByLiveServiceId($public_cloud_id);
|
$public_cloud = $this->public_clouds_draft_repository->getByLiveServiceId($public_cloud_id);
|
||||||
|
}
|
||||||
|
|
||||||
//if no draft found we pull the live one to create the draft from it when saved
|
//if no draft found we pull the live one to create the draft from it when saved
|
||||||
if (!$public_cloud) {
|
if (!$public_cloud) {
|
||||||
$public_cloud = $this->public_clouds_repository->getById($public_cloud_id);
|
$public_cloud = $this->public_clouds_repository->getById($public_cloud_id);
|
||||||
@ -833,77 +812,47 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
$company_id = intval($this->request->getVar('company_id'));
|
$company_id = intval($this->request->getVar('company_id'));
|
||||||
$sort = $this->request->getVar('sort');
|
$sort = $this->request->getVar('sort');
|
||||||
$query = new QueryObject(new CompanyService);
|
$query = new QueryObject(new CompanyService);
|
||||||
|
$query_draft = new QueryObject(new CompanyServiceDraft);
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('LiveServiceID', 0));
|
||||||
|
|
||||||
if (!empty($product_name)) {
|
if (!empty($product_name)) {
|
||||||
$query->addAddCondition(QueryCriteria::like('Name', $product_name));
|
$query->addAddCondition(QueryCriteria::like('Name', $product_name));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::like('Name', $product_name));
|
||||||
}
|
}
|
||||||
if ($company_id > 0) {
|
if ($company_id > 0) {
|
||||||
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
$query->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
|
$query_draft->addAddCondition(QueryCriteria::equal('Company.ID', $company_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
//set sorting
|
//set sorting
|
||||||
if (!empty($sort)) {
|
if (!empty($sort)) {
|
||||||
$dir = $this->getSortDir('private.clouds');
|
$dir = $this->getSortDir('private.clouds');
|
||||||
|
|
||||||
switch ($sort) {
|
$this->sortCompanyService($query,$sort,$dir);
|
||||||
case 'company': {
|
$this->sortCompanyService($query_draft,$sort,$dir);
|
||||||
$query->addAlias(QueryAlias::create('Company'));
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Company.Name'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Company.Name'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'name': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Name'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Name'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'status': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Active'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Active'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'updated': {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('LastEdited'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('LastEdited'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'updatedby': {
|
|
||||||
$query->addAlias(QueryAlias::create('Member'));
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('Member.Email'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('Member.Email'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: {
|
|
||||||
if ($dir == 'asc')
|
|
||||||
$query->addOrder(QueryOrder::asc('ID'));
|
|
||||||
else
|
|
||||||
$query->addOrder(QueryOrder::desc('ID'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//get public clouds
|
//get public clouds
|
||||||
list($list, $size) = $this->private_clouds_repository->getAll($query, 0, 1000);
|
list($list1, $size1) = $this->private_clouds_repository->getAll($query, 0, 1000);
|
||||||
|
list($list2, $size2) = $this->private_clouds_draft_repository->getAll($query_draft, 0, 1000);
|
||||||
|
|
||||||
//return on view model
|
//return on view model
|
||||||
return new ArrayList($list);
|
|
||||||
|
return new ArrayList(array_merge($list1,$list2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCurrentPrivateCloud()
|
public function getCurrentPrivateCloud()
|
||||||
{
|
{
|
||||||
$private_cloud_id = intval($this->request->getVar('id'));
|
$private_cloud_id = intval($this->request->getVar('id'));
|
||||||
|
$is_draft = intval($this->request->getVar('is_draft'));
|
||||||
$private_cloud = false;
|
$private_cloud = false;
|
||||||
if ($private_cloud_id > 0) {
|
if ($private_cloud_id > 0) {
|
||||||
|
if ($is_draft) {
|
||||||
|
$private_cloud = $this->private_clouds_draft_repository->getById($private_cloud_id);
|
||||||
|
} else {
|
||||||
$private_cloud = $this->private_clouds_draft_repository->getByLiveServiceId($private_cloud_id);
|
$private_cloud = $this->private_clouds_draft_repository->getByLiveServiceId($private_cloud_id);
|
||||||
|
}
|
||||||
|
|
||||||
//if no draft found we pull the live one to create the draft from it when saved
|
//if no draft found we pull the live one to create the draft from it when saved
|
||||||
if (!$private_cloud) {
|
if (!$private_cloud) {
|
||||||
$private_cloud = $this->private_clouds_repository->getById($private_cloud_id);
|
$private_cloud = $this->private_clouds_repository->getById($private_cloud_id);
|
||||||
@ -1316,7 +1265,6 @@ class MarketPlaceAdminPage_Controller extends Page_Controller
|
|||||||
return $static_map_url;
|
return $static_map_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getCurrentOfficesLocationsStaticMapDraftForPDF()
|
public function getCurrentOfficesLocationsStaticMapDraftForPDF()
|
||||||
{
|
{
|
||||||
$static_map_url = "http://maps.googleapis.com/maps/api/staticmap?zoom=1&size=300x200&maptype=roadmap";
|
$static_map_url = "http://maps.googleapis.com/maps/api/staticmap?zoom=1&size=300x200&maptype=roadmap";
|
||||||
|
@ -40,7 +40,7 @@ jQuery(document).ready(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//this is a draft
|
//this is a draft
|
||||||
if (appliance.live_service_id) {
|
if (typeof(appliance.live_service_id) != 'undefined') {
|
||||||
$("#id",form).val(appliance.id);
|
$("#id",form).val(appliance.id);
|
||||||
$("#live_id",form).val(appliance.live_service_id);
|
$("#live_id",form).val(appliance.live_service_id);
|
||||||
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
||||||
|
@ -43,7 +43,7 @@ jQuery(document).ready(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//this is a draft
|
//this is a draft
|
||||||
if (consultant.live_service_id) {
|
if (typeof(consultant.live_service_id) != 'undefined') {
|
||||||
$("#id",form).val(consultant.id);
|
$("#id",form).val(consultant.id);
|
||||||
$("#live_id",form).val(consultant.live_service_id);
|
$("#live_id",form).val(consultant.live_service_id);
|
||||||
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
||||||
@ -162,10 +162,9 @@ jQuery(document).ready(function($){
|
|||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data,textStatus,jqXHR) {
|
success: function (data,textStatus,jqXHR) {
|
||||||
//window.location = listing_url;
|
|
||||||
if(consultant.id < 1) $("#id",form).val(data);
|
|
||||||
$('.publish-consultant').prop('disabled',false);
|
$('.publish-consultant').prop('disabled',false);
|
||||||
$('.save-consultant').prop('disabled',false);
|
$('.save-consultant').prop('disabled',false);
|
||||||
|
window.location = listing_url;
|
||||||
ajaxIndicatorStop();
|
ajaxIndicatorStop();
|
||||||
},
|
},
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
@ -33,8 +33,10 @@ jQuery(document).ready(function($){
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if(confirm("Are you sure to delete this?")){
|
if(confirm("Are you sure to delete this?")){
|
||||||
var id = $(this).attr('data-id');
|
var id = $(this).attr('data-id');
|
||||||
|
var is_draft = $(this).attr('data-is_draft');
|
||||||
var url = 'api/v1/marketplace/consultants'
|
var url = 'api/v1/marketplace/consultants'
|
||||||
url = url+'/'+id;
|
url = url+'/'+id+'/'+is_draft;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -41,7 +41,7 @@ jQuery(document).ready(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//this is a draft
|
//this is a draft
|
||||||
if (distribution.live_service_id) {
|
if (typeof(distribution.live_service_id) != 'undefined') {
|
||||||
$("#id",form).val(distribution.id);
|
$("#id",form).val(distribution.id);
|
||||||
$("#live_id",form).val(distribution.live_service_id);
|
$("#live_id",form).val(distribution.live_service_id);
|
||||||
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
||||||
@ -110,10 +110,9 @@ jQuery(document).ready(function($){
|
|||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data,textStatus,jqXHR) {
|
success: function (data,textStatus,jqXHR) {
|
||||||
//window.location = listing_url;
|
|
||||||
if(distribution.id < 1) $("#id",form).val(data);
|
|
||||||
$('.publish-distribution').prop('disabled',false);
|
$('.publish-distribution').prop('disabled',false);
|
||||||
$('.save-distribution').prop('disabled',false);
|
$('.save-distribution').prop('disabled',false);
|
||||||
|
window.location = listing_url;
|
||||||
},
|
},
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
$('.save-distribution').prop('disabled',false);
|
$('.save-distribution').prop('disabled',false);
|
||||||
|
@ -38,9 +38,11 @@ jQuery(document).ready(function($){
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if(confirm("Are you sure to delete this?")){
|
if(confirm("Are you sure to delete this?")){
|
||||||
var id = $(this).attr('data-id');
|
var id = $(this).attr('data-id');
|
||||||
|
var is_draft = $(this).attr('data-is_draft');
|
||||||
var type = $(this).attr('data-class');
|
var type = $(this).attr('data-class');
|
||||||
var url = type=='distribution'?'api/v1/marketplace/distributions':'api/v1/marketplace/appliances'
|
var url = type=='distribution'?'api/v1/marketplace/distributions':'api/v1/marketplace/appliances'
|
||||||
url = url+'/'+id;
|
url = url+'/'+id+'/'+is_draft;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -45,7 +45,7 @@ jQuery(document).ready(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//this is a draft
|
//this is a draft
|
||||||
if (private_cloud.live_service_id) {
|
if (typeof(private_cloud.live_service_id) != 'undefined') {
|
||||||
$("#id",form).val(private_cloud.id);
|
$("#id",form).val(private_cloud.id);
|
||||||
$("#live_id",form).val(private_cloud.live_service_id);
|
$("#live_id",form).val(private_cloud.live_service_id);
|
||||||
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
||||||
@ -150,10 +150,9 @@ jQuery(document).ready(function($){
|
|||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data,textStatus,jqXHR) {
|
success: function (data,textStatus,jqXHR) {
|
||||||
//window.location = listing_url;
|
|
||||||
if(private_cloud.id < 1) $("#id",form).val(data);
|
|
||||||
$('.publish-private-cloud').prop('disabled',false);
|
$('.publish-private-cloud').prop('disabled',false);
|
||||||
$('.save-private-cloud').prop('disabled',false);
|
$('.save-private-cloud').prop('disabled',false);
|
||||||
|
window.location = listing_url;
|
||||||
ajaxIndicatorStop();
|
ajaxIndicatorStop();
|
||||||
},
|
},
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
@ -32,8 +32,10 @@ jQuery(document).ready(function($){
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if(confirm("Are you sure to delete this?")){
|
if(confirm("Are you sure to delete this?")){
|
||||||
var id = $(this).attr('data-id');
|
var id = $(this).attr('data-id');
|
||||||
|
var is_draft = $(this).attr('data-is_draft');
|
||||||
var url = 'api/v1/marketplace/private-clouds'
|
var url = 'api/v1/marketplace/private-clouds'
|
||||||
url = url+'/'+id;
|
url = url+'/'+id+'/'+is_draft;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -45,7 +45,7 @@ jQuery(document).ready(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//this is a draft
|
//this is a draft
|
||||||
if (public_cloud.live_service_id) {
|
if (typeof(public_cloud.live_service_id) != 'undefined') {
|
||||||
$("#id",form).val(public_cloud.id);
|
$("#id",form).val(public_cloud.id);
|
||||||
$("#live_id",form).val(public_cloud.live_service_id);
|
$("#live_id",form).val(public_cloud.live_service_id);
|
||||||
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
} else { //its not a draft is the live version, so we remove the id and set the live_service_id
|
||||||
@ -152,10 +152,9 @@ jQuery(document).ready(function($){
|
|||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data,textStatus,jqXHR) {
|
success: function (data,textStatus,jqXHR) {
|
||||||
//window.location = listing_url;
|
|
||||||
if(public_cloud.id < 1) $("#id",form).val(data);
|
|
||||||
$('.publish-public-cloud').prop('disabled',false);
|
$('.publish-public-cloud').prop('disabled',false);
|
||||||
$('.save-public-cloud').prop('disabled',false);
|
$('.save-public-cloud').prop('disabled',false);
|
||||||
|
window.location = listing_url;
|
||||||
ajaxIndicatorStop();
|
ajaxIndicatorStop();
|
||||||
},
|
},
|
||||||
error: function (jqXHR, textStatus, errorThrown) {
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
@ -32,8 +32,10 @@ jQuery(document).ready(function($){
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if(confirm("Are you sure to delete this?")){
|
if(confirm("Are you sure to delete this?")){
|
||||||
var id = $(this).attr('data-id');
|
var id = $(this).attr('data-id');
|
||||||
|
var is_draft = $(this).attr('data-is_draft');
|
||||||
var url = 'api/v1/marketplace/public-clouds'
|
var url = 'api/v1/marketplace/public-clouds'
|
||||||
url = url+'/'+id;
|
url = url+'/'+id+'/'+is_draft;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><a href="$Top.Link(consultants)?sort=company">Company ^</a></th>
|
<th><a href="$Top.Link(consultants)?sort=company">Company ^</a></th>
|
||||||
<th><a href="$Top.Link(consultants)?sort=name">Service Name ^</a></th>
|
<th><a href="$Top.Link(consultants)?sort=name">Service Name ^</a></th>
|
||||||
|
<th>Published</th>
|
||||||
<th><a href="$Top.Link(consultants)?sort=status">Status ^</a></th>
|
<th><a href="$Top.Link(consultants)?sort=status">Status ^</a></th>
|
||||||
<th><a href="$Top.Link(consultants)?sort=updated">Last Update ^</a></th>
|
<th><a href="$Top.Link(consultants)?sort=updated">Last Update ^</a></th>
|
||||||
<% if Top.isSuperAdmin %>
|
<% if Top.isSuperAdmin %>
|
||||||
@ -59,6 +60,9 @@
|
|||||||
<td>
|
<td>
|
||||||
$Name
|
$Name
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if LiveServiceID == 0 %>Draft<% else %>Published<% end_if %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
||||||
</td>
|
</td>
|
||||||
@ -75,10 +79,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<td style="min-width: 200px" width="30%">
|
<td style="min-width: 200px" width="30%">
|
||||||
<a class="product-button roundedButton addDeploymentBtn" href="$Top.Link(consultant)?id=$ID">Edit Product Details</a>
|
<a class="product-button roundedButton addDeploymentBtn" href="$Top.Link(consultant)?id=$ID&is_draft=$isDraft">Edit Product Details</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(consultant)/$ID/preview">Preview Product</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(consultant)/$ID/<% if isDraft %>draft_<% end_if %>preview">Preview Product</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(consultant)/$ID/pdf">PDF</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(consultant)/$ID/<% if isDraft %>draft_<% end_if %>pdf">PDF</a>
|
||||||
<a class="roundedButton delete-consultant product-button addDeploymentBtn" href="#" data-id="{$ID}">Delete Product</a>
|
<a class="roundedButton delete-consultant product-button addDeploymentBtn" href="#" data-id="{$ID}" data-is_draft="{$isDraft}">Delete Product</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
|
@ -52,7 +52,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><a href="$Top.Link?sort=company">Company ^</a></th>
|
<th><a href="$Top.Link?sort=company">Company ^</a></th>
|
||||||
<th><a href="$Top.Link?sort=name">Product Name ^</a></th>
|
<th><a href="$Top.Link?sort=name">Product Name ^</a></th>
|
||||||
<th><a href="$Top.Link?sort=name">Product Type ^</a></th>
|
<th>Product Type</th>
|
||||||
|
<th>Published</th>
|
||||||
<th><a href="$Top.Link?sort=status">Status ^</a></th>
|
<th><a href="$Top.Link?sort=status">Status ^</a></th>
|
||||||
<th><a href="$Top.Link?sort=updated">Last Update ^</a></th>
|
<th><a href="$Top.Link?sort=updated">Last Update ^</a></th>
|
||||||
<% if Top.isSuperAdmin %>
|
<% if Top.isSuperAdmin %>
|
||||||
@ -74,6 +75,9 @@
|
|||||||
<td>
|
<td>
|
||||||
$MarketPlace.Name
|
$MarketPlace.Name
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if LiveServiceID == 0 %>Draft<% else %>Published<% end_if %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
||||||
</td>
|
</td>
|
||||||
@ -90,11 +94,12 @@
|
|||||||
</td>
|
</td>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<td style="min-width: 200px" width="30%">
|
<td style="min-width: 200px" width="30%">
|
||||||
<a class="product-button roundedButton addDeploymentBtn" href="<% control MarketPlace %><% if Name == "Appliance" %>$Top.Link(appliance)<% end_if %><% if Name == "Distribution" %>$Top.Link(distribution)<% end_if %><% end_control %>?id=$ID">Edit Product Details</a>
|
<a class="product-button roundedButton addDeploymentBtn" href="<% control MarketPlace %><% if Name == "Appliance" %>$Top.Link(appliance)<% end_if %><% if Name == "Distribution" %>$Top.Link(distribution)<% end_if %><% end_control %>?id=$ID&is_draft=$isDraft">Edit Product Details</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="<% control MarketPlace %><% if Name == "Appliance" %>$Top.Link(appliance)<% end_if %><% if Name == "Distribution" %>$Top.Link(distribution)<% end_if %><% end_control %>/$ID/preview">Preview Product</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="<% control MarketPlace %><% if Name == "Appliance" %>$Top.Link(appliance)<% end_if %><% if Name == "Distribution" %>$Top.Link(distribution)<% end_if %><% end_control %>/$ID/<% if isDraft %>draft_<% end_if %>preview">Preview Product</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="<% control MarketPlace %><% if Name == "Appliance" %>$Top.Link(appliance)<% end_if %><% if Name == "Distribution" %>$Top.Link(distribution)<% end_if %><% end_control %>/$ID/pdf">PDF</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="<% control MarketPlace %><% if Name == "Appliance" %>$Top.Link(appliance)<% end_if %><% if Name == "Distribution" %>$Top.Link(distribution)<% end_if %><% end_control %>/$ID/<% if isDraft %>draft_<% end_if %>pdf">PDF</a>
|
||||||
<a class="roundedButton delete-implementation product-button addDeploymentBtn" href="#"
|
<a class="roundedButton delete-implementation product-button addDeploymentBtn" href="#"
|
||||||
data-id="{$ID}"
|
data-id="{$ID}"
|
||||||
|
data-is_draft="{$isDraft}"
|
||||||
data-class="<% control MarketPlace %><% if Name == "Appliance" %>appliance<% end_if %><% if Name == "Distribution" %>distribution<% end_if %><% end_control %>">Delete Product</a>
|
data-class="<% control MarketPlace %><% if Name == "Appliance" %>appliance<% end_if %><% if Name == "Distribution" %>distribution<% end_if %><% end_control %>">Delete Product</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><a href="$Top.Link(private_clouds)?sort=company">Company ^</a></th>
|
<th><a href="$Top.Link(private_clouds)?sort=company">Company ^</a></th>
|
||||||
<th><a href="$Top.Link(private_clouds)?sort=name">Product Name ^</a></th>
|
<th><a href="$Top.Link(private_clouds)?sort=name">Product Name ^</a></th>
|
||||||
|
<th>Published</th>
|
||||||
<th><a href="$Top.Link(private_clouds)?sort=status">Status ^</a></th>
|
<th><a href="$Top.Link(private_clouds)?sort=status">Status ^</a></th>
|
||||||
<th><a href="$Top.Link(private_clouds)?sort=updated">Last Update ^</a></th>
|
<th><a href="$Top.Link(private_clouds)?sort=updated">Last Update ^</a></th>
|
||||||
<% if Top.isSuperAdmin %>
|
<% if Top.isSuperAdmin %>
|
||||||
@ -59,6 +60,9 @@
|
|||||||
<td>
|
<td>
|
||||||
$Name
|
$Name
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if LiveServiceID == 0 %>Draft<% else %>Published<% end_if %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
||||||
</td>
|
</td>
|
||||||
@ -75,10 +79,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<td style="min-width: 200px" width="30%">
|
<td style="min-width: 200px" width="30%">
|
||||||
<a class="product-button roundedButton addDeploymentBtn" href="$Top.Link(private_cloud)?id=$ID">Edit Product Details</a>
|
<a class="product-button roundedButton addDeploymentBtn" href="$Top.Link(private_cloud)?id=$ID&is_draft=$isDraft">Edit Product Details</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(private_cloud)/$ID/preview">Preview Product</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(private_cloud)/$ID/<% if isDraft %>draft_<% end_if %>preview">Preview Product</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(private_cloud)/$ID/pdf">PDF</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(private_cloud)/$ID/<% if isDraft %>draft_<% end_if %>pdf">PDF</a>
|
||||||
<a class="roundedButton delete-private-cloud product-button addDeploymentBtn" href="#" data-id="{$ID}">Delete Product</a>
|
<a class="roundedButton delete-private-cloud product-button addDeploymentBtn" href="#" data-id="{$ID}" data-is_draft="{$isDraft}">Delete Product</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><a href="$Top.Link(public_clouds)?sort=company">Company ^</a></th>
|
<th><a href="$Top.Link(public_clouds)?sort=company">Company ^</a></th>
|
||||||
<th><a href="$Top.Link(public_clouds)?sort=name">Product Name ^</a></th>
|
<th><a href="$Top.Link(public_clouds)?sort=name">Product Name ^</a></th>
|
||||||
|
<th>Published</th>
|
||||||
<th><a href="$Top.Link(public_clouds)?sort=status">Status ^</a></th>
|
<th><a href="$Top.Link(public_clouds)?sort=status">Status ^</a></th>
|
||||||
<th><a href="$Top.Link(public_clouds)?sort=updated">Last Update ^</a></th>
|
<th><a href="$Top.Link(public_clouds)?sort=updated">Last Update ^</a></th>
|
||||||
<% if Top.isSuperAdmin %>
|
<% if Top.isSuperAdmin %>
|
||||||
@ -59,6 +60,9 @@
|
|||||||
<td>
|
<td>
|
||||||
$Name
|
$Name
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if LiveServiceID == 0 %>Draft<% else %>Published<% end_if %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
<% if Active %>Active<% else %>Deactivated<% end_if %>
|
||||||
</td>
|
</td>
|
||||||
@ -75,10 +79,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<td style="min-width: 200px" width="30%">
|
<td style="min-width: 200px" width="30%">
|
||||||
<a class="product-button roundedButton addDeploymentBtn" href="$Top.Link(public_cloud)?id=$ID">Edit Product Details</a>
|
<a class="product-button roundedButton addDeploymentBtn" href="$Top.Link(public_cloud)?id=$ID&is_draft=$isDraft">Edit Product Details</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(public_cloud)/$ID/preview">Preview Product</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(public_cloud)/$ID/<% if isDraft %>draft_<% end_if %>preview">Preview Product</a>
|
||||||
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(public_cloud)/$ID/pdf">PDF</a>
|
<a target="_blank" class="product-button roundedButton addDeploymentBtn" href="$Top.Link(public_cloud)/$ID/<% if isDraft %>draft_<% end_if %>pdf">PDF</a>
|
||||||
<a class="roundedButton delete-public-cloud product-button addDeploymentBtn" href="#" data-id="{$ID}">Delete Product</a>
|
<a class="roundedButton delete-public-cloud product-button addDeploymentBtn" href="#" data-id="{$ID}" data-is_draft="{$isDraft}">Delete Product</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-appliance" href="#" id="save-appliance">Save</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-appliance" href="#" id="save-appliance">Save</a>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-appliance" href="#" id="publish-appliance">Publish</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-appliance" href="#" id="publish-appliance">Publish</a>
|
||||||
<% if CurrentAppliance %>
|
<% if CurrentAppliance %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(appliance)/$CurrentAppliance.ID/draft_preview">Preview</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(appliance)/$CurrentAppliance.ID/<% if CurrentAppliance.isDraft %>draft_<% end_if %>preview">Preview</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% if CurrentAppliance %>
|
<% if CurrentAppliance %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(appliance)/$CurrentAppliance.ID/draft_pdf">Download PDF</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(appliance)/$CurrentAppliance.ID/<% if CurrentAppliance.isDraft %>draft_<% end_if %>pdf">Download PDF</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link"><< Back to Products</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link"><< Back to Products</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-consultant" href="#" id="save-consultant" name="save-consultant">Save</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-consultant" href="#" id="save-consultant" name="save-consultant">Save</a>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-consultant" href="#" id="publish-consultant">Publish</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-consultant" href="#" id="publish-consultant">Publish</a>
|
||||||
<% if CurrentConsultant %>
|
<% if CurrentConsultant %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(consultant)/$CurrentConsultant.ID/draft_preview">Preview</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(consultant)/$CurrentConsultant.ID/<% if CurrentConsultant.isDraft %>draft_<% end_if %>preview">Preview</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% if CurrentConsultant %>
|
<% if CurrentConsultant %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(consultant)/$CurrentConsultant.ID/draft_pdf">Download PDF</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(consultant)/$CurrentConsultant.ID/<% if CurrentConsultant.isDraft %>draft_<% end_if %>pdf">Download PDF</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link(consultants)"><< Back to Products</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link(consultants)"><< Back to Products</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-distribution" href="#" id="save-distribution">Save</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-distribution" href="#" id="save-distribution">Save</a>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-distribution" href="#" id="publish-distribution">Publish</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-distribution" href="#" id="publish-distribution">Publish</a>
|
||||||
<% if CurrentDistribution %>
|
<% if CurrentDistribution %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(distribution)/$CurrentDistribution.ID/draft_preview">Preview</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(distribution)/$CurrentDistribution.ID/<% if CurrentDistribution.isDraft %>draft_<% end_if %>preview">Preview</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% if CurrentDistribution %>
|
<% if CurrentDistribution %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(distribution)/$CurrentDistribution.ID/draft_pdf">Download PDF</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(distribution)/$CurrentDistribution.ID/<% if CurrentDistribution.isDraft %>draft_<% end_if %>pdf">Download PDF</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link"><< Back to Products</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link"><< Back to Products</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-private-cloud" href="#" id="save-private-cloud1">Save</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-private-cloud" href="#" id="save-private-cloud1">Save</a>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-private-cloud" href="#" id="publish-private-cloud1">Publish</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-private-cloud" href="#" id="publish-private-cloud1">Publish</a>
|
||||||
<% if CurrentPrivateCloud %>
|
<% if CurrentPrivateCloud %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(private_cloud)/$CurrentPrivateCloud.ID/draft_preview">Preview</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(private_cloud)/$CurrentPrivateCloud.ID/<% if CurrentPrivateCloud.isDraft %>draft_<% end_if %>preview">Preview</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% if CurrentPrivateCloud %>
|
<% if CurrentPrivateCloud %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(private_cloud)/$CurrentPrivateCloud.ID/draft_pdf">Download PDF</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(private_cloud)/$CurrentPrivateCloud.ID/<% if CurrentPrivateCloud.isDraft %>draft_<% end_if %>pdf">Download PDF</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link(private_clouds)"><< Back to Products</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link(private_clouds)"><< Back to Products</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-public-cloud" href="#" id="save-public-cloud1">Save</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center" class="roundedButton save-public-cloud" href="#" id="save-public-cloud1">Save</a>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-public-cloud" href="#" id="publish-public-cloud1">Publish</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton publish-public-cloud" href="#" id="publish-public-cloud1">Publish</a>
|
||||||
<% if CurrentPublicCloud %>
|
<% if CurrentPublicCloud %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(public_cloud)/$CurrentPublicCloud.ID/draft_preview">Preview</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(public_cloud)/$CurrentPublicCloud.ID/<% if CurrentPublicCloud.isDraft %>draft_<% end_if %>preview">Preview</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% if CurrentPublicCloud %>
|
<% if CurrentPublicCloud %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(public_cloud)/$CurrentPublicCloud.ID/draft_pdf">Download PDF</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" target="_blank" href="$Top.Link(public_cloud)/$CurrentPublicCloud.ID/<% if CurrentPublicCloud.isDraft %>draft_<% end_if %>pdf">Download PDF</a>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link(public_clouds)"><< Back to Products</a>
|
<a style="overflow:hidden;white-space: nowrap;font-weight:normal;float:right;margin-bottom:50px;text-align:center;margin-right:50px;" class="roundedButton addDeploymentBtn" href="$Top.Link(public_clouds)"><< Back to Products</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user