Commit 882348a1 authored by Evren Kutar's avatar Evren Kutar

dashboard for user role prepare for style

parent d2eda8e9
......@@ -30,7 +30,7 @@
data-intro="isim veya tcno ile öğrenci araması yapabilirsiniz.">
<div class="text-center">
<h3>ÖĞRENCİ</h3>
<input type="text" placeholder="Öğrenci ara" ng-model="student_kw"
<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>
......@@ -52,7 +52,7 @@
data-intro="isim veya tcno ile personel araması yapabilirsiniz.">
<div class="text-center">
<h3>PERSONEL</h3>
<input type="text" placeholder="Personel ara" ng-model="staff_kw"
<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>
......
......@@ -23,8 +23,7 @@ angular.module('ulakbus.dashboard', [])
$scope.menuitems = data;
});
$scope.student_kw = "";
$scope.staff_kw = "";
$scope.keyword = {student: "", staff: ""};
$scope.students = [];
$scope.staffs = [];
......@@ -33,20 +32,20 @@ angular.module('ulakbus.dashboard', [])
$timeout(function () {
if (where === 'personel') {
// if input length greater than 2 search for the value
if ($scope.staff_kw.length > 2) {
$scope.getItems(where, $scope.staff_kw).success(function (data) {
if ($scope.keyword.staff.length > 2) {
$scope.getItems(where, $scope.keyword.staff).success(function (data) {
$scope.staffs = data.results;
});
}
}
if (where === 'ogrenci') {
if ($scope.student_kw.length > 2) {
$scope.getItems(where, $scope.student_kw).success(function (data) {
if ($scope.keyword.student.length > 2) {
$scope.getItems(where, $scope.keyword.student).success(function (data) {
$scope.students = data.results;
})
}
}
});
}, 500);
};
$scope.getItems = function (where, what) {
......
......@@ -380,7 +380,6 @@ app.directive('logout', function ($http, $location, RESTURL) {
$timeout(function () {
sidebarmenu.metisMenu();
sidebarUserMenu.metisMenu();
});
});
......
......@@ -2,7 +2,7 @@
<div class="sidebar-container">
<!-- sidebar-person-info -->
<div class="sidebar-person-info" ng-if="$root.current_user.is_staff">
<div class="sidebar-person-info" ng-show="$root.current_user.is_staff">
<!--<button class="btn btn-primary close-sidebar-person-info">Profili Kapat</button>-->
<div class="identity">
<button type="button" class="close" ng-class="{hidden: $root.collapsed || !selectedUser}"
......
This diff is collapsed.
......@@ -302,7 +302,7 @@ angular.module("components/dashboard/dashboard.html", []).run(["$templateCache",
" data-intro=\"isim veya tcno ile öğrenci araması yapabilirsiniz.\">\n" +
" <div class=\"text-center\">\n" +
" <h3>ÖĞRENCİ</h3>\n" +
" <input type=\"text\" placeholder=\"Öğrenci ara\" ng-model=\"student_kw\"\n" +
" <input type=\"text\" placeholder=\"Öğrenci ara\" ng-model=\"keyword.student\"\n" +
" ng-keyup=\"search('ogrenci')\">\n" +
" <span class=\"bordered-fa-icon fa fa-search\" ng-click=\"search('ogrenci')\"></span>\n" +
" </div>\n" +
......@@ -324,7 +324,7 @@ angular.module("components/dashboard/dashboard.html", []).run(["$templateCache",
" data-intro=\"isim veya tcno ile personel araması yapabilirsiniz.\">\n" +
" <div class=\"text-center\">\n" +
" <h3>PERSONEL</h3>\n" +
" <input type=\"text\" placeholder=\"Personel ara\" ng-model=\"staff_kw\"\n" +
" <input type=\"text\" placeholder=\"Personel ara\" ng-model=\"keyword.staff\"\n" +
" ng-keyup=\"search('personel')\">\n" +
" <span class=\"bordered-fa-icon fa fa-search\" ng-click=\"search('personel')\"></span>\n" +
" </div>\n" +
......@@ -1267,7 +1267,7 @@ angular.module("shared/templates/directives/sidebar.html", []).run(["$templateCa
"\n" +
" <div class=\"sidebar-container\">\n" +
" <!-- sidebar-person-info -->\n" +
" <div class=\"sidebar-person-info\" ng-if=\"$root.current_user.is_staff\">\n" +
" <div class=\"sidebar-person-info\" ng-show=\"$root.current_user.is_staff\">\n" +
" <!--<button class=\"btn btn-primary close-sidebar-person-info\">Profili Kapat</button>-->\n" +
" <div class=\"identity\">\n" +
" <button type=\"button\" class=\"close\" ng-class=\"{hidden: $root.collapsed || !selectedUser}\"\n" +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment