Exemplo n.º 1
0
 public static function showAttachments($model)
 {
     $x = $model->attachments;
     //echo $x;
     $y = explode(",", $x);
     $str = "<ul>";
     for ($i = 1; $i < sizeof($y); $i++) {
         $files = Files::model()->findByPk($y[$i]);
         $str .= "<li>" . CHtml::link($files->originalname, Ccontroller::createUrl('/files/file', array('id' => $y[$i])));
     }
     $str .= "</ul>";
     return $str;
 }
Exemplo n.º 2
0
:</b>
	<?php 
echo CHtml::encode($data->description);
?>
	<br />
	<b><?php 
echo CHtml::encode("Attachments:");
?>
:</b>
	<?php 
$x = $data->attachments;
$y = explode(",", $x);
echo "<ul>";
for ($i = 1; $i < sizeof($y); $i++) {
    $files = Files::model()->findByPk($y[$i]);
    echo "<li>" . CHtml::link($files->originalname, Ccontroller::createUrl('/files/file', array('id' => $y[$i])));
}
echo "</ul>";
?>
	<br />

	<?php 
/*
	<b><?php echo CHtml::encode($data->getAttributeLabel('status')); ?>:</b>
	<?php echo CHtml::encode($data->status); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('history')); ?>:</b>
	<?php echo CHtml::encode($data->history); ?>
	<br />
*/
?>
Exemplo n.º 3
0
Arquivo: view.php Projeto: ranvirp/rdp
<?php 
$this->breadcrumbs = array('Issues' => array('index'), $model->id);
$this->menu = array(array('label' => 'List Issues ', 'url' => array('index')), array('label' => 'Create Issue', 'url' => array('create')), array('label' => 'Update Issue', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Issue', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Do you want to delete this entry?')), array('label' => 'Issue Management', 'url' => array('admin')));
?>

<h1>Issue # <?php 
echo $model->id;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('label' => 'Scheme', 'type' => 'html', 'value' => $model->scheme->name), array('label' => 'From:', 'value' => $model->froms->designation_type->name . "," . Designation::model()->getLevelObj($model->froms->designation_type->level, $model->froms->level_id)), array('label' => 'Referenced to:', 'value' => $model->tos->designation_type->name . "," . Designation::model()->getLevelObj($model->tos->designation_type->level, $model->tos->level_id)), array('name' => 'description', 'label' => 'Details '), array('label' => 'Attachments :', 'type' => 'html', 'value' => Files::model()->showAttachments($model)))));
echo $this->renderPartial('_replies', array('replies' => $model->replies), true);
echo CHtml::ajaxButton('Mark replies', Ccontroller::createUrl('/replies/create', array('content_type' => 'issues', 'content_type_id' => $model->id)), array('dataType' => 'json', 'success' => "function(data){\n\t\$('#commentdiv').html(data.html);\n\t}"));
?>
<div id="commentdiv"></div>
Exemplo n.º 4
0
function showLink($y)
{
    $files = Files::model()->findByPk($y);
    return CHtml::link($files->originalname, Ccontroller::createUrl('/files/file', array('id' => $y)));
}