Esempio n. 1
0
        <div class="panel panel-default">
                <div class="panel-heading">
                        <h4 class="panel-title">
                                <i class="fa fa-chevron-down"></i> <a data-toggle="collapse" data-parent="#accordion3" href="#store_details"><?php 
echo Lang::t('Details');
?>
</a>
                                <?php 
if ($this->showLink(UserResources::RES_DEPT)) {
    ?>
                                        <span><a class="pull-right" href="<?php 
    echo $this->createUrl('update', array('id' => $model->id));
    ?>
"><i class="fa fa-edit"></i> <?php 
    echo Lang::t('Edit');
    ?>
</a></span>
                                <?php 
}
?>
                        </h4>
                </div>
                <div id="store_details" class="panel-collapse collapse in">
                        <div class="panel-body">
                                <?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'nullDisplay' => '______', 'attributes' => array(array('name' => 'id'), array('name' => 'status', 'value' => CHtml::tag('span', array('class' => $model->status === Dept::STATUS_OPEN ? 'badge badge-success' : 'badge badge-danger'), $model->status), 'type' => 'raw'), array('name' => 'name'), array('name' => 'telephone1'), array('name' => 'telephone2'), array('name' => 'email'), array('name' => 'address'), array('name' => 'country_id'), array('name' => 'location'), array('name' => 'date_created', 'value' => MyYiiUtils::formatDate($model->date_created)), array('name' => 'created_by', 'value' => CHtml::encode(Person::model()->get($model->created_by, 'CONCAT(first_name," ",last_name)'))), array('name' => 'last_modified', 'value' => MyYiiUtils::formatDate($model->last_modified), 'visible' => !empty($model->last_modified)), array('name' => 'last_modified_by', 'value' => CHtml::encode(Person::model()->get($model->last_modified_by, 'CONCAT(first_name," ",last_name)')), 'visible' => !empty($model->last_modified_by)))));
?>
                        </div>
                </div>
        </div>
</div>
Esempio n. 2
0
<?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>
                                                &nbsp;
                                                <span class="white"><?php 
echo CHtml::encode($person_model->name);
?>
</span>
                                        </a>
                                </div>
                        </div>
Esempio n. 3
0
<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');
Esempio n. 4
0
<?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                                            }"))));
Esempio n. 5
0
    <div class="panel-heading">
        <h4 class="panel-title">
            <i class="fa fa-chevron-down"></i> <a data-toggle="collapse" data-parent="#accordion" href="#account_info"><?php 
echo Lang::t('Account Details');
?>
</a>
            <?php 
if ($can_update || Users::isMyAccount($model->id)) {
    ?>
                <span><a class="pull-right" href="<?php 
    echo $this->createUrl('view', array('id' => $model->id, 'action' => Users::ACTION_UPDATE_ACCOUNT));
    ?>
"><i class="fa fa-edit"></i> <?php 
    echo Lang::t('Edit');
    ?>
</a></span>
            <?php 
}
?>
        </h4>
    </div>
    <div id="account_info" class="panel-collapse collapse in">
        <div class="panel-body">
            <div class="detail-view">
                <?php 
$this->widget('application.components.widgets.DetailView', array('data' => $model, 'attributes' => array(array('name' => 'id'), array('label' => Lang::t('Department'), 'visible' => !empty($model->dept_id), 'value' => CHtml::link(CHtml::encode(Dept::model()->get($model->dept_id, "name")), Yii::app()->createUrl('dept/default/view', array('id' => $model->dept_id)), array()), 'type' => 'raw'), array('name' => 'status', 'value' => CHtml::tag('span', array('class' => $model->status === Users::STATUS_ACTIVE ? 'badge badge-success' : 'badge badge-danger'), $model->status), 'type' => 'raw'), array('name' => 'username'), array('name' => 'email'), array('name' => 'user_level'), array('name' => 'role_id', 'visible' => !empty($model->role_id), 'value' => UserRoles::model()->get($model->role_id, 'name')), array('name' => 'timezone'), array('name' => 'date_created', 'value' => MyYiiUtils::formatDate($model->date_created)), array('name' => 'created_by', 'value' => Users::model()->get($model->created_by, "username"), 'visible' => !empty($model->created_by)), array('name' => 'last_modified', 'value' => MyYiiUtils::formatDate($model->last_modified), 'visible' => !empty($model->last_modified)), array('name' => 'last_modified_by', 'value' => Users::model()->get($model->last_modified_by, "username"), 'visible' => !empty($model->last_modified_by)), array('name' => 'last_login', 'value' => MyYiiUtils::formatDate($model->last_login)))));
?>
            </div>
        </div>
    </div>
</div>
Esempio n. 6
0
        ?>
</td>
                    </tr>
                <?php 
    }
    ?>

                <tr>
                    <td>&nbsp;</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');
Esempio n. 7
0
 protected function cleanUp()
 {
     MyYiiUtils::clearTempFiles();
 }
Esempio n. 8
0
        <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 
    echo Common::formatDate($localtime);
    ?>
</time>
                                </span>
                        </span>
                </a>
        </li>
Esempio n. 9
0
<?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;
?>
                        &nbsp;
                        <?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'));
?>
                        &nbsp;
                        <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