This repository was archived by the owner on Jul 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
assets/javascripts/discourse
connectors/topic-list-after-columns Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1- {{raw "assign-topic-buttons" topic=context.topic}}
1+ {{!-- has-modern-replacement --}}{{ raw "assign-topic-buttons" topic=context.topic}}
Original file line number Diff line number Diff line change 1+ import { withPluginApi } from " discourse/lib/plugin-api" ;
2+ import AssignedTopicListColumn from " ../components/assigned-topic-list-column" ;
3+
4+ const ASSIGN_LIST_ROUTES = [" userActivity.assigned" , " group.assigned.show" ];
5+
6+ const AssignActionsCell = <template >
7+ <td class =" assign-topic-buttons" >
8+ <AssignedTopicListColumn @ topic ={{@ topic }} />
9+ </td >
10+ </template >;
11+
12+ export default {
13+ name: " assignment-list-dropdowns" ,
14+
15+ initialize (container ) {
16+ const router = container .lookup (" service:router" );
17+
18+ withPluginApi (" 1.39.0" , (api ) => {
19+ api .registerValueTransformer (
20+ " topic-list-columns" ,
21+ ({ value: columns }) => {
22+ if (ASSIGN_LIST_ROUTES .includes (router .currentRouteName )) {
23+ columns .add (" assign-actions" , {
24+ item: AssignActionsCell,
25+ after: " activity" ,
26+ });
27+ }
28+
29+ return columns;
30+ }
31+ );
32+ });
33+ },
34+ };
Original file line number Diff line number Diff line change 1- {{{view.html}}}
1+ {{!-- has-modern-replacement --}}{{ {view.html}}}
You can’t perform that action at this time.
0 commit comments