<?php
    if ($data["static_member"]) {
        echo "<a class='btn'>".__('ROUTING_QUEUE_MONITOR_STATIC_MEMBER_BUTTON')."</a>";
    } else {

    // types:  primary, info, success, warning, danger, inverse and link.
    $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType'=>'ajaxButton',
            'type'=>$data['loggedIn']=='1'?'success':'danger',
            'label'=>$data['loggedIn']=='1'?__('ROUTING_QUEUE_MONITOR_LOGOUT_BUTTON'):__('ROUTING_QUEUE_MONITOR_LOGIN_BUTTON'),
            'loadingText'=>'loading...',
            'htmlOptions'=>array(
                    'class'=>'logginButton',
                    'id'=>'memberId_'.$data['memberId'],
                   // 'data-translation-target'=>'PHONESETTINGS_MY_PHONES_LOGIN_BUTTON_TARGET',
                    "data-member" => $data['memberId'],
                    "data-queue" =>$data["queueId"],
                    "data-url" =>url('routingQueueMonitor/default/toggleAgentLoginState'),
            ),

    ));
}
if (Yii::app()->user->translateMode) {
	echo '<i data-translation-id="ROUTING_QUEUE_MONITOR_LOGOUT_BUTTON"></i>';
	echo '<i data-translation-id="ROUTING_QUEUE_MONITOR_LOGIN_BUTTON"></i>';
        echo '<i data-translation-id="ROUTING_QUEUE_MONITOR_STATIC_MEMBER_BUTTON"></i>';
}
