<div ng-app="ulakbus.dashboard" class="dashboard">
    <div class="starter-template">


        <div class="row">

            <div class="col-md-6 user-info">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="panel-title">Giriş Yapan Kullanıcı Bilgileri</div>
                    </div>
                    <div class="panel-body">
                        <div class="col-md-4 col-md-offset-4 text-center">
                            <img class="img-circle user-pic" src="{{$root.current_user.avatar}}"
                                 alt="{{$root.current_user.username}}">
                            <p class="user-name">{{$root.current_user.name}} {{$root.current_user.surname}}</p>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-6 quick-links">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="panel-title">Hızlı İşlemler</div>
                    </div>
                    <div class="panel-body">
                        <div class="col-md-6 text-center link-buttons" ng-repeat="menu in $root.quick_menu">
                            <a ng-repeat="item in menu"
                               ng-href="#/{{item.wf}}/{{item.model}}?{{item.param}}={{selectedUser.key}}">
                                {{item.text}}
                            </a>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!-- end of row -->

        <div class="dashboard-main-search clearfix">

            <div class="row" ng-show="$root.current_user.is_staff">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="panel-title">Arama</div>
                        </div>
                        <div class="panel-body">
                            <div class="dashboard-student-search" data-step="2"
                                 data-intro="isim veya tcno ile öğrenci araması yapabilirsiniz."
                                 ng-show="$root.searchInputs.ogrenci">
                                <div class="text-center">
                                    <h3>ÖĞRENCİ</h3>
                                    <input type="text" placeholder="Öğrenci ara" ng-model="keyword.student"
                                           ng-keyup="search('ogrenci')">
                                    <span class="bordered-fa-icon fa fa-search" ng-click="search('ogrenci')"></span>
                                </div>
                                <div class="dashboard-search-results" ng-show="showResults">
                                    <ul ng-if="students.length > 0">
                                        <li ng-repeat="student in students">
                                            <a role="button">
                                                <span ng-click="select(student, 'ogrenci')">{{student[0]}}</span>
                                                <i class="fa fa-fw fa-info-circle pull-right" popover-placement="bottom"
                                                   uib-popover-template="userPopover.templateUrl"
                                                   ng-click="get_info('Ogrenci', student[2])"></i></a>
                                        </li>
                                    </ul>
                                </div>
                                <!-- end of dashboard-student-search-results -->
                            </div>
                            <!-- end of dashboard-student-search -->
                            <div class="dashboard-personnel-search" data-step="3"
                                 data-intro="isim veya tcno ile personel araması yapabilirsiniz."
                                 ng-show="$root.searchInputs.personel">
                                <div class="text-center">
                                    <h3>PERSONEL</h3>
                                    <input type="text" placeholder="Personel ara" ng-model="keyword.staff"
                                           ng-keyup="search('personel')">
                                    <span class="bordered-fa-icon fa fa-search" ng-click="search('personel')"></span>
                                </div>
                                <div class="dashboard-search-results" ng-show="showResults">
                                    <ul ng-if="staffs.length > 0">
                                        <li ng-repeat="staff in staffs">
                                            <a role="button">
                                                <span ng-click="select(staff, 'personel')">{{staff[0]}}</span>
                                                <i class="fa fa-fw fa-info-circle pull-right"
                                                   popover-placement="bottom"
                                                   uib-popover-template="userPopover.templateUrl"
                                                   ng-click="get_info('Personel', staff[2])"></i></a>
                                        </li>
                                    </ul>
                                </div>
                                <!-- end of dashboard-personnel-search-results -->
                            </div>
                            <!-- end of dashboard-personnel-search -->
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!-- end of dashboard-main-search -->

        <div class="right-sidebar">

            <div class="right-sidebar-box" data-step="4"
                 data-intro="mesajlar, yapılan görevlerin son durumları, duyurular ve son yapılan işlemleri buradan takip edebilirsiniz.">
                <div class="right-sidebar-messages">

                    <div class="right-sidebar-title clearfix">
                        <h3>Mesajlar</h3>
                        <span><a role="button">Tüm Mesajlar</a></span>
                    </div>
                    <!-- end of right-sidebar-title -->

                    <div class="right-sidebar-message-block" ng-repeat="notify in notifications[2] | limitTo:5">
                        <a class="clearfix" ng-click="markAsRead(notify)">
                            <img src="../../../img/sample-profile-pic.jpg">
                            <div class="right-sidebar-message-content">
                                <div>{{notify.title}}</div>
                                <div>{{notify.body}}</div>
                                <div>16:05</div>
                            </div>
                            <!-- end of right-sidebar-message-content -->
                        </a>
                    </div>
                    <!-- end of right-sidebar-message-block -->

                </div>
                <!-- end of right-sidebar-messages -->
            </div>
            <!-- end of right-sidebar-box -->


            <div class="right-sidebar-box">
                <div class="right-sidebar-tasks">

                    <div class="right-sidebar-title clearfix">
                        <h3>Görevler</h3>
                        <span><a role="button">Tüm Görevler</a></span>
                    </div>

                    <div class="right-sidebar-task-block">
                        <!--<div class="task-type">Onay Bekleyen Görevler</div>-->
                        <a ng-click="markAsRead(notify)" ng-repeat="notify in notifications[1] | limitTo:5">
                            <div class="task-title">{{notify.title}}</div>
                        </a>
                    </div>
                    <!-- end of right-sidebar-task-block -->

                </div>
                <!-- end of right-sidebar-tasks -->
            </div>
            <!-- end of right-sidebar-box -->


            <div class="right-sidebar-box">
                <div class="right-sidebar-announcements">

                    <div class="right-sidebar-title clearfix">
                        <h3>Duyurular</h3>
                        <span><a role="button">Tüm Duyurular</a></span>
                    </div>
                    <!-- end of right-sidebar-title -->

                    <div class="right-sidebar-announcement-block">
                        <a ng-click="markAsRead(notify)"
                           ng-repeat="notify in notifications[3] | limitTo:5">{{notify
                            .body}}</a>
                    </div>
                    <!-- end of right-sidebar-status-block -->

                </div>
                <!-- end of right-sidebar-status -->
            </div>
            <!-- end of right-sidebar-box -->


            <div class="right-sidebar-box">
                <div class="right-sidebar-last-actions">

                    <div class="right-sidebar-title clearfix">
                        <h3>Son İşlemler</h3>
                        <span><a role="button">Tüm İşlemler</a></span>
                    </div>

                </div>
                <!-- end of right-sidebar-status -->
            </div>
            <!-- end of right-sidebar-box -->

        </div>
        <!-- end of right-sidebar -->

    </div>
</div>