Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
8bf2eea3
Commit
8bf2eea3
authored
Dec 22, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
download reports
parent
ed4a4025
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
164 additions
and
143 deletions
+164
-143
list.html
app/components/crud/templates/list.html
+2
-2
dashboard.html
app/components/dashboard/dashboard.html
+67
-64
dashboard_controller.js
app/components/dashboard/dashboard_controller.js
+1
-1
directives.js
app/shared/directives.js
+3
-3
filefield.html
app/shared/templates/filefield.html
+1
-0
form_service.js
app/zetalib/form_service.js
+16
-3
app.js
dist/app.js
+3
-3
components.js
dist/bower_components/components.js
+1
-1
templates.js
dist/templates.js
+70
-66
No files found.
app/components/crud/templates/list.html
View file @
8bf2eea3
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
Hepsini Seç
Hepsini Seç
</label>
</label>
</td>
</td>
<td
ng-repeat=
"value in objects[0]"
ng-if=
"objects[0]!='-1'"
>
{{value}}
</td>
<td
ng-repeat=
"value in objects[0]
track by $index
"
ng-if=
"objects[0]!='-1'"
>
{{value}}
</td>
<td
ng-if=
"objects[0]=='-1'"
>
{{ schema.title||model}}
</td>
<td
ng-if=
"objects[0]=='-1'"
>
{{ schema.title||model}}
</td>
<td>
action
</td>
<td>
action
</td>
</tr>
</tr>
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</td>
</td>
<td>
<td>
<button
class=
"btn btn-info"
style=
"margin-right: 5px;"
ng-repeat=
"action in object.actions"
<button
class=
"btn btn-info"
style=
"margin-right: 5px;"
ng-repeat=
"action in object.actions
track by $index
"
ng-if=
"action.show_as==='button'"
ng-if=
"action.show_as==='button'"
ng-click=
"do_action(object.key, action)"
>
{{action
ng-click=
"do_action(object.key, action)"
>
{{action
.name}}
.name}}
...
...
app/components/dashboard/dashboard.html
View file @
8bf2eea3
<div
ng-app=
"ulakbus.dashboard"
class=
"dashboard"
>
<div
ng-app=
"ulakbus.dashboard"
class=
"dashboard"
>
<div
class=
"starter-template"
>
<div
class=
"starter-template"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6 user-info"
>
<div
class=
"col-md-6 user-info"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
...
@@ -11,91 +11,94 @@
...
@@ -11,91 +11,94 @@
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<div
class=
"col-md-4 col-md-offset-4 text-center"
>
<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}}"
>
<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>
<p
class=
"user-name"
>
{{$root.current_user.name}} {{$root.current_user.surname}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-md-6 quick-links"
>
<div
class=
"col-md-6 quick-links"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-title"
>
Hızlı İşlemler
</div>
<div
class=
"panel-title"
>
Hızlı İşlemler
</div>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<div
class=
"col-md-6 text-center link-buttons"
ng-repeat=
"menu in $root.quick_menu"
>
<div
class=
"col-md-6 text-center link-buttons"
ng-repeat=
"menu in $root.quick_menu"
>
<a
ng-href=
"#/{{menu[0].wf}}/{{menu[0].model}}?{{menu[0].param}}={{selectedUser.key}}"
>
<a
ng-repeat=
"item in menu"
{{menu[0].text}}
ng-href=
"#/{{item.wf}}/{{item.model}}?{{item.param}}={{selectedUser.key}}"
>
{{item.text}}
</a>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end of row -->
<!-- end of row -->
<div
class=
"dashboard-main-search clearfix"
>
<div
class=
"dashboard-main-search clearfix"
>
<div
class=
"row"
ng-if=
"$root.current_user.is_staff"
>
<div
class=
"row"
ng-show=
"$root.current_user.is_staff"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-title"
>
Arama
</div>
<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=
"menuitems.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>
</div>
<!-- end of dashboard-student-search -->
<div
class=
"panel-body"
>
<div
class=
"dashboard-personnel-search"
data-step=
"3"
<div
class=
"dashboard-student-search"
data-step=
"2"
data-intro=
"isim veya tcno ile personel araması yapabilirsiniz."
ng-show=
"menuitems.personel"
>
data-intro=
"isim veya tcno ile öğrenci araması yapabilirsiniz."
<div
class=
"text-center"
>
ng-show=
"$root.searchInputs.ogrenci"
>
<h3>
PERSONEL
</h3>
<div
class=
"text-center"
>
<input
type=
"text"
placeholder=
"Personel ara"
ng-model=
"keyword.staff"
<h3>
ÖĞRENCİ
</h3>
ng-keyup=
"search('personel')"
>
<input
type=
"text"
placeholder=
"Öğrenci ara"
ng-model=
"keyword.student"
<span
class=
"bordered-fa-icon fa fa-search"
ng-click=
"search('personel')"
></span>
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>
</div>
<div
class=
"dashboard-search-results"
ng-show=
"showResults"
>
<!-- end of dashboard-student-search -->
<ul
ng-if=
"staffs.length > 0"
>
<div
class=
"dashboard-personnel-search"
data-step=
"3"
<li
ng-repeat=
"staff in staffs"
>
data-intro=
"isim veya tcno ile personel araması yapabilirsiniz."
<a
role=
"button"
>
ng-show=
"$root.searchInputs.personel"
>
<span
ng-click=
"select(staff, 'personel')"
>
{{staff[0]}}
</span>
<div
class=
"text-center"
>
<i
class=
"fa fa-fw fa-info-circle pull-right"
<h3>
PERSONEL
</h3>
popover-placement=
"bottom"
<input
type=
"text"
placeholder=
"Personel ara"
ng-model=
"keyword.staff"
uib-popover-template=
"userPopover.templateUrl"
ng-keyup=
"search('personel')"
>
ng-click=
"get_info('Personel', staff[2])"
></i></a>
<span
class=
"bordered-fa-icon fa fa-search"
ng-click=
"search('personel')"
></span>
</li>
</div>
</ul>
<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>
</div>
<!-- end of dashboard-personnel-search
-results
-->
<!-- end of dashboard-personnel-search -->
</div>
</div>
<!-- end of dashboard-personnel-search -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end of dashboard-main-search -->
<!-- end of dashboard-main-search -->
...
...
app/components/dashboard/dashboard_controller.js
View file @
8bf2eea3
...
@@ -20,7 +20,7 @@ angular.module('ulakbus.dashboard', [])
...
@@ -20,7 +20,7 @@ angular.module('ulakbus.dashboard', [])
// to show search box based on authz
// to show search box based on authz
$scope
.
$on
(
"authz"
,
function
(
event
,
data
)
{
$scope
.
$on
(
"authz"
,
function
(
event
,
data
)
{
$
scope
.
menuitem
s
=
data
;
$
rootScope
.
searchInput
s
=
data
;
});
});
$scope
.
keyword
=
{
student
:
""
,
staff
:
""
};
$scope
.
keyword
=
{
student
:
""
,
staff
:
""
};
...
...
app/shared/directives.js
View file @
8bf2eea3
...
@@ -117,8 +117,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
...
@@ -117,8 +117,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
model
:
$scope
.
$parent
.
form_params
.
model
,
model
:
$scope
.
$parent
.
form_params
.
model
,
cmd
:
$scope
.
$parent
.
reload_cmd
,
cmd
:
$scope
.
$parent
.
reload_cmd
,
flow
:
$scope
.
$parent
.
form_params
.
flow
,
flow
:
$scope
.
$parent
.
form_params
.
flow
,
param
:
'query'
,
query
:
$scope
.
searchModel
.
searchbox
id
:
$scope
.
searchModel
.
searchbox
}
}
};
};
...
@@ -310,7 +309,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
...
@@ -310,7 +309,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
restrict
:
'E'
,
restrict
:
'E'
,
replace
:
true
,
replace
:
true
,
scope
:
{},
scope
:
{},
controller
:
function
(
$scope
,
$rootScope
,
$cookies
,
$route
,
$http
,
RESTURL
,
$location
,
$window
,
$timeout
)
{
controller
:
function
(
$scope
,
$rootScope
,
$cookies
,
$route
,
$http
,
RESTURL
,
$lo
g
,
$lo
cation
,
$window
,
$timeout
)
{
$scope
.
prepareMenu
=
function
(
menuItems
)
{
$scope
.
prepareMenu
=
function
(
menuItems
)
{
var
newMenuItems
=
{};
var
newMenuItems
=
{};
angular
.
forEach
(
menuItems
,
function
(
value
,
key
)
{
angular
.
forEach
(
menuItems
,
function
(
value
,
key
)
{
...
@@ -349,6 +348,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
...
@@ -349,6 +348,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
$rootScope
.
quick_menu
=
reGroupMenuItems
(
data
.
quick_menu
,
'quick_menus'
);
$rootScope
.
quick_menu
=
reGroupMenuItems
(
data
.
quick_menu
,
'quick_menus'
);
delete
data
.
quick_menu
;
delete
data
.
quick_menu
;
$log
.
debug
(
'quick menu'
,
$rootScope
.
quick_menu
);
// broadcast for authorized menu items, consume in dashboard to show search inputs and/or
// broadcast for authorized menu items, consume in dashboard to show search inputs and/or
// related items
// related items
...
...
app/shared/templates/filefield.html
View file @
8bf2eea3
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
sf-changed=
"form"
sf-changed=
"form"
class=
"form-control {{form.fieldHtmlClass}}"
class=
"form-control {{form.fieldHtmlClass}}"
schema-validate=
"form"
schema-validate=
"form"
ng-change=
"form.fileInsert()"
name=
"{{form.name}}"
/>
name=
"{{form.name}}"
/>
</div>
</div>
...
...
app/zetalib/form_service.js
View file @
8bf2eea3
...
@@ -20,7 +20,7 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -20,7 +20,7 @@ angular.module('formService', ['ui.bootstrap'])
* @description
* @description
* form service's Generator factory service handles all generic form operations
* form service's Generator factory service handles all generic form operations
*/
*/
.
factory
(
'Generator'
,
function
(
$http
,
$q
,
$timeout
,
$location
,
$route
,
$compile
,
$log
,
RESTURL
,
$rootScope
)
{
.
factory
(
'Generator'
,
function
(
$http
,
$q
,
$timeout
,
$
sce
,
$
location
,
$route
,
$compile
,
$log
,
RESTURL
,
$rootScope
)
{
var
generator
=
{};
var
generator
=
{};
/**
/**
* @name makeUrl
* @name makeUrl
...
@@ -213,7 +213,9 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -213,7 +213,9 @@ angular.module('formService', ['ui.bootstrap'])
templateUrl
:
"shared/templates/filefield.html"
,
templateUrl
:
"shared/templates/filefield.html"
,
name
:
k
,
name
:
k
,
key
:
k
,
key
:
k
,
titleMap
:
v
.
titleMap
fileInsert
:
function
()
{
$scope
.
$broadcast
(
'schemaForm.error.'
+
k
,
'tv4-302'
,
true
);
}
};
};
v
.
type
=
'string'
;
v
.
type
=
'string'
;
}
}
...
@@ -904,7 +906,18 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -904,7 +906,18 @@ angular.module('formService', ['ui.bootstrap'])
};
};
return
$http
.
post
(
generator
.
makeUrl
(
$scope
),
data
)
return
$http
.
post
(
generator
.
makeUrl
(
$scope
),
data
)
.
success
(
function
(
data
)
{
.
success
(
function
(
data
,
status
,
headers
)
{
if
(
headers
(
'content-type'
)
===
"application/pdf"
)
{
var
a
=
document
.
createElement
(
"a"
);
document
.
body
.
appendChild
(
a
);
a
.
style
=
"display: none"
;
var
file
=
new
Blob
([
data
],
{
type
:
'application/pdf'
});
var
fileURL
=
URL
.
createObjectURL
(
file
);
var
fileName
=
$scope
.
schema
.
title
;
a
.
href
=
fileURL
;
a
.
download
=
fileName
;
a
.
click
();
}
if
(
redirectTo
===
true
)
{
if
(
redirectTo
===
true
)
{
if
(
data
.
client_cmd
)
{
if
(
data
.
client_cmd
)
{
generator
.
pathDecider
(
data
.
client_cmd
,
$scope
,
data
);
generator
.
pathDecider
(
data
.
client_cmd
,
$scope
,
data
);
...
...
dist/app.js
View file @
8bf2eea3
This diff is collapsed.
Click to expand it.
dist/bower_components/components.js
View file @
8bf2eea3
This diff is collapsed.
Click to expand it.
dist/templates.js
View file @
8bf2eea3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment