
{% extends "base.html" %}
{% load staticfiles %}


{% block title %}Dashboard{% endblock %}

{% block staticcss %}

{% endblock %}
{% block content %}


<!-- Page Content -->
<div id="page-wrapper">
    <div class="container-fluid">
        <div class="d-sm-flex align-items-center justify-content-between mb-4">
            <h1 class="h3 mb-0 text-gray-800">首页</h1>
        </div>
    </div>
    <!-- /.container-fluid -->

    {% if messages %}
    <ul class="messages">
        {% for message in messages %}
        <div {% if message.tags %} class="alert alert-{{ message.tags }}" {% endif %}><strong>{{ message }}</strong>
        </div>
        {% endfor %}
    </ul>
    {% endif %}

    <div class="row">


        <div class="col-xl-4 col-md-6 mb-4">
            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <a href="{% url 'addbaseitem' %}">
                                <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">

                                    <span class="pull-left">创建计次任务</span>
                                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span></div>
                            </a>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">计次新任务
                                <span class="badge badge-danger">{{ uncount }}</span></div>

                        </div>
                        <div class="col-auto">
                            <i class="fas fa-calendar fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xl-4 col-md-6 mb-4">
            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <a href="{% url 'addbusinesstask' %}">
                                <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">

                                    <span class="pull-left">创建计时任务</span>
                                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span></div>
                            </a>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">计时新任务
                                <span class="badge badge-danger">{{ unclock }}</span></div>

                        </div>
                        <div class="col-auto">
                            <i class="fas fa-calendar fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xl-4 col-md-6 mb-4">
            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <a href="{% url 'addproject' %}">
                                <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">

                                    <span class="pull-left">创建项目任务</span>
                                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span></div>
                            </a>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">项目新任务
                                <span class="badge badge-danger">{{ unpro }}</span></div>

                        </div>
                        <div class="col-auto">
                            <i class="fas fa-calendar fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>

    <div class="row">

        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <i class="fa fa-bell fa-fw"></i> 待办任务
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <div class="list-group">
                        {% for task in latest %}
                        <a href="#" class="list-group-item">
                            <i class="fa fa-tasks fa-fw"></i> 新的任务 <strong>{{ task.title }}</strong>
                            <span class="pull-right text-muted small">
                                <em>
                                    {{ task.created_by.username }} 创建于
                                </em>

                                {{ task.created_date }}
                            </span>
                        </a>

                        {% endfor %}

                    </div>
                    <!-- /.list-group -->

                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->


        </div>
        <!-- /.col-lg-4 -->


    </div>




</div>
{% endblock %}