Project

General

Profile

« Previous | Next » 

Revision 31245

fixed issue #704

View differences:

modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/models/search.php
3797 3797
				throw new Exception('error parsing publication');
3798 3798
            if (($fundingNodes = $xpath -> query('./field[@name = "funding"]', $projectNode)) == FALSE)
3799 3799
				throw new Exception('error parsing publication');
3800
		    
3800
		   
3801 3801
			
3802 3802
			$project = new JObject();
3803 3803
			$project -> id = (($idNode = $idNodes -> item(0)) == NULL) ? NULL : trim($idNode -> nodeValue);
......
3807 3807
            $project -> inferred = (($inferredNode = $inferredNodes -> item(0)) == NULL) ? NULL : trim($inferredNode -> nodeValue)=="true"?true:false;
3808 3808
			$project -> trust = (($trustNode = $trustNodes -> item(0)) == NULL) ? NULL : trim($trustNode -> nodeValue);
3809 3809
            $project -> provenance = (($provenanceNode = $provenanceNodes -> item(0)) == NULL) ? NULL : trim($provenanceNode -> nodeValue);
3810
            $project -> funding = new JObject();
3810
         /*   $project -> funding = new JObject();
3811 3811
			if (($fundingNode = $fundingNodes -> item(0)) == NULL) ;
3812 3812
			else
3813 3813
			{
3814 3814
			    if (($funding0Nodes = $xpath -> query('./field[@name = "funding_level_0"]/@value', $fundingNode)) == FALSE)
3815 3815
				    throw new Exception('error parsing publication test');
3816 3816
			    $project -> funding->funding_level_0 = (($funding0Node = $funding0Nodes -> item(0)) == NULL) ? NULL : trim($funding0Node -> nodeValue);
3817
			}*/
3818
			
3819
			$project -> funding = new JObject();
3820
			$project -> funding->funding_level_0 = NULL;
3821
			$project -> funding->funding_level_1 = NULL;
3822
			$project -> funding->funding_level_2 = NULL;
3823
			
3824
			if (($fundingNode = $fundingNodes -> item(0)) == NULL);		
3825
			else{
3826
				if (($funding0Nodes = $xpath -> query('./field[@name = "funding_level_0"]', $fundingNode)) == FALSE)
3827
					throw new Exception('error parsing project');
3828
				if (($funding1Nodes = $xpath -> query('./field[@name = "funding_level_1"]', $fundingNode)) == FALSE)
3829
					throw new Exception('error parsing project');
3830
				if (($funding2Nodes = $xpath -> query('./field[@name = "funding_level_2"]', $fundingNode)) == FALSE)
3831
					throw new Exception('error parsing project');						
3832
				if (($funding0Node = $funding0Nodes -> item(0)) == NULL) ;
3833
				else
3834
				{
3835
					if (($funding0NameNodes = $xpath -> query('./@value_original', $funding0Node)) == FALSE)
3836
						throw new Exception('error parsing publication test');
3837
					$project -> funding -> funding_level_0 = (($funding0NameNode = $funding0NameNodes -> item(0)) == NULL) ? NULL : trim($funding0NameNode -> nodeValue);
3838
					$array=explode("::",$project -> funding -> funding_level_0 );
3839
					$project -> funding -> funding_level_0 =$array[sizeof($array)-1];
3840
				}
3841
				if (($funding1Node = $funding1Nodes -> item(0)) == NULL) ;
3842
				else
3843
				{
3844
					if (($funding1NameNodes = $xpath -> query('./@value_original', $funding1Node)) == FALSE)
3845
						throw new Exception('error parsing publication test');
3846
					$project -> funding -> funding_level_1 = (($funding1NameNode = $funding1NameNodes -> item(0)) == NULL) ? NULL : trim($funding1NameNode -> nodeValue);
3847
					$array=explode("::",$project -> funding -> funding_level_1 );
3848
					$project -> funding -> funding_level_1 =$array[sizeof($array)-1];
3849
				}
3850
				if (($funding2Node = $funding2Nodes -> item(0)) == NULL) ;
3851
				else
3852
				{
3853
					if (($funding2NameNodes = $xpath -> query('./@value_original', $funding2Node)) == FALSE)
3854
						throw new Exception('error parsing publication test');
3855
					$project -> funding -> funding_level_2 = (($funding2NameNode = $funding2NameNodes -> item(0)) == NULL) ? NULL : trim($funding2NameNode -> nodeValue);
3856
					$array=explode("::",$project -> funding -> funding_level_2 );
3857
					$project -> funding -> funding_level_2 =$array[sizeof($array)-1];
3858
				}	
3817 3859
			}
3860
			//!!!!
3818 3861
			
3819 3862
			if (($project -> id != NULL) || ($project -> acronym != NULL) || ($project -> title != NULL) || ($project -> code != NULL))
3820 3863
				$publication -> projects[] = $project;
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/article/tmpl/default.php
750 750
						<div class="functionsSection">
751 751
							<h3 class="title"><?php echo(JText :: _('FUNDED_BY_PROJECTS')); ?></h3>
752 752
							<ul class="line">
753
								
753 754
								<?php foreach($this -> article -> projects as $project) {
754 755
									if (($project != NULL) && (($project -> acronym != NULL) || ($project -> title != NULL))) { ?>
756
									<!-- slow ajax call
755 757
										<li><span><?php echo((($project -> id == NULL) ? '' : ('<a href="' . JRoute :: _('index.php?option=com_openaire&view=project&Itemid=' . $this -> itemId . '&projectId=' . $project -> id) . '">')) . ($project -> funding->funding_level_0 != NULL?$project -> funding->funding_level_0 . ": ":"") . (($project -> acronym == NULL) ? $project -> title : $project -> acronym) . (($project -> code == NULL) ? '' : (' (' . $project -> code . ')')) . (($project -> id == NULL) ? '' : ('</a>'))); ?></span>
756 758
										<span onmouseover="tooltip.ajax(this, 'index.php?option=com_openaire&view=projectfundings&format=raw&Itemid=<?php echo JRequest :: getUInt('Itemid', 0)?>&publicationId=<?php echo $this -> article -> id?>&project=<?php echo $project->id?>');"><img src="templates/yoo_solar/styles/openaire/images/box_info<?php echo ($project -> inferred)?"_ok":""?>.png" /></span>
759
										</li> -->
760
										<li>
761
										 <span><?php echo((($project -> id == NULL) ? '' : ('<a href="' . JRoute :: _('index.php?option=com_openaire&view=project&Itemid=' . $this -> itemId . '&projectId=' . $project -> id) . '">')) . ($project -> funding->funding_level_0 != NULL?$project -> funding->funding_level_0 . ": ":"") . (($project -> acronym == NULL) ? $project -> title : $project -> acronym) . (($project -> code == NULL) ? '' : (' (' . $project -> code . ')')) . (($project -> id == NULL) ? '' : ('</a>'))); ?></span>
762
										<span onmouseover="tooltip.pop(this, '#demo2_tip')"> <img src="templates/yoo_solar/styles/openaire/images/box_info<?php echo ($project -> inferred)?"_ok":""?>.png" /></span>
763
										<div style="display:none;"> <div id="demo2_tip"> 
764
											<h3><?php echo $project -> title?></h3>
765
											<ul>
766
											<?php if ($project -> funding -> funding_level_0 != NULL){ ?>
767
											<li><?php echo $project -> funding -> funding_level_0?></li>
768
											<?php }?>
769
											<?php if ($project -> funding -> funding_level_1 != NULL){ ?>
770
											<li><?php echo $project -> funding -> funding_level_1?></li>
771
											<?php }?>
772
											<?php if ($project -> funding -> funding_level_2 != NULL){ ?>
773
											<li><?php echo $project -> funding -> funding_level_2?></li>
774
											<?php }?>
775
											</ul>
776
											<?php if ($project -> inferred){?>
777
											<div>trust: <?php echo $project -> trust?>, provenance: <?php echo $project -> provenance?></div>
778
											<?php }?>
779
											</div> </div>
757 780
										</li>
758 781
									<?php }?>
759 782
								<?php }?>
783
								
760 784
							</ul>
761 785
						</div>
762 786
					<?php } ?>
......
808 832
		
809 833
		<?php if ($this -> article -> pids != NULL) {
810 834
						$doi='';
811
						$arxiv='';
812
						
813
						
835
						$arxiv='';												
814 836
						foreach($this -> article -> pids as $pid){						
815 837
							if(strpos($pid-> clazz,OpenAireViewArticle :: DOI)!==false){								
816 838
								$doi=$pid-> value;

Also available in: Unified diff