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