Issue #0001653: Corrections concernant des organisations

This commit is contained in:
Aram HARUTYUNYAN 2013-09-12 14:12:15 +00:00
parent 6cb5c01343
commit e8821c87b3
5 changed files with 29 additions and 20 deletions

View File

@ -16,13 +16,13 @@ class WorldcheckController extends Zend_Controller_Action
{
$request = $this->getRequest();
$param = new stdClass();
$request->getParam('dirNom');
$param->dirSociete = $request->getParam('dirSociete');
$param->dirNom = $request->getParam('dirNom');
$param->dirPrenom = $request->getParam('dirPrenom');
$param->dirType = $request->getParam('dirType');
$data = new stdClass();
$data->name = $param->dirNom;
$data->name = ($param->dirNom)?$param->dirNom:$param->dirSociete;
$data->nameType = $param->dirType;
$user = new Scores_Utilisateur();
@ -30,7 +30,7 @@ class WorldcheckController extends Zend_Controller_Action
$wcLocal = new Application_Model_Worldcheck();
//check worldcheck data correctness in the session
if (!$user->getScreenerName() || $user->getScreenerName()!=$param->dirNom || substr($user->getScreenerNameIdentifier(),0,3)!='so_' || $user->getNameType()!=$param->dirType)
if (!$user->getScreenerName() || $user->getScreenerName()!=$data->name || substr($user->getScreenerNameIdentifier(),0,3)!='so_' || $user->getNameType()!=$data->nameType)
{
$idClient = $user->getIdClient();
$login = $user->getLogin();
@ -40,9 +40,9 @@ class WorldcheckController extends Zend_Controller_Action
//Save nameIdentifier, name, nameType into session
$wcheck = new stdClass();
$wcheck->screenerNameIdentifier = $this->nameIdentifier;
$wcheck->screenerName = $param->dirNom;
$wcheck->screenerName = $data->name;
$wcheck->matchCount = $localDBParams->matchCount;
$wcheck->nameType = $param->dirType;
$wcheck->nameType = $data->nameType;
$auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) {
@ -76,7 +76,7 @@ class WorldcheckController extends Zend_Controller_Action
$filteredWC = array();
foreach ($unfilteredWC as $entityId=>$shortData)
{
if (stripos($shortData->lastName, $param->dirNom)!==false || stripos($param->dirNom, $shortData->lastName)!==false) {
if (stripos($shortData->lastName, $data->name)!==false || stripos($data->name, $shortData->lastName)!==false) {
if (stripos($shortData->givenName, $param->dirPrenom)!==false || stripos($param->dirPrenom, $shortData->givenName)!==false) {
$filteredWC[$entityId] = $shortData;
}

View File

@ -135,15 +135,22 @@ if (isset($content[0]->associates->associate)) {
foreach($content[0]->associates->associate as $associate)
{ ?>
<h2>
<?php
if ($associate->associatetype=='ASSOCIATE')
{
$dirType = 'INDIVIDUAL';
$dirName = 'dirNom';
} else {
$dirType = 'ORGANISATION';
$dirName = 'dirSociete';
}
?>
<? $params = array(
$dirName => $associate->targetEntity->names->name[0]->lastName,
'dirPrenom' => $associate->targetEntity->names->name[0]->givenName,
'dirType' => $dirType);?>
Associate: <?=$associate->targetEntity->names->name[0]->fullName;?>
<?php $dirType = ($associate->associatetype=='ASSOCIATE')?'INDIVIDUAL':'ORGANISATION';?>
<a href="<?=$this->url(array(
'controller' => 'worldcheck',
'action' => 'index',
'dirNom' => $associate->targetEntity->names->name[0]->lastName,
'dirPrenom' => $associate->targetEntity->names->name[0]->givenName,
'dirType' => $dirType), null, true)?>" title="WorldCheck" style="cursor: pointer;" >
<div style='float:right;'><img src="/themes/default/images/worldcheck/wc-blanc.png" /></div></a>
<div style='float:right;'><?=$this->action('occurence','worldcheck', null, $params);?></div>
</h2>
<div class="paragraph">
<table cellpadding=3>

View File

@ -14,24 +14,26 @@
'dirType' => $this->data->Type);
?>
<a class='wcheck' tooltip='<?=$qtipContent ?>' href="<?=$this->url($params, null, true)?>" style="cursor: pointer;" >
<div id='_<?=$this->occurrence;?>' class='img'></div></a><br/>
<div id='<?=$this->occurrence;?>' class='img'></div></a><br/>
<style>
div.img {background:url(/themes/default/images/worldcheck/wc.png) no-repeat; height:25px; width:25px; float:left;}
div.img {background:url(/themes/default/images/worldcheck/wc.png) no-repeat; height:19px; width:19px; float:left;}
</style>
<script>
$(document).ready(function(){
$('a.wcheck div').each(function(){
if ($(this).attr('id')=='_0') {
if ($(this).attr('id')=='0') {
$(this).css("backgroundImage", 'url(/themes/default/images/worldcheck/wc0.png)');
}
});
});
$('a.wcheck').qtip({
content: $('a.wcheck').attr('tooltip'),
position: { at: "right center", my: "bottom left" }
$('a.wcheck').each(function(){
$(this).qtip({
content: $(this).attr('tooltip'),
position: { at: "right center", my: "bottom left" }
});
});
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB