Пример #1
0
 /**
  * @return array
  */
 public static function appVersions()
 {
     $_versions = array();
     $p = dirname(bp());
     $d = dir($p);
     while (false !== ($entry = $d->read())) {
         if (substr($entry, 0, 4) == 'app-') {
             $time = filemtime($p . DS . $entry);
             $_versions[$time] = array('entry' => $entry, 'display' => $entry . ' -- ' . date(self::item('dateTimeFormat'), $time) . ' -- (' . Time::ago($time) . ')');
         }
     }
     $d->close();
     krsort($_versions);
     $versions = array();
     foreach ($_versions as $version) {
         $versions[$version['entry']] = $version['display'];
     }
     return $versions;
 }
Пример #2
0
echo at('Admin Login History');
?>
</a></li>
			<li><a href="#tabs-4"><?php 
echo at('Admin Latest Logs');
?>
</a></li>
		</ul>
		<div id="tabs-1">
			<div class="inside">
					<?php 
echo CHtml::beginForm('', 'post', array('class' => 'formee'));
?>
					<div class="in">
						<?php 
bp('staff message');
?>
						<?php 
Yii::app()->customEditor->getEditor(array('name' => 'dashboard_staff_message', 'value' => getParam('dashboard_staff_message')));
?>
						<?php 
ep('staff message');
?>
					</div>

				<!--Form footer begin-->
				<section class="box_footer">
					<div class="grid-12-12">
						<input type="submit" name='submit' class="right button green" value="<?php 
echo at('Update');
?>
Пример #3
0
						<?php 
echo CHtml::textField('term', getRParam('term'), array('placeholder' => at('Search Personal Messages'), 'size' => 40, 'style' => 'width: 50%;'));
?>
						<?php 
echo CHtml::submitButton(at('Search'));
?>
					<?php 
echo CHtml::endForm();
?>
				</div>
					
				<div class="clear"></div>	
				
				<div class="grid_12">	
					<?php 
bp('PM Index');
?>
					<?php 
$this->widget('bootstrap.widgets.BootGridView', array('type' => 'striped bordered condensed', 'dataProvider' => $model->search(getRParam('term')), 'columns' => array(array('name' => 'id', 'header' => '#'), array('name' => 'title', 'header' => 'Title', 'type' => 'raw', 'value' => '$data->getTopicTitle()'), array('name' => 'type', 'header' => 'Type', 'value' => '$data->getType()'), array('name' => 'repliesCount', 'header' => 'Replies', 'value' => '$data->repliesCount'), array('name' => 'participantsCount', 'header' => 'Participants', 'value' => '$data->participantsCount'), array('name' => 'created_at', 'header' => 'Created Date', 'value' => 'timeSince($data->created_at)'), array('name' => 'author_id', 'header' => 'Author', 'type' => 'raw', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->getAuthorLink()'), array('name' => 'last_reply_created_at', 'header' => 'Last Reply Date', 'value' => 'timeSince($data->last_reply_created_at)'), array('name' => 'last_reply_author_id', 'header' => 'Last Reply Author', 'type' => 'raw', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->lastReplyAuthor->getUserLink()'), array('template' => '{remove}', 'class' => 'bootstrap.widgets.BootButtonColumn', 'htmlOptions' => array('style' => 'width: 50px'), 'buttons' => array('remove' => array('label' => '<i class="icon-trash"></i>', 'options' => array('title' => at('Delete Topic'), 'class' => 'delete'), 'url' => 'Yii::app()->createUrl("/admin/personalmessages/delete", array("id"=>$data->id))', 'visible' => 'Yii::app()->user->id == $data->author_id || checkAccess("op_personalmessages_manage_topics")'))))));
?>
					<?php 
ep('PM Index');
?>
					<?php 
$this->widget('bootstrap.widgets.BootButton', array('label' => 'Create New Message', 'url' => array('create'), 'type' => 'primary'));
?>
				</div>
				<div class="clear"></div>
			</div>
		</div>