<?php $this->breadcrumbs = array('Profile details'); $can_update = $user_model->canBeModified($this, Acl::ACTION_UPDATE); $can_view_activity = $this->showLink(UserResources::RES_USER_ACTIVITY); $this->renderPartial('_profile_tabs', array('model' => $user_model)); ?> <div id="user-profile-1" class="user-profile row"> <div class="col-xs-12 col-sm-3 center"> <div> <span class="profile-picture"> <?php echo CHtml::image(MyYiiUtils::getThumbSrc($person_model->getProfileImagePath(), array('resize' => array('width' => 200, 'height' => 200))), CHtml::encode($user_model->username), array('id' => 'avator', 'class' => 'editable img-responsive')); ?> </span> <div class="space-4"></div> <div class="width-80 label label-info label-xlg arrowed-in arrowed-in-right"> <div class="inline position-relative"> <a href="javascript:void(0);" class="user-title-label dropdown-toggle" data-toggle="dropdown"> <i class="icon-circle <?php echo $user_model->status === Users::STATUS_ACTIVE ? 'light-green' : ($user_model->status === Users::STATUS_PENDING ? 'yellow' : 'red'); ?> middle"></i> <span class="white"><?php echo CHtml::encode($person_model->name); ?> </span> </a> </div> </div>
<?php $photo_src = MyYiiUtils::getThumbSrc($model->getProfileImagePath(), array('resize' => array('width' => 150, 'height' => 150))); $preview_img_id = '_profile_image_preview'; $class_name = $model->getClassName(); $temp_selector = '#' . $class_name . '_temp_profile_image'; $notif_id = 'my_progress_notif_image'; echo CHtml::activeHiddenField($model, 'temp_profile_image'); ?> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'profile_image', array('class' => isset($htmlOptions['label_class']) ? $htmlOptions['label_class'] : 'col-md-2 control-label', 'label' => $model->getAttributeLabel('profile_image') . ':')); ?> <div class="<?php echo isset($htmlOptions['field_class']) ? $htmlOptions['field_class'] : 'col-md-4'; ?> "> <img id="<?php echo $preview_img_id; ?> " class="thumbnail default-profile-photo" src="<?php echo $photo_src; ?> " data-src="<?php echo $photo_src; ?> "> <div> <?php $input_name = Common::generateSalt(); $this->widget('ext.EAjaxUpload.EAjaxUpload', array('id' => 'uploadFile_' . $preview_img_id, 'config' => array('request' => array('params' => array('file_name' => $input_name), 'endpoint' => Yii::app()->createUrl('myHelper/fineUploader')), 'multiple' => FALSE, 'text' => array('uploadButton' => 'Browse files or drop a file here'), 'deleteFile' => array('enabled' => true, 'method' => 'POST', 'endpoint' => Yii::app()->createUrl('myHelper/deleteFineUploader')), 'validation' => array('itemLimit' => 1, 'allowedExtensions' => array("jpg", "jpeg", "png"), 'sizeLimit' => 2 * 1024 * 1024), 'showMessage' => "js:function(message){\n MyUtils.showAlertMessage(message,'error','#" . $notif_id . "');\n }", 'callbacks' => array('onComplete' => "js:function(id, fileName, responseJSON){\n if (responseJSON.success){\n \$('#" . $preview_img_id . "').attr('src',responseJSON.fileurl);\n \$('" . $temp_selector . "').val(responseJSON.filepath);\n }\n }", 'onDeleteComplete' => "js:function(id, xhr, isError){\n if(!isError){\n var e=\$('#" . $preview_img_id . "');\n e.attr('src',e.attr('data-src'));\n \$('" . $temp_selector . "').val('');\n }\n }"))));
<li class="light-blue"> <a data-toggle="dropdown" href="#" class="dropdown-toggle"> <?php echo CHtml::image(MyYiiUtils::getThumbSrc(Person::model()->getProfileImagePath(Yii::app()->user->id), array('resize' => array('width' => 40, 'height' => 40)), 'http://placehold.it/40x40'), 'Profile Photo', array('class' => 'nav-user-photo')); ?> <span class="user-info"><small><?php echo Lang::t('Welcome'); ?> ,</small> <?php echo Yii::app()->user->name; ?> </span><i class="icon-caret-down"></i> </a> <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close"> <li><a href="<?php echo Yii::app()->createUrl('users/default/view'); ?> "><i class="icon-user"></i> <?php echo Lang::t('Profile'); ?> </a></li> <li><a href="<?php echo Yii::app()->createUrl('users/default/view', array('action' => Users::ACTION_CHANGE_PASSWORD)); ?> "><i class="icon-lock"></i> <?php echo Lang::t('Change Password'); ?> </a></li> <li class="divider"></li> <li><a href="<?php echo Yii::app()->createUrl('auth/default/logout');
?> </td> </tr> <?php } ?> <tr> <td> </td> </tr> <tr> <td colspan="4"> <?php if (!empty($model->payslip) && file_exists($payslip = Yii::app()->basePath . "\\payslips\\{$model->payslip}")) { echo CHtml::image(MyYiiUtils::getThumbSrc($payslip, array('resize' => array('width' => 500))), CHtml::encode('Payslip Not Found'), array('style' => 'text-align: center; border: 3px solid #C9E0ED; border-radius: 6px', 'id' => 'avator', 'class' => 'editable img-responsive')); echo '<br/>'; } ?> </td> </tr> <?php if ($attribute['readOnly'] == true) { ?> <?php if ($authority != 'secretary') { ?> <tr> <td colspan="2"><?php echo $form->labelEx($model, 'forwarded_by_secretary');
echo Lang::t('Unread Messages'); ?> </li> <?php foreach ($data as $row) { ?> <?php $localtime = Yii::app()->localtime->toLocalDateTime($row['date_created'], 'Y-m-d H:i:s'); ?> <li> <a href="<?php echo Yii::app()->createUrl('msg/message/view', array('id' => $row['id'])); ?> "> <?php echo CHtml::image(MyYiiUtils::getThumbSrc(Users::model()->getProfileImagePath($row['from_user_id']), array('resize' => array('width' => 50, 'height' => null)), 'http://placehold.it/50x50'), CHtml::encode($row['from']), array('class' => 'msg-photo', 'style' => 'max-width:50px;')); ?> <span class="msg-body"> <span class="msg-title"> <span class="blue"><?php echo CHtml::encode($row['from']); ?> </span><br/> <?php echo MyYiiUtils::myShortenedString($row['message'], 20, " ...", 20); ?> </span> <span class="msg-time"> <i class="icon-time"></i> <time class="timeago" datetime="<?php echo $localtime;
<?php $user = Users::model()->loadModel($data->from_user_id); $avator = CHtml::image(MyYiiUtils::getThumbSrc($user->getProfileImagePath(), array('resize' => array('width' => 32, 'height' => null))), '', array('class' => 'middle', 'style' => 'width:32px')); ?> <div class="thread-list<?php echo !$data->read ? ' unread' : ''; echo $activeModel->id == $data->id ? ' active' : ''; ?> " data-mark-as-url="<?php echo $this->createUrl('markInboxAs', array('id' => $data->id, 'key' => 'read', 'val' => 1)); ?> "> <div class="message-header clearfix"> <div class="pull-left"> <?php echo $this->showLink(Users::USER_RESOURCE_PREFIX . $user->user_level) ? CHtml::link($avator, Yii::app()->createUrl('users/user/view', array('id' => $user->id)), array('class' => '')) : $avator; ?> <?php echo CHtml::link($user->id !== Yii::app()->user->id ? CHtml::encode($user->name) : Lang::t('Me'), $this->createUrl('view', array('id' => $data->id)), array('class' => 'sender')); ?> <i class="icon-time bigger-110 orange middle"></i> <span class="time"><abbr title="<?php echo Common::formatDate($data->date_created); ?> "><time class="timeago" datetime="<?php echo $data->date_created; ?> "><?php