-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.ctp
More file actions
131 lines (119 loc) · 3.97 KB
/
index.ctp
File metadata and controls
131 lines (119 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
/**
* TaskContent index template
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Yuto Kitatsuji <kitatsuji.yuto@withone.co.jp>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
?>
<?php
echo $this->NetCommonsHtml->css('/tasks/css/tasks.css');
?>
<article>
<h1 class="tasks_taskTitle"><?php echo $listTitle ?></h1>
<?php if (Current::permission('content_creatable')) : ?>
<div class="pull-right task-index-space">
<?php
$addUrl = array(
'controller' => 'task_content_edit',
'action' => 'add',
'frame_id' => Current::read('Frame.id')
);
echo $this->Button->addLink('',
$addUrl,
array('tooltip' => __d('tasks', 'ToDo Add'))
);
?>
</div>
<?php endif ?>
<div class="clearfix task-content-margin-1">
<div class="pull-left">
<?php echo $this->element('TaskContents/select_is_completion', array(
'options' => $isCompletionOptions,
'currentIsCompletion' => $currentIsCompletion,
)); ?>
<span class="btn-group task-index-space">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true">
<div class="clearfix">
<div class="pull-left task-select-ellipsis">
<?php echo $categoryLabel ?>
</div>
<div class="pull-right">
<span class="caret"></span>
</div>
</div>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<?php echo $this->Category->dropDownToggle(array(
'empty' => h(__d('tasks', 'No category assignment')),
'displayMenu' => false,
'url' => NetCommonsUrl::actionUrlAsArray(Hash::merge(array(
'action' => 'index',
'block_id' => Current::read('Block.id'),
'frame_id' => Current::read('Frame.id')
), $this->params['named'])),
)); ?>
</ul>
</span>
<?php echo $this->element('TaskContents/select_user', array(
'options' => $userOptions,
'currentUserId' => $currentUserId
)); ?>
<?php echo $this->element('TaskContents/select_sort', array(
'options' => $sortOptions,
'currentSort' => $currentSort,
)); ?>
</div>
</div>
<div class="nc-content-list">
<?php if (!$taskContents): ?>
<div>
<?php echo h(__d('tasks', 'Not task')); ?>
</div>
<?php else: ?>
<?php $isNotShow = false; ?>
<?php if (isset($params['user_id']) && $params['user_id'] !== Current::read('User.id')): ?>
<?php $isNotShow = true; ?>
<?php endif; ?>
<?php $params = $this->params['named']; ?>
<?php if ($deadLineTasks && empty($params['category_id']) && $isNotShow === false): ?>
<div class="clearfix">
<div class="pull-left task-word-break">
<?php echo __d('tasks', 'Deadline close Expiration'); ?>
</div>
</div>
<?php echo $this->element('TaskContents/task_content', array(
'taskContents' => $deadLineTasks,
)
); ?>
<?php endif; ?>
<?php foreach ($taskContents as $taskContent): ?>
<div class="clearfix task-content">
<div class="pull-left task-category-name-margin task-word-break">
<?php echo $taskContent['Category']['name']; ?>
</div>
<?php if ($taskContent['Category']['name'] !== __d('tasks', 'No category')): ?>
<div class="pull-right">
<div class="clearfix">
<div class="pull-left progress-min-scale-xs">
<div class="progress progress-min-width-xs task-index-progress task-progress-width-index">
<div class="progress-bar progress-bar-info"
style="width: <?php echo $taskContent['Category']['category_priority']; ?>%;">
<?php echo $taskContent['Category']['category_priority']; ?>%
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php echo $this->element('TaskContents/task_content', array(
'taskContents' => $taskContent['TaskContents'],
)); ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</article>