1
|
package eu.dnetlib.repo.manager.client.browsehistory;
|
2
|
|
3
|
import com.google.gwt.user.client.ui.FlowPanel;
|
4
|
import eu.dnetlib.repo.manager.client.TokenController;
|
5
|
|
6
|
/**
|
7
|
* Created by stefania on 3/28/16.
|
8
|
*/
|
9
|
public class BrowseHistoryController extends TokenController {
|
10
|
|
11
|
private BrowseHistoryWidget browseHistoryWidget = new BrowseHistoryWidget();
|
12
|
private ViewJobDetailsWidget viewJobDetailsWidget = new ViewJobDetailsWidget();
|
13
|
|
14
|
private static BrowseHistoryController instance = null;
|
15
|
|
16
|
public static BrowseHistoryController getInstance() {
|
17
|
if (instance == null)
|
18
|
instance = new BrowseHistoryController();
|
19
|
|
20
|
return instance;
|
21
|
}
|
22
|
|
23
|
@Override
|
24
|
public void showWidget(FlowPanel contentPanel, String parent, String rest) {
|
25
|
|
26
|
if (rest == null)
|
27
|
redrawWidget(contentPanel, browseHistoryWidget, parent, rest);
|
28
|
else {
|
29
|
redrawWidget(contentPanel, viewJobDetailsWidget, parent, rest);
|
30
|
}
|
31
|
}
|
32
|
|
33
|
// @Override
|
34
|
// public void drawHeader(String rest) {
|
35
|
//
|
36
|
// RootPanel.get("pageHeader").addStyleName("row wrapper border-bottom white-bg page-heading");
|
37
|
// if (rest == null) {
|
38
|
// RepositoryManager.pageHeader.clear();
|
39
|
// RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2>Browse Validation History</h2><ol class=\"breadcrumb\">" +
|
40
|
// "<li><a href=\"#dashboard\">Home</a></li><li class=\"active\"><strong>Browse Validation History</strong></li></ol></div>"));
|
41
|
// } else {
|
42
|
// RepositoryManager.pageHeader.clear();
|
43
|
// RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2>View Validation Job Details</h2><ol class=\"breadcrumb\">" +
|
44
|
// "<li><a href=\"#dashboard\">Home</a></li><li><a href=\"#browseHistory\">Browse History</a></li>" +
|
45
|
// "<li class=\"active\"><strong>View Job Details</strong></li></ol></div>"));
|
46
|
// }
|
47
|
// }
|
48
|
|
49
|
@Override
|
50
|
public String[] getMenuPath(String parent, String rest) {
|
51
|
return new String[] {"browseHistory"};
|
52
|
}
|
53
|
}
|