コード例 #1
0
ファイル: _view.php プロジェクト: ASDAFF/RosYama.2
        echo $data->ID;
        ?>
');" title="Показывать этот дефект всем"></div>
				<?php 
    }
    ?>
				<div class="del"><a title="Удалить дефект" href="#" onclick="ShowDelForm(this, '<?php 
    echo $data->ID;
    ?>
'); return false;"><img src="/images/st1234/icondel.gif"></a></div>
			<?php 
}
?>
			<div class="properties">
				<p class="date"><?php 
echo CHtml::encode(Y::dateFromTime($data->DATE_CREATED));
if ($data->comments_cnt) {
    echo CHtml::link('<span class="commentsHot">' . $data->comments_cnt . '</span>', array('view', 'id' => $data->ID, '#' => 'comments'), array('title' => 'Комментарии'));
}
?>
</p>
				<div class="service"><?php 
echo CHtml::encode($data->ADDRESS);
?>
<i></i></div>
				<div class="social">
					<img src="/images/st1234/<?php 
echo CHtml::encode($data->type->alias);
?>
.png" title="<?php 
echo CHtml::encode($data->type->name);
コード例 #2
0
    echo Yii::t('CommentsModule.msg', 'Last comments');
    ?>
</h2></div>
            <div class="commentResults">

                <?php 
    foreach ($comments as $comment) {
        ?>
                    <div class="commentItem">
                        <div class="commentName"><?php 
        echo $comment->user->fullname;
        ?>
</div>
                        <div class="commentSpacer">-</div>
                        <div class="commentDate"><?php 
        echo CHtml::encode(Y::dateFromTime($comment->create_time));
        ?>
</div>
                        <div class="commentText">
                            <a href="<?php 
        echo Yii::app()->createUrl('holes/view', array('id' => $comment->owner_id, '#' => 'comment-' . $comment->id));
        ?>
"><?php 
        if (mb_strlen($comment->comment_text) > $textLength) {
            $str = mb_substr($comment->comment_text, 0, $textLength);
            echo nl2br(CHtml::encode(mb_substr($str, 0, mb_strrpos($str, ' ')))) . '...';
        } else {
            echo nl2br(CHtml::encode($comment->comment_text));
        }
        ?>
</a>
コード例 #3
0
ファイル: view.php プロジェクト: snipesn/UkrYama-2
$this->breadcrumbs = array('News' => array('index'), $model->title);
$this->menu = array(array('label' => 'List News', 'url' => array('index')), array('label' => 'Create News', 'url' => array('create')), array('label' => 'Update News', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete News', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => 'Manage News', 'url' => array('admin')));
?>
<div class="lCol">
<?php 
$this->widget('application.widgets.social.socialWidget');
?>
</div>
<div class="rCol">
	<div class="news-detail">
				<h1><?php 
echo $model->title;
?>
</h1>
						 <p class="date"><?php 
echo CHtml::encode(Y::dateFromTime($model->date));
?>
</p>
			
	<?php 
echo $model->fulltext;
?>
	<div style="clear:both"></div>
		<br />
				</div>
	<p><?php 
echo CHtml::link('Возврат к списку', array('index'));
?>
</p>
	 
	</div>
コード例 #4
0
ファイル: default.php プロジェクト: ASDAFF/RosYama.2
<!-- NEWS -->
<div class="news-list-mainpage">
<?php 
foreach ($model as $news) {
    ?>
	
	<div class="news-item">		
					<p  class="date"><?php 
    echo Y::dateFromTime($news->date);
    ?>
</p>
					<h3><?php 
    echo CHtml::link($news->title, array('news/view', 'id' => $news->id));
    ?>
</h3>		
					<p><?php 
    echo $news->introtext;
    ?>
</p>
					<?php 
    echo CHtml::link('>>', array('news/view', 'id' => $news->id), array('class' => "show"));
    ?>
	</div>
<?php 
}
echo CHtml::link('Все новости', array('news/index'), array('class' => 'news-all'));
?>
<div style="clear:both"></div>
</div>
<!-- /NEWS -->
コード例 #5
0
ファイル: _view.php プロジェクト: snipesn/UkrYama-2
<div class="view">

<p class="date"><?php 
echo CHtml::encode(Y::dateFromTime($data->date));
?>
</p>
<p class="preview_text"><?php 
echo CHtml::encode($data->introtext);
?>
 <?php 
echo CHtml::link('&rarr;', array('view', 'id' => $data->id), array('class' => 'arrow'));
?>
</p>
	<?php 
/*
	<b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
	<?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('date')); ?>:</b>
	<?php echo CHtml::encode($data->date); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('picture')); ?>:</b>
	<?php echo CHtml::encode($data->picture); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('title')); ?>:</b>
	<?php echo CHtml::encode($data->title); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('introtext')); ?>:</b>
	<?php echo CHtml::encode($data->introtext); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('fulltext')); ?>:</b>
コード例 #6
0
ファイル: view.php プロジェクト: nikel303/RosYama.2
							<?php foreach ($hole->requests_gibdd as $request) : ?>
							<?php  if ($request->user) : ?>
								<li><?php echo date('d.m.Y',$request->date_sent);?> <?php echo $userlink=CHtml::link(CHtml::encode($request->user->getParam('showFullname') ? $request->user->Fullname : ($request->user->name ? $request->user->name : $request->user->username)), array('/profile/view', 'id'=>$request->user->id),array('class'=>""));?>  отправил запрос в ГИБДД
								<?php if ($hole->STATE == 'fixed' && $fix=$hole->getFixByUser($request->user->id)) : ?> 
								<br /><?php echo date('d.m.Y',$fix->date_fix);?> <?php echo $userlink; ?> отметил факт исправления дефекта
								<?php endif; ?>
								</li>
							<?php endif; ?>
							<?php endforeach; ?>
							<li>==========</li>
							</ul>							
							</div>
						<? endif; ?>	
					<? endif; ?>
					<? if($hole->STATE == 'fixed' && $hole->DATE_STATUS): ?>
						<?= CHtml::encode(Y::dateFromTime($hole->DATE_STATUS))?> отмечен факт исправления дефекта
					<? endif; ?>
				</span>
			</p>
			<div class="control">
			<div class="progress">
			<? if($hole->WAIT_DAYS): ?>
			<div class="lc">
				<div class="wait">
					<p>Ждать, когда отремонтируют</p>
					<p class="days"><?php echo Y::declOfNum($hole->WAIT_DAYS, array('день', 'дня', 'дней')); ?></p> 
				</div>
			</div>
			<? elseif($hole->PAST_DAYS): ?>
			<div class="lc">
				<div class="wait">
コード例 #7
0
ファイル: view.php プロジェクト: ASDAFF/RosYama.2
							<ul>
							<?php foreach ($hole->requests as $request) : ?>
							<?php  if ($request->user) : ?>
								<li><?php echo date('d.m.Y',$request->date_sent);?> <?php echo $userlink=CHtml::link(CHtml::encode($request->user->getParam('showFullname') ? $request->user->Fullname : ($request->user->name ? $request->user->name : $request->user->username)), array('/profile/view', 'id'=>$request->user->id),array('class'=>""));?>  отправил запрос в <?php echo $request->typeString;?>
								<?php if ($hole->STATE == 'fixed' && $fix=$hole->getFixByUser($request->user->id)) : ?> 
								<br /><?php echo date('d.m.Y',$fix->date_fix);?> <?php echo $userlink; ?> отметил факт исправления дефекта
								<?php endif; ?>
								</li>
							<?php endif; ?>
							<?php endforeach; ?>
							<li>==========</li>
							</ul>							
							</div>
					<?php endif;?>
					<? if($hole->STATE == 'fixed' && ($hole->fixeds || $hole->DATE_STATUS)): ?>
						<br /><?= CHtml::encode(Y::dateFromTime($hole->fixeds ? $hole->fixeds[0]->date_fix : $hole->DATE_STATUS))?> отмечен факт исправления дефекта
					<? endif; ?>
				</span>
			</p>
			<div class="control">
			<div class="progress">
			<? if($hole->WAIT_DAYS): ?>
			<div class="lc">
				<div class="wait">
					<p>Ждать, когда отремонтируют</p>
					<p class="days"><?php echo Y::declOfNum($hole->WAIT_DAYS, array('день', 'дня', 'дней')); ?></p> 
				</div>
			</div>
			<? elseif($hole->PAST_DAYS): ?>
			<div class="lc">
				<div class="wait">
コード例 #8
0
ファイル: view.php プロジェクト: snipesn/UkrYama-2
                $arr[] = array('name' => Yii::t('holes_view', 'HOLE_REQUEST_DELIVERDATE', array('{0}' => $request->{$param}->name)), 'date' => Yii::t('holes_view', 'HOLE_REQUEST_NOTDELIVERED'));
            }
        }
    }
    if ($request->answers) {
        foreach ($request->answers as $answer) {
            $arr[] = array('name' => Yii::t('holes_view', 'HOLE_ANSWER_DATE_FROM', array('{0}' => $request->{$param}->name)), 'date' => Y::dateFromTime($answer->date));
            $arr[] = array('name' => Yii::t('holes_view', 'HOLE_ANSWER_CREATEDATE_FROM', array('{0}' => $request->{$param}->name)), 'date' => Y::dateTimeFromTime($answer->createdate));
        }
    }
}
$fixeds = $hole->fixeds;
if ($fixeds) {
    foreach ($fixeds as $fix) {
        $arr[] = array('name' => CHtml::tag('b', array(), Yii::t('holes_view', 'HOLE_FIX_USER', array('{0}' => $fix->user->FullName))));
        $arr[] = array('name' => Yii::t('holes_view', 'HOLE_FIX_DATE'), 'date' => Y::dateFromTime($fix->date_fix));
        $arr[] = array('name' => Yii::t('holes_view', 'HOLE_FIX_CREATEDATE'), 'date' => Y::dateTimeFromTime($fix->createdate));
    }
}
$dataProvider = new CArrayDataProvider($arr, array('pagination' => false, 'keyField' => false));
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'summaryText' => '', 'hideHeader' => true, 'template' => '{items}{pager}', 'columns' => array(array('name' => 'name', 'type' => 'raw'), 'date')));
?>
						</span>
					</p>
					<?php 
if (!$hole->PREMODERATED) {
    ?>
					<p><font class="errortext premoderate"><?php 
    echo Yii::t('holes_view', 'PREMODRATION_WARNING');
    ?>
</font><br/></p>