|
12 | 12 | import org.roda.core.data.v2.disposal.confirmation.DisposalConfirmation; |
13 | 13 | import org.roda.wui.client.common.UserLogin; |
14 | 14 | import org.roda.wui.client.common.actions.DisposalConfirmationActions; |
15 | | -import org.roda.wui.client.common.actions.model.ActionableObject; |
16 | | -import org.roda.wui.client.common.actions.widgets.ActionableWidgetBuilder; |
17 | 15 | import org.roda.wui.client.common.lists.DisposalConfirmationList; |
18 | 16 | import org.roda.wui.client.common.lists.utils.AsyncTableCellOptions; |
19 | 17 | import org.roda.wui.client.common.lists.utils.ListBuilder; |
20 | 18 | import org.roda.wui.client.common.search.SearchWrapper; |
21 | | -import org.roda.wui.client.common.utils.SidebarUtils; |
22 | 19 | import org.roda.wui.client.disposal.confirmations.CreateDisposalConfirmation; |
23 | 20 | import org.roda.wui.client.disposal.confirmations.ShowDisposalConfirmation; |
24 | 21 | import org.roda.wui.common.client.HistoryResolver; |
|
31 | 28 | import com.google.gwt.user.client.rpc.AsyncCallback; |
32 | 29 | import com.google.gwt.user.client.ui.Composite; |
33 | 30 | import com.google.gwt.user.client.ui.FlowPanel; |
34 | | -import com.google.gwt.user.client.ui.SimplePanel; |
35 | 31 | import com.google.gwt.user.client.ui.Widget; |
36 | 32 |
|
37 | 33 | import config.i18n.client.ClientMessages; |
@@ -69,31 +65,21 @@ public String getHistoryToken() { |
69 | 65 | FlowPanel disposalConfirmationDescription; |
70 | 66 | @UiField(provided = true) |
71 | 67 | SearchWrapper searchWrapper; |
72 | | - @UiField |
73 | | - SimplePanel actionsSidebar; |
74 | | - @UiField |
75 | | - FlowPanel contentFlowPanel; |
76 | | - @UiField |
77 | | - FlowPanel sidebarFlowPanel; |
78 | 68 |
|
79 | 69 | /** |
80 | 70 | * Create a disposal confirmation page |
81 | 71 | */ |
82 | 72 | public DisposalConfirmations() { |
| 73 | + |
| 74 | + final DisposalConfirmationActions confirmationActions = DisposalConfirmationActions.get(); |
| 75 | + |
83 | 76 | ListBuilder<DisposalConfirmation> disposalConfirmationListBuilder = new ListBuilder<>( |
84 | 77 | () -> new DisposalConfirmationList(), |
85 | | - new AsyncTableCellOptions<>(DisposalConfirmation.class, "Disposal_confirmations").bindOpener() |
| 78 | + new AsyncTableCellOptions<>(DisposalConfirmation.class, "Disposal_confirmations").bindOpener().withActionable(confirmationActions) |
86 | 79 | .withAutoUpdate(5000)); |
87 | 80 |
|
88 | 81 | searchWrapper = new SearchWrapper(false).createListAndSearchPanel(disposalConfirmationListBuilder); |
89 | | - |
90 | 82 | initWidget(uiBinder.createAndBindUi(this)); |
91 | | - |
92 | | - final DisposalConfirmationActions confirmationActions = DisposalConfirmationActions.get(); |
93 | | - SidebarUtils.toggleSidebar(contentFlowPanel, sidebarFlowPanel, confirmationActions.hasAnyRoles()); |
94 | | - actionsSidebar.setWidget(new ActionableWidgetBuilder<>(confirmationActions) |
95 | | - .buildListWithObjects(new ActionableObject<>(DisposalConfirmation.class))); |
96 | | - |
97 | 83 | disposalConfirmationDescription.add(new HTMLWidgetWrapper("DisposalConfirmationDescription.html")); |
98 | 84 | } |
99 | 85 |
|
|
0 commit comments