File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,16 @@ public function initialize()
108
108
$ this ->template ->setTemplateOverride ('task_modification/show ' , 'group_assign:task_modification/show ' );
109
109
110
110
//Board
111
- $ this ->template ->hook ->attach ('template:board:private:task:before-title ' , 'group_assign:board/group ' );
112
- $ this ->template ->hook ->attach ('template:board:private:task:before-title ' , 'group_assign:board/multi ' );
111
+ $ this ->template ->hook ->attach ('template:board:private:task:before-title ' , 'group_assign:board/group ' );
112
+ $ this ->template ->hook ->attach ('template:board:private:task:before-title ' , 'group_assign:board/multi ' );
113
+ $ groupmodel = $ this ->projectGroupRoleModel ;
114
+ $ this ->template ->hook ->attachCallable ('template:app:filters-helper:after ' , 'group_assign:board/filter ' , function ($ array = array ()) use ($ groupmodel ) {
115
+ if (!empty ($ array ) && $ array ['id ' ] >= 1 ){
116
+ return ['grouplist ' => array_column ($ groupmodel ->getGroups ($ array ['id ' ]), 'name ' )];
117
+ } else {
118
+ return ['grouplist ' => array ()];
119
+ }
120
+ });
113
121
114
122
//Filter
115
123
$ this ->container ->extend ('taskLexer ' , function ($ taskLexer , $ c ) {
Original file line number Diff line number Diff line change
1
+ <?php if (isset ($ grouplist ) && !empty ($ grouplist )) : ?>
2
+ </div>
3
+ <div class="input-addon-item">
4
+ <div class="dropdown">
5
+ <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t ('Group filters ' ) ?> "><i class="fa fa-users fa-fw"></i><i class="fa fa-caret-down"></i></a>
6
+ <ul>
7
+ <?php foreach ($ grouplist as $ group ) : ?>
8
+ <li><a href="#" class="filter-helper" data-unique-filter='allassignees:"<?= $ this ->text ->e ($ group ) ?> "'><?= $ this ->text ->e ($ group ) ?> </a></li>
9
+ <?php endforeach ?>
10
+ </ul>
11
+ </div>
12
+ <?php endif ?>
You can’t perform that action at this time.
0 commit comments