<div>
    {{#if hide_logout}}
        <div id="agents-view" class="hide-logout">
    {{else}}
        <div id="agents-view">
    {{/if}}
        {{#each agents}}
            <div class="agent_wrapper {{status}}" id="{{id}}" data-queues="{{queues}}">
                <div class="agent_header">
                    <span class="icon medium head1"/>
                    {{first_name}} {{last_name}} ( {{status}} )
                </div>
                <div class="agent_data">
                    <div class="row_data call_time">
                        {{#compare status "===" "paused"}}
                            <div class="data_title agent_text">{{ ../../i18n.callcenter.break_time }}</div>
                            <div class="data_value">{{call_time}}</div>
                        {{/compare}}
                        {{#compare status "===" 'wrapup'}}
                            <div class="data_title agent_text">{{ ../../i18n.callcenter.wrapping_up }}</div>
                            <div class="data_value">{{call_time}}</div>
                        {{/compare}}
                        {{#compare status "===" 'handling'}}
                            <div class="data_title agent_text">{{ ../../i18n.callcenter.call_time }}</div>
                            <div class="data_value">{{call_time}}</div>
                        {{/compare}}
                        {{#compare status "===" 'busy'}}
                            <div class="data_title agent_text">{{ ../../i18n.callcenter.busy_since }}</div>
                            <div class="data_value">{{call_time}}</div>
                        {{/compare}}
                        {{#compare status "===" 'ready'}}
                            <div class="data_title agent_text">{{ ../../i18n.callcenter.call_time }}</div>
                            <div class="data_value">-</div>
                        {{/compare}}
                        {{#compare status "===" 'logged_out'}}
                            <div class="data_title agent_text">{{ ../../i18n.callcenter.call_time }}</div>
                            <div class="data_value">-</div>
                        {{/compare}}
                        {{#compare status "===" 'logged_in'}}
                            <div class="data_title agent_text">{{ ../../i18n.callcenter.call_time }}</div>
                            <div class="data_value">-</div>
                        {{/compare}}
                    </div>
                    <div class="row_data call">
                        {{#compare status "===" 'handling'}}
                            {{#if current_call}}
                                <div class="data_title agent_text">{{ ../../../i18n.callcenter.current_call }}</div>
                                <span data-call_id="{{current_call.call_id}}" class="icon tech_support eavesdrop"/>
                            {{else}}
                                <div class="data_title agent_text">{{ ../../../i18n.callcenter.no_active_call }}</div>
                            {{/if}}
                        {{/compare}}
                        {{#compare status "===" 'connecting'}}
                            {{#if current_call}}
                                <div class="data_title agent_text">{{ ../../../i18n.callcenter.current_call }}</div>
                            {{else}}
                                <div class="data_title agent_text">{{ ../../../i18n.callcenter.no_active_call }}</div>
                            {{/if}}
                        {{/compare}}
                        {{#compare status "!==" 'connecting' }}
                            {{#compare status "!==" 'handling'}}
                            <div class="data_title agent_text">{{ ../../../i18n.callcenter.no_active_call }}</div>
                            {{/compare}}
                        {{/compare}}
                    </div>
                    <div class="all_data">
                        <div class="row_data call_hours">
                            <div class="data_title agent_text">{{ ../i18n.callcenter.total_calls }}</div>
                            <div class="data_value">{{total_calls}}</div>
                        </div>
                        <div class="row_data call_day">
                            <div class="data_title agent_text">{{ ../i18n.callcenter.missed_calls }}</div>
                            <div class="data_value">{{missed_calls}}</div>
                        </div>
                    </div>
                    <div class="queue_data" style="display: none;">
                        {{#each queues_list}}
                            <div class="queue_stat" data-id="{{id}}">
                                <div class="row_data call_hours">
                                    <div class="data_title agent_text">{{ ../../i18n.callcenter.total_calls }}</div>
                                    <div class="data_value">{{total_calls}}</div>
                                </div>
                                <div class="row_data call_day">
                                    <div class="data_title agent_text">{{ ../../i18n.callcenter.missed_calls }}</div>
                                    <div class="data_value">{{missed_calls}}</div>
                                </div>
                            </div>
                        {{/each}}
                    </div>
                </div>
            </div>
        {{/each}}
    </div>
</div>
