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
a078fb71
Commit
a078fb71
authored
Apr 07, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ADD task widget
parent
58bea1aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
0 deletions
+131
-0
dashboard_widgets_directives.js
app/components/dashboard/dashboard_widgets_directives.js
+48
-0
user-tasks.html
app/components/dashboard/directives/user-tasks.html
+83
-0
No files found.
app/components/dashboard/dashboard_widgets_directives.js
0 → 100644
View file @
a078fb71
/**
* Copyright (C) 2015 ZetaOps Inc.
*
* This file is licensed under the GNU General Public License v3
* (GPLv3). See LICENSE.txt for details.
*
* @author Evren Kutar
*/
/**
* @memberof ulakbus.dashboard
* @ngdoc directive
* @name stats
* @description Directive for .
*/
angular
.
module
(
'ulakbus.dashboard'
)
.
directive
(
'userTasks'
,
function
(
WSOps
)
{
return
{
templateUrl
:
'components/dashboard/directives/user-tasks.html'
,
restrict
:
'E'
,
replace
:
true
,
scope
:
{},
controller
:
function
(
$scope
)
{
$scope
.
task_list
=
[
{
WFToken
:
"yfuialhfuial"
,
title
:
"sample 1 workflow"
,
description
:
"sample 1"
,
wf_type
:
"type x"
},
{
WFToken
:
"yfuialhfuial"
,
title
:
"sample 2 workflow"
,
description
:
"sample 2"
,
wf_type
:
"type x"
},
{
WFToken
:
"yfuialhfuial"
,
title
:
"sample 3 workflow"
,
description
:
"sample 3"
,
wf_type
:
"type y"
},
{
WFToken
:
"yfuialhfuial"
,
title
:
"sample 4 workflow"
,
description
:
"sample 4"
,
wf_type
:
"type y"
}
];
var
regroup_tasks
=
function
()
{
var
grouped_tasks
=
{};
angular
.
forEach
(
$scope
.
task_list
,
function
(
value
,
key
)
{
grouped_tasks
[
value
.
wf_type
]
=
grouped_tasks
[
value
.
wf_type
]
||
[];
grouped_tasks
[
value
.
wf_type
].
push
(
value
);
});
return
grouped_tasks
;
};
$scope
.
task_list
=
regroup_tasks
();
$scope
.
$on
(
"task_list"
,
function
(
event
,
data
)
{
$scope
.
task_list
=
data
;
regroup_tasks
();
});
$scope
.
gototask
=
function
(
wf_token
)
{
WSOps
.
doSend
({
view
:
"open_wf"
,
wf_token
:
wf_token
});
}
}
};
});
\ No newline at end of file
app/components/dashboard/directives/user-tasks.html
0 → 100644
View file @
a078fb71
<div
class=
"col-lg-6 col-md-12 student-assignment-list"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-title"
>
Görevler
</div>
</div>
<div
class=
"panel-body"
>
<ul>
<li
ng-repeat=
"(k,v) in task_list"
class=
"last-assignment"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-title"
>
{{k}}
</div>
</div>
<a
ng-repeat=
"task in v"
role=
"button"
ng-click=
"gototask(task.wf_token)"
class=
"clearfix"
>
<span
class=
"assignment-status"
>
<div
class=
"assignment-circle"
uib-tooltip=
"Acil"
></div>
</span>
<span
class=
"assignment-title"
>
<div>
{{task.title}}
</div>
<div>
{{task.description}}
</div>
</span>
<span
class=
"assignment-due-date"
>
<div>
18
</div>
<div>
ŞUB
</div>
</span>
</a>
</li>
<!-- end of urgent-assignment -->
<!--<li class="approaching-assignment">-->
<!--<a href="#" class="clearfix">-->
<!--<span class="assignment-status">-->
<!--<div class="assignment-circle" uib-tooltip="Yaklaşıyor"></div>-->
<!--</span>-->
<!--<span class="assignment-title">-->
<!--<div>Storyboard Design</div>-->
<!--<div>435 - Project Management and Development</div>-->
<!--</span>-->
<!--<span class="assignment-due-date">-->
<!--<div>27</div>-->
<!--<div>ŞUB</div>-->
<!--</span>-->
<!--</a>-->
<!--</li>-->
<!--<!– end of approaching-assignment –>-->
<!--<li class="non-urgent-assignment">-->
<!--<a href="#" class="clearfix">-->
<!--<span class="assignment-status">-->
<!--<div class="assignment-circle" uib-tooltip="Acil olmayan"></div>-->
<!--</span>-->
<!--<span class="assignment-title">-->
<!--<div>Design Report</div>-->
<!--<div>435 - Project Management and Development</div>-->
<!--</span>-->
<!--<span class="assignment-due-date">-->
<!--<div>05</div>-->
<!--<div>MAR</div>-->
<!--</span>-->
<!--</a>-->
<!--</li>-->
<!--<!– end of non-urgent-assignment –>-->
<!--<li class="last-assignment">-->
<!--<div class="panel-heading">-->
<!--<div class="panel-title">Tamamlanan Son Görevler</div>-->
<!--</div>-->
<!--<a href="#" class="clearfix">-->
<!--<span class="assignment-status">-->
<!--<div></div>-->
<!--</span>-->
<!--<span class="assignment-title">-->
<!--<div>Design Report</div>-->
<!--<div>435 - Project Management and Development</div>-->
<!--</span>-->
<!--<span class="assignment-due-date">-->
<!--<div><i class="fa fa-check"></i></div>-->
<!--</span>-->
<!--</a>-->
<!--</li>-->
<!-- end of last-assignment -->
</ul>
</div>
</div>
</div>
\ No newline at end of file
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