コード例 #1
0
ファイル: _view.php プロジェクト: nmalservet/biocap
<?php

/* @var $this SearchBiobankController */
/* @var $data Biobank */
?>
<div class='view'>
    <?php 
foreach (Biobank::Model()->attributeExportedLabels() as $attribute => $value) {
    if (isset($data->{$attribute})) {
        ?>
            <b><?php 
        echo CHtml::encode($data->getAttributeLabel($attribute));
        ?>
:</b>
            <?php 
        switch ($attribute) {
            case 'contact_id':
                echo $data->contact_id != null && !empty($data->contact_id) ? CHtml::encode($data->getShortContact()) . '<br>' . CHtml::encode($data->getEmailContact()) . '<br>' . CHtml::encode($data->getPhoneContact()) : "";
                break;
            case 'address':
                echo nl2br($data->getAddress());
                break;
            case 'website':
                echo CHtml::link($data->website, 'http://' . $data->website, array('target' => 'blank'));
                break;
            default:
                echo CHtml::encode($data->{$attribute});
                break;
        }
        ?>
            <br />
コード例 #2
0
ファイル: _view.php プロジェクト: nmalservet/biocap
/* @var $this SearchEchantillonController */
/* @var $data Echantillon */
?>

<div class='view'>
<?php 
foreach (Echantillon::Model()->attributeExportedLabels() as $attribute => $value) {
    ?>
<b><?php 
    echo CHtml::encode($data->getAttributeLabel($attribute));
    ?>
:</b>
<?php 
    if ($attribute == 'biobank_id') {
        echo CHtml::encode(Biobank::Model()->findByPk($data->{$attribute})->identifier);
        ?>
		<?php 
    } elseif ($attribute == 'notes') {
        foreach ($data->notes as $note) {
            if ($note->VALEUR != null && !empty($note->VALEUR)) {
                echo CHtml::encode($note->CLE . ' : ' . $note->VALEUR);
                ?>
<br><?php 
            }
        }
    } elseif ($attribute == "storage_conditions") {
        echo CHtml::encode($data->getLiteralStorageCondition());
    } elseif ($attribute == "gender") {
        $genderList = $data->getArrayGender();
        echo CHtml::encode($genderList[$data->gender]);