{% extends 'base_site.html' %}

{% load static %}

{% block title %}总览信息{% endblock %}

{% block stylesheets %}{{ block.super }}{% endblock stylesheets %}

{% block content %}
    <div class="right_col" role="main">
        <!-- top tiles -->
        <div class="row tile_count">
            <div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
                <span class="count_top"><i class="fa fa-industry"></i> 设备总数 </span>
                <div class="count">{{ cncs.count }} 台</div>
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
                <span class="count_top"><i class="fa fa-clock-o"></i> 总计工作时间</span>
                <div class="count">15 小时</div>
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
                <span class="count_top"><i class="fa fa-clock-o"></i> 总计切削时间</span>
                <div class="count">8 小时</div>
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
                <span class="count_top"><i class="fa fa-clock-o"></i> 总计工作效率</span>
                <div class="count">60%</div>
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
                <span class="count_top"><i class="fa fa-exclamation-triangle"></i> 总计报警数量</span>
                <div class="count">0</div>
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
                <span class="count_top"><i class="fa fa-wrench"></i> 总计加工数量</span>
                <div class="count">10</div>
            </div>
        </div>
        <!-- /top tiles -->

        <div class="row">
            {% for cnc in cncs %}
                <div class="col-lg-4 col-sm-6 col-xs-12 profile_details">
                    <div class="well profile_view">
                        <div class="col-sm-12">
                            <a href="{% url 'details' cnc.pk %}">
                                <h4 class="brief">{{ cnc.cncName }}</h4>
                            </a>
                            <div class="left col-xs-6 text-center">
                                <a href="{% url 'details' cnc.pk %}">
                                    {% if cnc.pk == 2 %}
                                        <img src="{% static 'images/abb_placeholder.jpg' %}" alt="CNC image"
                                             class="img-responsive">
                                    {% else %}
                                        <img src="{% static 'images/cnc_placeholder.png' %}" alt="CNC image"
                                             class="img-responsive">
                                    {% endif %}
                                </a>
                            </div>
                            <div class="right col-xs-6">
                                <ul class="list-unstyled">
                                    <li>编号：{{ cnc.cncNo }}</li>
                                    <li>型号：{{ cnc.cncType.typeName }}</li>
                                    <li style="background: lightgreen;">状态：正常加工</li>
                                    <li>加工产品：模2</li>
                                    <li>工件计数：33</li>
                                    <li>合格率：99%</li>
                                    <li>当前刀号：1</li>
                                    <li>当前NC行号：N110</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            {% endfor %}
        </div>
        <div class="clearfix"></div>
    </div>
{% endblock content %}
