-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.ctp
More file actions
129 lines (117 loc) · 4.01 KB
/
index.ctp
File metadata and controls
129 lines (117 loc) · 4.01 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
<?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 h($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">
<span class="pull-left nc-drop-down-ellipsis">
<?php echo h($categoryLabel) ?>
</span>
<span class="pull-right">
<span class="caret"></span>
</span>
</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 h($taskContent['CategoriesLanguage']['name']); ?>
</div>
<?php if ($taskContent['CategoriesLanguage']['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 h($taskContent['Category']['category_priority']); ?>%;">
<?php echo h($taskContent['Category']['category_priority']) . h(__d('tasks', 'Progress rate percent')); ?>
</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>