Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/server/services/BrokerServiceImpl.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/server/services/BrokerServiceImpl.java	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/server/services/BrokerServiceImpl.java	(revision 44971)
@@ -93,7 +93,7 @@
      * @throws BrokerException containing the error code from the server
      */
     @Override
-    public EventsPage showEvents(String datasourceName, String topic, int page) throws BrokerException {
+    public EventsPage showEvents(String datasourceName, String topic, long page) throws BrokerException {
         final String service = "/showEvents";
 
         //build the uri params
@@ -143,6 +143,8 @@
         MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
         headers.add("Content-Type", "application/json");
 
+        advQueryObject.setPage(page);
+
         HttpEntity<AdvQueryObject> entity = new HttpEntity<>(advQueryObject, headers);
 
         //create new template engine
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/shared/broker/AdvQueryObject.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/shared/broker/AdvQueryObject.java	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/shared/broker/AdvQueryObject.java	(revision 44971)
@@ -15,12 +15,13 @@
     private List<Range> dates = new ArrayList<>();
     private Range trust = new Range("0", "1");
 
+    private long page = 0;
+
     public AdvQueryObject() {
     }
 
-    public AdvQueryObject(final String datasource, final String topic, final List<String> titles, final List<String> subjects, final List<String> authors,
-                          final List<Range> dates, final Range trust) {
-        super();
+    public AdvQueryObject(String datasource, String topic, List<String> titles, List<String> subjects, List<String> authors,
+                          List<Range> dates, Range trust, long page) {
         this.datasource = datasource;
         this.topic = topic;
         this.titles = titles;
@@ -28,6 +29,7 @@
         this.authors = authors;
         this.dates = dates;
         this.trust = trust;
+        this.page = page;
     }
 
     public String getDatasource() {
@@ -85,4 +87,13 @@
     public void setTrust(Range trust) {
         this.trust = trust;
     }
+
+    public long getPage() {
+        return page;
+    }
+
+    public void setPage(long page) {
+        this.page = page;
+    }
 }
+
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/services/BrokerService.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/services/BrokerService.java	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/services/BrokerService.java	(revision 44971)
@@ -18,7 +18,7 @@
 
     List<BrowseEntry> getTopicsForDatasource(String datasourceName) throws BrokerException;
 
-    EventsPage showEvents(String datasourceName, String topic, int page) throws BrokerException;
+    EventsPage showEvents(String datasourceName, String topic, long page) throws BrokerException;
 
     EventsPage advancedShowEvents(AdvQueryObject advQueryObject, long page, long pageSize) throws BrokerException;
 
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/SelectTopicWidget.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/SelectTopicWidget.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/SelectTopicWidget.java	(revision 44971)
@@ -0,0 +1,177 @@
+package eu.dnetlib.repo.manager.client.enrichcontent;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Document;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.gwt.client.help.HelpService;
+import eu.dnetlib.gwt.client.help.HelpServiceAsync;
+import eu.dnetlib.repo.manager.client.HelpCallback;
+import eu.dnetlib.repo.manager.client.RepositoryManagerWidget;
+import eu.dnetlib.repo.manager.client.services.BrokerService;
+import eu.dnetlib.repo.manager.client.services.BrokerServiceAsync;
+import eu.dnetlib.repo.manager.shared.Tuple;
+import eu.dnetlib.repo.manager.shared.broker.BrowseEntry;
+import org.gwtbootstrap3.client.ui.Alert;
+import org.gwtbootstrap3.client.ui.constants.AlertType;
+
+import java.util.List;
+
+/**
+ * Created by stefania on 10/31/16.
+ */
+public class SelectTopicWidget implements RepositoryManagerWidget {
+
+    private String parentToken = "";
+    private String restToken = "";
+
+    private FlowPanel selectTopicPanel = new FlowPanel();
+
+    private FlowPanel selectTopicColPanel = new FlowPanel();
+    private FlowPanel selectTopicInnerPanel = new FlowPanel();
+    private FlowPanel selectTopicBox = new FlowPanel();
+    private FlowPanel selectTopicBoxContent = new FlowPanel();
+
+    private Alert errorAlert = new Alert();
+
+    private FlowPanel helpPanel = new FlowPanel();
+
+    private static HelpServiceAsync helpService = GWT.create(HelpService.class);
+    private static BrokerServiceAsync brokerService = GWT.create(BrokerService.class);
+
+    public SelectTopicWidget() {
+
+        selectTopicPanel.addStyleName("row");
+
+        selectTopicColPanel.addStyleName("col-lg-12");
+        selectTopicColPanel.add(selectTopicInnerPanel);
+
+        selectTopicInnerPanel.addStyleName("wrapper wrapper-content animated fadeInUp");
+        selectTopicInnerPanel.add(selectTopicBox);
+
+        selectTopicBox.addStyleName("ibox");
+        selectTopicBox.add(selectTopicBoxContent);
+
+        selectTopicBoxContent.addStyleName("ibox-content bigContent");
+
+        errorAlert.setType(AlertType.DANGER);
+        errorAlert.setDismissable(false);
+        errorAlert.setVisible(false);
+        selectTopicBoxContent.add(errorAlert);
+
+        selectTopicPanel.add(selectTopicColPanel);
+    }
+
+    @Override
+    public void clear() {
+
+        selectTopicBoxContent.clear();
+        errorAlert.setVisible(false);
+        selectTopicPanel.remove(helpPanel);
+    }
+
+    @Override
+    public void reload() {
+
+        Document.get().getElementById("page-wrapper").removeClassName("sidebar-content");
+        selectTopicBoxContent.add(errorAlert);
+
+        helpService.getHelpById(parentToken + "_selectTopic", new HelpCallback(selectTopicColPanel, helpPanel, selectTopicPanel));
+
+        final HTML loadingWheel = new HTML("<div class=\"loader-big\" style=\"text-align: center; padding-top: 170px; " +
+                "color: rgb(47, 64, 80); font-weight: bold;\">Retrieving topics...</div>" +
+                "<div class=\"whiteFilm\"></div>");
+        selectTopicBoxContent.addStyleName("loading-big");
+        selectTopicBoxContent.add(loadingWheel);
+
+        brokerService.getTopicsForDatasource(restToken, new AsyncCallback<List<BrowseEntry>>() {
+
+            @Override
+            public void onFailure(Throwable caught) {
+
+                selectTopicBoxContent.removeStyleName("loading-big");
+                selectTopicBoxContent.remove(loadingWheel);
+
+                errorAlert.setText("System error retrieving topics for datasources.");
+                errorAlert.setVisible(true);
+            }
+
+            @Override
+            public void onSuccess(List<BrowseEntry> browseEntries) {
+
+                selectTopicBoxContent.removeStyleName("loading-big");
+                selectTopicBoxContent.remove(loadingWheel);
+
+                FlowPanel contentRowPanel = new FlowPanel();
+                contentRowPanel.addStyleName("row");
+                selectTopicBoxContent.add(contentRowPanel);
+
+                final FlowPanel contentColPanel = new FlowPanel();
+                contentColPanel.addStyleName("col-lg-12");
+                contentRowPanel.add(contentColPanel);
+
+                final FlowPanel topicsList = new FlowPanel();
+                createTopicsList(browseEntries, topicsList);
+                contentColPanel.add(topicsList);
+            }
+        });
+    }
+
+    @Override
+    public void setToken(String parentToken, String rest) {
+        this.parentToken = parentToken;
+        this.restToken = rest;
+    }
+
+    @Override
+    public void afterAdditionToRootPanel() {
+
+    }
+
+    @Override
+    public Widget asWidget() {
+        return selectTopicPanel;
+    }
+
+    private void createTopicsList(List<BrowseEntry> browseEntries, FlowPanel topicsList) {
+
+        topicsList.addStyleName("col-md-12 topics-list");
+
+        if(browseEntries.isEmpty()) {
+            topicsList.add(new HTML("No topics were found for this datasource"));
+        } else {
+
+            long total = 0;
+
+            String content = "<div class=\"row headers\">" +
+                    "<div class=\"col-sm-9 header hidden-xs\"><label>Topic</label></div>" +
+                    "<div class=\"col-sm-3 header hidden-xs events\"><label># of events</label></div>" +
+                    "</div>";
+
+            for(final BrowseEntry browseEntry : browseEntries) {
+
+                content += "<div class=\"row repo\">";
+
+                content += "<div class=\"col-sm-9\"><a class=\"\" href=\"#" + parentToken + "/" + restToken + "/" +browseEntry.getValue() + "\">" +
+                        browseEntry.getValue() + "</a></div>" +
+                        "<div class=\"col-sm-3 events\">" + browseEntry.getSize() + "</div>";
+
+                content += "</div>";
+
+                total += browseEntry.getSize();
+            }
+
+            content += "<div class=\"row footers\">" +
+                    "<div class=\"col-sm-9 header hidden-xs\"><label>Total</label></div>" +
+                    "<div class=\"col-sm-3 header hidden-xs events\"><label>" + total + "</label></div>" +
+                    "</div>";
+
+            HTML topicsListHTML = new HTML();
+            topicsListHTML.setHTML(content);
+
+            topicsList.add(topicsListHTML);
+        }
+    }
+}
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/EnrichContentController.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/EnrichContentController.java	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/EnrichContentController.java	(revision 44971)
@@ -5,6 +5,10 @@
 import com.google.gwt.user.client.ui.RootPanel;
 import eu.dnetlib.repo.manager.client.RepositoryManager;
 import eu.dnetlib.repo.manager.client.TokenController;
+import eu.dnetlib.repo.manager.client.datasources.register.AggregatorController;
+import eu.dnetlib.repo.manager.client.datasources.register.DataController;
+import eu.dnetlib.repo.manager.client.datasources.register.JournalController;
+import eu.dnetlib.repo.manager.client.datasources.register.LiteratureController;
 
 /**
  * Created by stefania on 4/4/16.
@@ -12,6 +16,8 @@
 public class EnrichContentController extends TokenController {
 
     private EnrichContentWidget enrichContentWidget = new EnrichContentWidget();
+    private SelectTopicWidget selectTopicWidget = new SelectTopicWidget();
+    private ShowEventsWidget showEventsWidget = new ShowEventsWidget();
 
     private static EnrichContentController instance = null;
 
@@ -28,7 +34,11 @@
         if (rest == null)
             redrawWidget(contentPanel, enrichContentWidget, parent, rest);
         else {
-            super.showWidget(contentPanel, parent, rest);
+            if(rest.contains("/")) {
+                redrawWidget(contentPanel, showEventsWidget, parent, rest);
+            } else {
+                redrawWidget(contentPanel, selectTopicWidget, parent, rest);
+            }
         }
     }
 
@@ -36,12 +46,29 @@
     public void drawHeader(String rest) {
 
         RootPanel.get("pageHeader").addStyleName("row wrapper border-bottom white-bg page-heading");
+
         if (rest == null) {
             RepositoryManager.pageHeader.clear();
             RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2>Enrich Your Content</h2><ol class=\"breadcrumb\">" +
                     "<li><a href=\"#dashboard\">Home</a></li><li class=\"active\"><strong>Enrich Content</strong></li></ol></div>"));
         } else {
-            super.drawHeader(rest);
+            if(rest.contains("/")) {
+                String[] tokenSplit = rest.split("/", 2);
+                String dataSource = tokenSplit[0];
+                String topic = tokenSplit[1];
+                RepositoryManager.pageHeader.clear();
+                String header = "<div class=\"col-sm-9\"><h2>Events for " + topic + "</h2><ol class=\"breadcrumb\">" +
+                        "<li><a href=\"#dashboard\">Home</a></li><li><a href=\"#enrichContent\">Enrich Content</a></li>" +
+                        "<li><a href=\"#enrichContent/" + dataSource +"\">" + dataSource + "</a></li>" +
+                        "<li class=\"active\"><strong>" + topic + "</strong></li></ol></div>";
+                RepositoryManager.pageHeader.add(new HTML(header));
+            } else {
+                RepositoryManager.pageHeader.clear();
+                String header = "<div class=\"col-sm-9\"><h2>Topics for " + rest + "</h2><ol class=\"breadcrumb\">" +
+                        "<li><a href=\"#dashboard\">Home</a></li><li><a href=\"#enrichContent\">Enrich Content</a></li>" +
+                        "<li class=\"active\"><strong>" + rest + "</strong></li></ol></div>";
+                RepositoryManager.pageHeader.add(new HTML(header));
+            }
         }
     }
 
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/EnrichContentWidget.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/EnrichContentWidget.java	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/EnrichContentWidget.java	(revision 44971)
@@ -2,14 +2,26 @@
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.Document;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.domain.data.Repository;
 import eu.dnetlib.gwt.client.help.HelpService;
 import eu.dnetlib.gwt.client.help.HelpServiceAsync;
 import eu.dnetlib.repo.manager.client.HelpCallback;
+import eu.dnetlib.repo.manager.client.RepositoryManager;
 import eu.dnetlib.repo.manager.client.RepositoryManagerWidget;
+import eu.dnetlib.repo.manager.client.services.BrokerService;
+import eu.dnetlib.repo.manager.client.services.BrokerServiceAsync;
+import eu.dnetlib.repo.manager.shared.DatasourcesCollection;
+import eu.dnetlib.repo.manager.shared.Tuple;
+import eu.dnetlib.repo.manager.shared.broker.BrowseEntry;
+import eu.dnetlib.repo.manager.shared.broker.DatasourcesBroker;
 import org.gwtbootstrap3.client.ui.Alert;
+import org.gwtbootstrap3.client.ui.Anchor;
 import org.gwtbootstrap3.client.ui.constants.AlertType;
 
 /**
@@ -32,6 +44,7 @@
     private FlowPanel helpPanel = new FlowPanel();
 
     private static HelpServiceAsync helpService = GWT.create(HelpService.class);
+    private static BrokerServiceAsync brokerService = GWT.create(BrokerService.class);
 
     public EnrichContentWidget() {
 
@@ -72,7 +85,95 @@
 
         helpService.getHelpById(parentToken, new HelpCallback(enrichContentColPanel, helpPanel, enrichContentPanel));
 
-        enrichContentBoxContent.add(new HTML("Under construction"));
+        final HTML loadingWheel = new HTML("<div class=\"loader-big\" style=\"text-align: center; padding-top: 170px; " +
+                "color: rgb(47, 64, 80); font-weight: bold;\">Retrieving repositories...</div>" +
+                "<div class=\"whiteFilm\"></div>");
+        enrichContentBoxContent.addStyleName("loading-big");
+        enrichContentBoxContent.add(loadingWheel);
+
+        brokerService.getDatasourcesOfUser(RepositoryManager.currentUser.getEmail(), false, false, new AsyncCallback<DatasourcesBroker>() {
+
+            @Override
+            public void onFailure(Throwable caught) {
+
+                enrichContentBoxContent.removeStyleName("loading-big");
+                enrichContentBoxContent.remove(loadingWheel);
+
+                errorAlert.setText("System error retrieving repositories.");
+                errorAlert.setVisible(true);
+            }
+
+            @Override
+            public void onSuccess(DatasourcesBroker datasourcesBroker) {
+
+                enrichContentBoxContent.removeStyleName("loading-big");
+                enrichContentBoxContent.remove(loadingWheel);
+
+                FlowPanel titleRowPanel = new FlowPanel();
+                titleRowPanel.addStyleName("row");
+                enrichContentBoxContent.add(titleRowPanel);
+
+                //CONTENT
+
+                FlowPanel contentRowPanel = new FlowPanel();
+                contentRowPanel.addStyleName("row");
+                enrichContentBoxContent.add(contentRowPanel);
+
+                final FlowPanel contentColPanel = new FlowPanel();
+                contentColPanel.addStyleName("col-lg-12");
+                contentRowPanel.add(contentColPanel);
+
+                final FlowPanel reposList = new FlowPanel();
+                createReposList(datasourcesBroker, reposList);
+
+                final FlowPanel reposGrid = new FlowPanel();
+                createReposGrid(datasourcesBroker, reposGrid);
+                contentColPanel.add(reposGrid);
+
+                // TITLE
+
+                FlowPanel titleColPanel = new FlowPanel();
+                titleColPanel.addStyleName("col-lg-12");
+                titleRowPanel.add(titleColPanel);
+
+                FlowPanel showOptions = new FlowPanel();
+                showOptions.addStyleName("showOptions");
+                titleColPanel.add(showOptions);
+
+                final Anchor gridView = new Anchor();
+                final Anchor listView = new Anchor();
+
+                gridView.addStyleName("grid-view active");
+                gridView.setHTML("<i class=\"fa fa-th\"></i>");
+                gridView.addClickHandler(new ClickHandler() {
+                    @Override
+                    public void onClick(ClickEvent event) {
+                        listView.removeStyleName("active");
+                        gridView.addStyleName("active");
+                        contentColPanel.clear();
+                        contentColPanel.add(reposGrid);
+                    }
+                });
+                showOptions.add(gridView);
+
+                listView.addStyleName("grid-view");
+                listView.setHTML("<i class=\"fa fa-th-list\"></i>");
+                listView.addClickHandler(new ClickHandler() {
+                    @Override
+                    public void onClick(ClickEvent event) {
+                        gridView.removeStyleName("active");
+                        listView.addStyleName("active");
+                        contentColPanel.clear();
+                        contentColPanel.add(reposList);
+                    }
+                });
+                showOptions.add(listView);
+
+                HTML title = new HTML("<h1>Choose the Datasource for which you would like to view events</h1>");
+                title.addStyleName("m-b-md");
+                titleColPanel.add(title);
+            }
+        });
     }
 
     @Override
@@ -90,4 +191,80 @@
     public Widget asWidget() {
         return enrichContentPanel;
     }
+
+    private void createReposList(DatasourcesBroker datasourcesBroker, FlowPanel reposList) {
+
+        reposList.addStyleName("col-md-12 repos-list");
+
+        if(datasourcesBroker.getDatasourcesOfUser().isEmpty()) {
+            reposList.add(new HTML("No Datasources are registered under your account"));
+        } else {
+
+            String content = "<div class=\"row headers\">" +
+                    "<div class=\"col-sm-2 header select-users\"><label>Logo</label></div>" +
+                    "<div class=\"col-sm-7 header hidden-xs\"><label>Name</label></div>" +
+                    "<div class=\"col-sm-2 header hidden-xs\"><label># of events</label></div>" +
+                    "<div class=\"col-sm-1 header hidden-xs\"><label>Actions</label></div>" +
+                    "</div>";
+
+            for(final Tuple<BrowseEntry, String> datasource : datasourcesBroker.getDatasourcesOfUser()) {
+
+                content += "<div class=\"row repo\">" +
+                        "<div class=\"col-sm-2 avatar\">";
+
+                if(datasource.getSecond()==null || datasource.getSecond().trim().isEmpty())
+                    content += "<img src=\"img/yourLogoHere.jpg\" alt=\"[Repo Logo]\" style=\"width: 45px; height: 45px\">";
+                else
+                    content += "<img src=\"" + datasource.getSecond() + "\" alt=\"[Repo Logo]\" style=\"width: 45px; height: 45px\">";
+
+                content += "</div>";
+
+                if(datasource.getFirst()!=null) {
+                    content += "<div class=\"col-sm-7\"><a class=\"name\" href=\"#" + parentToken + "/" + datasource.getFirst().getValue() + "\">" +
+                            datasource.getFirst().getValue() + "</a></div>" +
+                            "<div class=\"col-sm-2 events\">" + datasource.getFirst().getSize() + "</div>" +
+                            "<div class=\"col-sm-1 actions\"><a href=\"#" + parentToken + "/" + datasource.getFirst().getValue() +
+                            "\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i></a></div>";
+                }
+
+                content += "</div>";
+            }
+
+            HTML reposListHTML = new HTML();
+            reposListHTML.setHTML(content);
+
+            reposList.add(reposListHTML);
+        }
+    }
+
+    private void createReposGrid(DatasourcesBroker datasourcesBroker, FlowPanel reposGrid) {
+
+        reposGrid.addStyleName("col-md-12 repos-grid");
+
+        if(datasourcesBroker.getDatasourcesOfUser().isEmpty()) {
+            reposGrid.add(new HTML("No Datasources are registered under your account"));
+        } else {
+            for(final Tuple<BrowseEntry, String> datasource : datasourcesBroker.getDatasourcesOfUser()) {
+
+                HTML repositoryPanel = new HTML();
+
+                if(datasource.getFirst()!=null) {
+
+                    String content = "<div class=\"repo col-sm-3 col-xs-6\"><a href=\"#" + parentToken + "/" +
+                            datasource.getFirst().getValue() + "\">";
+                    if(datasource.getSecond()==null || datasource.getSecond().trim().isEmpty())
+                        content += "<img src=\"img/yourLogoHere.jpg\" alt=\"[Repo Logo]\" style=\"width: 128px; height: 128px\">";
+                    else
+                        content += "<img src=\"" + datasource.getSecond() + "\" alt=\"[Repo Logo]\" style=\"width: 128px; height: 128px\">";
+
+                    content+= "</a><div class=\"name\">" + datasource.getFirst().getValue() + "</div><div class=\"events\">(" +
+                            datasource.getFirst().getSize() + " events)</div></div>";
+
+                    repositoryPanel.setHTML(content);
+                }
+
+                reposGrid.add(repositoryPanel);
+            }
+        }
+    }
 }
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/ShowEventsWidget.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/ShowEventsWidget.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/ShowEventsWidget.java	(revision 44971)
@@ -0,0 +1,544 @@
+package eu.dnetlib.repo.manager.client.enrichcontent;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Document;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.gwt.client.help.HelpService;
+import eu.dnetlib.gwt.client.help.HelpServiceAsync;
+import eu.dnetlib.repo.manager.client.HelpCallback;
+import eu.dnetlib.repo.manager.client.RepositoryManagerWidget;
+import eu.dnetlib.repo.manager.client.enrichcontent.advancedsearch.EnrichContentAdvancedSearchForm;
+import eu.dnetlib.repo.manager.client.services.BrokerService;
+import eu.dnetlib.repo.manager.client.services.BrokerServiceAsync;
+import eu.dnetlib.repo.manager.shared.broker.*;
+import org.gwtbootstrap3.client.ui.Alert;
+import org.gwtbootstrap3.client.ui.Pager;
+import org.gwtbootstrap3.client.ui.constants.AlertType;
+import org.gwtbootstrap3.client.ui.constants.IconType;
+
+import java.util.List;
+
+/**
+ * Created by stefania on 11/1/16.
+ */
+public class ShowEventsWidget implements RepositoryManagerWidget {
+
+    private String parentToken = "";
+    private String restToken = "";
+
+    private String dataSource = "";
+    private String topic = "";
+    private long pageSize = 10;
+    private AdvQueryObject advQueryObject = new AdvQueryObject();
+
+    private FlowPanel showEventsPanel = new FlowPanel();
+    private FlowPanel showEventsColPanel = new FlowPanel();
+    private FlowPanel showEventsRowPanel = new FlowPanel();
+
+    private FlowPanel showEventsListColPanel = new FlowPanel();
+    private FlowPanel showEventsInnerPanel = new FlowPanel();
+    private FlowPanel showEventsBox = new FlowPanel();
+    private FlowPanel showEventsBoxContent = new FlowPanel();
+
+    private FlowPanel showAdvancedSearchColPanel = new FlowPanel();
+    private FlowPanel showAdvancedSearchInnerPanel = new FlowPanel();
+    private FlowPanel showAdvancedSearchBox = new FlowPanel();
+    private FlowPanel showAdvancedSearchBoxContent = new FlowPanel();
+
+    private Alert errorAlert = new Alert();
+
+    private FlowPanel helpPanel = new FlowPanel();
+
+    private static HelpServiceAsync helpService = GWT.create(HelpService.class);
+    private static BrokerServiceAsync brokerService = GWT.create(BrokerService.class);
+
+    public ShowEventsWidget() {
+
+        showEventsPanel.addStyleName("row");
+
+        showEventsColPanel.addStyleName("col-lg-12");
+        showEventsColPanel.add(showEventsRowPanel);
+
+        showEventsRowPanel.addStyleName("row");
+        showEventsRowPanel.add(showEventsListColPanel);
+        showEventsRowPanel.add(showAdvancedSearchColPanel);
+
+        showEventsListColPanel.addStyleName("col-lg-9");
+        showEventsListColPanel.add(showEventsInnerPanel);
+
+        showEventsInnerPanel.addStyleName("wrapper wrapper-content animated fadeInUp");
+        showEventsInnerPanel.add(showEventsBox);
+
+        showEventsBox.addStyleName("ibox");
+        showEventsBox.add(showEventsBoxContent);
+
+        showEventsBoxContent.addStyleName("ibox-content bigContent");
+
+        errorAlert.setType(AlertType.DANGER);
+        errorAlert.setDismissable(false);
+        errorAlert.setVisible(false);
+        showEventsBoxContent.add(errorAlert);
+
+        showAdvancedSearchColPanel.addStyleName("col-lg-3");
+        showAdvancedSearchColPanel.add(showAdvancedSearchInnerPanel);
+
+        showAdvancedSearchInnerPanel.addStyleName("wrapper wrapper-content animated fadeInUp");
+        showAdvancedSearchInnerPanel.add(showAdvancedSearchBox);
+
+        showAdvancedSearchBox.addStyleName("ibox");
+        showAdvancedSearchBox.add(showAdvancedSearchBoxContent);
+
+        showAdvancedSearchBoxContent.addStyleName("ibox-content bigContent");
+
+        showEventsPanel.add(showEventsColPanel);
+    }
+
+    @Override
+    public void clear() {
+
+        showEventsBoxContent.clear();
+        errorAlert.setVisible(false);
+        showEventsPanel.remove(helpPanel);
+
+        showAdvancedSearchBoxContent.clear();
+
+        advQueryObject = new AdvQueryObject();
+    }
+
+    @Override
+    public void reload() {
+
+        Document.get().getElementById("page-wrapper").removeClassName("sidebar-content");
+        helpService.getHelpById(parentToken + "_showEvents", new HelpCallback(showEventsColPanel, helpPanel, showEventsPanel));
+
+        advQueryObject.setDatasource(dataSource);
+        advQueryObject.setTopic(topic);
+
+        showEvents(0);
+        showAdvancedSearch();
+    }
+
+    @Override
+    public void setToken(String parentToken, String rest) {
+        this.parentToken = parentToken;
+        this.restToken = rest;
+
+        String[] tokenSplit = restToken.split("/", 2);
+        dataSource = tokenSplit[0];
+        topic = tokenSplit[1];
+    }
+
+    @Override
+    public void afterAdditionToRootPanel() {
+
+    }
+
+    @Override
+    public Widget asWidget() {
+        return showEventsPanel;
+    }
+
+    private void showAdvancedSearch() {
+
+        FlowPanel contentRowPanel = new FlowPanel();
+        contentRowPanel.addStyleName("row");
+        showAdvancedSearchBoxContent.add(contentRowPanel);
+
+        final FlowPanel contentColPanel = new FlowPanel();
+        contentColPanel.addStyleName("col-lg-12");
+        contentRowPanel.add(contentColPanel);
+
+        EnrichContentAdvancedSearchForm enrichContentAdvancedSearchForm = new EnrichContentAdvancedSearchForm(dataSource, topic);
+        EnrichContentAdvancedSearchForm.AdvancedSearchFormSelectionListener advancedSearchFormSelectionListener =
+                new EnrichContentAdvancedSearchForm.AdvancedSearchFormSelectionListener() {
+                    @Override
+                    public void criteriaSelected(AdvQueryObject advQueryObject) {
+                        ShowEventsWidget.this.advQueryObject = advQueryObject;
+                        showEvents(0);
+                    }
+
+                    @Override
+                    public void criteriaCleared(AdvQueryObject advQueryObject) {
+                        ShowEventsWidget.this.advQueryObject = advQueryObject;
+                        showEvents(0);
+                    }
+                };
+        enrichContentAdvancedSearchForm.setAdvancedSearchFormSelectionListener(advancedSearchFormSelectionListener);
+
+        final FlowPanel advancedSearch = new FlowPanel();
+        advancedSearch.addStyleName("col-md-12 enrichContentAdvancedSearch");
+        contentColPanel.add(advancedSearch);
+        advancedSearch.add(new HTML("<h3>Advanced Search</h3>"));
+        advancedSearch.add(enrichContentAdvancedSearchForm.asWidget());
+    }
+
+    private void showEvents(long currentPage) {
+
+        showEventsBoxContent.clear();
+        showEventsBoxContent.add(errorAlert);
+
+        final HTML loadingWheel = new HTML("<div class=\"loader-big\" style=\"text-align: center; padding-top: 170px; " +
+                "color: rgb(47, 64, 80); font-weight: bold;\">Retrieving events...</div>" +
+                "<div class=\"whiteFilm\"></div>");
+        showEventsBoxContent.addStyleName("loading-big");
+        showEventsBoxContent.add(loadingWheel);
+
+        brokerService.advancedShowEvents(advQueryObject, currentPage, pageSize, new AsyncCallback<EventsPage>() {
+
+            @Override
+            public void onFailure(Throwable caught) {
+
+                showEventsBoxContent.removeStyleName("loading-big");
+                showEventsBoxContent.remove(loadingWheel);
+
+                errorAlert.setText("System error retrieving events for the selected topic.");
+                errorAlert.setVisible(true);
+            }
+
+            @Override
+            public void onSuccess(EventsPage eventsPage) {
+
+                showEventsBoxContent.removeStyleName("loading-big");
+                showEventsBoxContent.remove(loadingWheel);
+
+                FlowPanel contentRowPanel = new FlowPanel();
+                contentRowPanel.addStyleName("row");
+                showEventsBoxContent.add(contentRowPanel);
+
+                final FlowPanel contentColPanel = new FlowPanel();
+                contentColPanel.addStyleName("col-lg-12");
+                contentRowPanel.add(contentColPanel);
+
+//                final FlowPanel advancedSearch = new FlowPanel();
+//                advancedSearch.addStyleName("col-md-3 enrichContentAdvancedSearch");
+//                contentColPanel.add(advancedSearch);
+//                advancedSearch.add(new HTML("<h3>Advanced Search</h3>"));
+//                advancedSearch.add(new EnrichContentAdvancedSearchForm());
+
+                final FlowPanel eventsList = new FlowPanel();
+                eventsList.addStyleName("col-md-12 topics-list");
+                createEventsList(eventsPage, eventsList);
+                contentColPanel.add(eventsList);
+            }
+        });
+    }
+
+    private void createEventsList(EventsPage eventsPage, FlowPanel eventsList) {
+
+        if(eventsPage == null || eventsPage.getTotal() == 0) {
+
+            eventsList.add(new HTML("<div class=\"alert alert-warning\">No events were found for this topic.</div>"));
+
+        } else {
+
+            long from = eventsPage.getCurrPage() * pageSize + 1;
+            long to = (eventsPage.getCurrPage() + 1) * pageSize;
+
+            eventsList.add(new HTML("Showing " + from + "-" + to + " of " + eventsPage.getTotal() + " results"));
+
+            FlowPanel topPagerPanel = new FlowPanel();
+            drawPager(topPagerPanel, eventsPage);
+            eventsList.add(topPagerPanel);
+
+            String content = "";
+
+            for(OpenAireEventPayload payload : eventsPage.getValues()) {
+                content += returnPayloadContent(payload);
+            }
+
+            HTML topicsListHTML = new HTML();
+            topicsListHTML.setHTML(content);
+
+            eventsList.add(topicsListHTML);
+
+            FlowPanel bottomPagerPanel = new FlowPanel();
+            drawPager(bottomPagerPanel, eventsPage);
+            eventsList.add(bottomPagerPanel);
+        }
+    }
+
+    private void drawPager(FlowPanel pagerPanel, final EventsPage eventsPage) {
+
+        Pager resultsPager = new Pager();
+        resultsPager.setAlignToSides(true);
+        resultsPager.setNextIcon(IconType.LONG_ARROW_RIGHT);
+        resultsPager.setPreviousIcon(IconType.LONG_ARROW_LEFT);
+
+        resultsPager.addNextClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+                showEvents(eventsPage.getCurrPage() + 1);
+            }
+        });
+
+        resultsPager.addPreviousClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+                showEvents(eventsPage.getCurrPage() - 1);
+            }
+        });
+
+        if(eventsPage.getCurrPage()==0)
+            resultsPager.setPreviousEnabled(false);
+        else
+            resultsPager.setPreviousEnabled(true);
+
+        if(eventsPage.getCurrPage()==(eventsPage.getTotalPages()-1))
+            resultsPager.setNextEnabled(false);
+        else
+            resultsPager.setNextEnabled(true);
+
+        pagerPanel.add(resultsPager);
+
+        Label pageNumber = new Label();
+
+        pageNumber.setText("page " + (eventsPage.getCurrPage() + 1) + " of " + eventsPage.getTotalPages());
+        pageNumber.addStyleName("resultsPageLabel");
+        pagerPanel.add(pageNumber);
+    }
+    
+    private String returnPayloadContent(OpenAireEventPayload openAireEventPayload) {
+        
+        String payloadContent = "";
+        
+        payloadContent += "<div class=\"well\">" +
+                "<p class=\"text-right\"><span class=\"label label-primary ng-binding\"><b>Trust: </b>" + openAireEventPayload.getTrust() + "</span></p>" +
+                "<table class=\"table table-striped\">" +
+                "<tbody><tr>" +
+                "<th class=\"col-xs-4 col-md-3 col-lg-2\">ID</th>" +
+                "<td class=\"col-xs-8 col-md-9 col-lg-10\">" +
+                openAireEventPayload.getPublication().getOriginalId() +
+                "</td>" +
+                "</tr>";
+
+        // TITLES
+        payloadContent += "<tr>" +
+                "<th>Title(s)</th>" +
+                "<td>";
+
+        for(int i=0; i<openAireEventPayload.getPublication().getTitles().size(); i++) {
+            if(i!=0)
+                payloadContent += "<br>";
+            payloadContent += "<span>" + openAireEventPayload.getPublication().getTitles().get(i) + "</span>";
+        }
+
+        payloadContent += "</td>" +
+                "</tr>";
+
+        // AUTHORS
+        payloadContent += "<tr>" +
+                "<th>Author(s)</th>" +
+                "<td>";
+
+        for(int i=0; i<openAireEventPayload.getPublication().getCreators().size(); i++) {
+            if(i!=0)
+                payloadContent += "<br>";
+            payloadContent += "<span>" + openAireEventPayload.getPublication().getCreators().get(i) + "</span>";
+        }
+
+
+        payloadContent += "</td>" +
+                "</tr>";
+
+        // PIDs
+        if(openAireEventPayload.getHighlight().getPids()!=null && !openAireEventPayload.getHighlight().getPids().isEmpty()) {
+            payloadContent += "<tr class=\"success\">";
+        } else {
+            payloadContent += "<tr>";
+        }
+
+        payloadContent += "<th>PID(s)</th>" +
+                "<td>" ;
+
+        for(Pid pid : openAireEventPayload.getPublication().getPids()) {
+            payloadContent += "<span>" + pid.getValue() + "<b>&nbsp;&nbsp;(" + pid.getType() + ")&nbsp;&nbsp;</b> ";
+            if(isPidHighlighted(pid, openAireEventPayload.getHighlight().getPids())) {
+                payloadContent += "<span>";
+
+                payloadContent += "<span class=\"label label-success\">added</span>";
+
+                if(openAireEventPayload.getProvenance()!=null) {
+
+                    payloadContent += "<span class=\"pull-right\">" +
+                            "<b>from: </b>";
+                    if (openAireEventPayload.getProvenance().getUrl() != null) {
+                        payloadContent += "<a href=\"" + openAireEventPayload.getProvenance().getUrl() + "\" target=\"_blank\">" +
+                                openAireEventPayload.getProvenance().getRepositoryName() + "</a>";
+                    }
+                    if (openAireEventPayload.getProvenance().getId() != null) {
+                        payloadContent += "<span> (ID: " + openAireEventPayload.getProvenance().getId() + ")</span>";
+                    }
+
+                    payloadContent += "</span>";
+                }
+
+                payloadContent += "</span>";
+            }
+            payloadContent += "</span>";
+        }
+
+        payloadContent += "</td>" +
+                "</tr>";
+
+
+        // ABSTRACTS
+        if(openAireEventPayload.getHighlight().getAbstracts()!=null && !openAireEventPayload.getHighlight().getAbstracts().isEmpty()) {
+            payloadContent += "<tr class=\"success\">";
+        } else {
+            payloadContent += "<tr>";
+        }
+
+        payloadContent += "<th>Abstract(s)</th>" +
+                "<td>" ;
+
+        for(int i=0; i<openAireEventPayload.getPublication().getAbstracts().size(); i++) {
+//        for(String publicationAbstract : openAireEventPayload.getPublication().getAbstracts()) {
+            if(i!=0)
+                payloadContent += "<br>";
+            payloadContent += "<span>" + openAireEventPayload.getPublication().getAbstracts().get(i) + "</span>";
+
+            if(openAireEventPayload.getHighlight().getAbstracts()!=null && !openAireEventPayload.getHighlight().getAbstracts().isEmpty()
+                    && openAireEventPayload.getProvenance()!=null) {
+
+                payloadContent += "<span class=\"pull-right\">" +
+                        "<b>from: </b>";
+                if (openAireEventPayload.getProvenance().getUrl() != null) {
+                    payloadContent += "<a href=\"" + openAireEventPayload.getProvenance().getUrl() + "\" target=\"_blank\">" +
+                            openAireEventPayload.getProvenance().getRepositoryName() + "</a>";
+                }
+                if (openAireEventPayload.getProvenance().getId() != null) {
+                    payloadContent += "<span> (ID: " + openAireEventPayload.getProvenance().getId() + ")</span>";
+                }
+
+                payloadContent += "</span>";
+            }
+        }
+
+        payloadContent += "</td>" +
+                "</tr>";
+
+
+        // SUBJECTS
+        payloadContent += "</td>" +
+                "</tr>" +
+                "<tr>" +
+                "<th>Subject(s)</th>" +
+                "<td>";
+
+        payloadContent += "<span>";
+        for(int i=0; i<openAireEventPayload.getPublication().getSubjects().size(); i++) {
+            if(i!=0)
+                payloadContent += ", ";
+            payloadContent += openAireEventPayload.getPublication().getSubjects().get(i);
+        }
+        payloadContent += "</span>";
+
+        payloadContent += "</td>" +
+                "</tr>";
+
+
+        // PUBLICATION DATE
+        if(openAireEventPayload.getHighlight().getPublicationdate()!=null &&
+                !openAireEventPayload.getHighlight().getPublicationdate().isEmpty()) {
+            payloadContent += "<tr class=\"success\">";
+        } else {
+            payloadContent += "<tr>";
+        }
+
+        payloadContent += "<th>Publication date</th>\n" +
+                "<td>" +
+                openAireEventPayload.getPublication().getPublicationdate() +
+                "</td>" +
+                "</tr>";
+
+
+        // RIGHTS
+        if(openAireEventPayload.getHighlight().getInstances()!=null &&
+                !openAireEventPayload.getHighlight().getInstances().isEmpty()) {
+            payloadContent += "<tr class=\"success\">";
+        } else {
+            payloadContent += "<tr>";
+        }
+
+        payloadContent += "<th>Rights</th>" +
+                "<td>";
+
+        for(int i=0; i<openAireEventPayload.getPublication().getInstances().size(); i++) {
+
+            if(i!=0)
+                payloadContent += "<br>";
+
+            payloadContent += "<span>";
+            payloadContent += openAireEventPayload.getPublication().getInstances().get(i).getLicense() +
+                    "&nbsp;&nbsp;<b>" + openAireEventPayload.getPublication().getInstances().get(i).getHostedby() + "</b>";
+            payloadContent += "<br>";
+            payloadContent += "<a href=\"" + openAireEventPayload.getPublication().getInstances().get(i).getUrl() +
+                    "\" target=\"_blank\">" + openAireEventPayload.getPublication().getInstances().get(i).getUrl() + "</a>&nbsp;&nbsp;";
+            payloadContent += "</span>";
+
+            if(isInstanceHighlighted(openAireEventPayload.getPublication().getInstances().get(i), openAireEventPayload.getHighlight().getInstances())) {
+                payloadContent += "<span>";
+
+                payloadContent += "<span class=\"label label-success\">added</span>";
+
+                if(openAireEventPayload.getProvenance()!=null) {
+
+                    payloadContent += "<span class=\"pull-right\">" +
+                            "<b>from: </b>";
+                    if (openAireEventPayload.getProvenance().getUrl() != null) {
+                        payloadContent += "<a href=\"" + openAireEventPayload.getProvenance().getUrl() + "\" target=\"_blank\">" +
+                                openAireEventPayload.getProvenance().getRepositoryName() + "</a>";
+                    }
+                    if (openAireEventPayload.getProvenance().getId() != null) {
+                        payloadContent += "<span> (ID: " + openAireEventPayload.getProvenance().getId() + ")</span>";
+                    }
+
+                    payloadContent += "</span>";
+                }
+
+                payloadContent += "</span>";
+            }
+        }
+
+        payloadContent += "</td>" +
+                "</tr>";
+        
+        payloadContent += "</tbody>" +
+                "</table>" +
+                "</div>";
+        
+        
+        
+        return payloadContent;
+    }
+
+    private boolean isPidHighlighted(Pid pid, List<Pid> highlightedPIDs) {
+
+        for(Pid highlightedPid : highlightedPIDs) {
+            if(highlightedPid.getType().equals(pid.getType()) && highlightedPid.getValue().equals(pid.getValue()))
+                return true;
+        }
+
+        return false;
+    }
+
+    private boolean isInstanceHighlighted(Instance instance, List<Instance> highlightedInstances) {
+
+        for(Instance highlightedInstance : highlightedInstances) {
+            if(highlightedInstance.getUrl().equals(instance.getUrl())
+                    && highlightedInstance.getHostedby().equals(instance.getHostedby())
+                    && highlightedInstance.getInstancetype().equals(instance.getInstancetype())
+                    && highlightedInstance.getLicense().equals(instance.getLicense()))
+                return true;
+        }
+
+        return false;
+    }
+}
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/SingleTextBoxField.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/SingleTextBoxField.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/SingleTextBoxField.java	(revision 44971)
@@ -0,0 +1,70 @@
+package eu.dnetlib.repo.manager.client.enrichcontent.advancedsearch;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.repo.manager.client.widgets.TextBox;
+import org.gwtbootstrap3.client.ui.Anchor;
+import org.gwtbootstrap3.client.ui.constants.IconType;
+
+/**
+ * Created by stefania on 11/1/16.
+ */
+public class SingleTextBoxField implements IsWidget {
+
+    private FlowPanel keywordPanel = new FlowPanel();
+
+    private TextBox keyword = new TextBox();
+    private Anchor deleteIcon = new Anchor();
+
+    private DeleteKeywordListener deleteKeywordListener;
+
+    public SingleTextBoxField() {
+
+//        value.se(AlternateSize.XLARGE);
+        keyword.addStyleName("inlineBlock");
+
+        deleteIcon.setIcon(IconType.REMOVE);
+        deleteIcon.addStyleName("inlineBlock");
+        deleteIcon.addStyleName("deleteIcon");
+        deleteIcon.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent clickEvent) {
+
+                if(deleteKeywordListener !=null)
+                    deleteKeywordListener.deleteKeyword();
+            }
+        });
+
+        keywordPanel.add(keyword);
+        keywordPanel.add(deleteIcon);
+    }
+
+    @Override
+    public Widget asWidget() {
+        return keywordPanel;
+    }
+
+    public interface DeleteKeywordListener {
+        void deleteKeyword();
+    }
+
+    public void setDeleteKeywordListener(DeleteKeywordListener deleteKeywordListener) {
+        this.deleteKeywordListener = deleteKeywordListener;
+    }
+
+    public void clear() {
+        keyword.setValue("");
+    }
+
+    public void loadValue(String value) {
+        if(value !=null)
+            this.keyword.setValue(value);
+    }
+
+    public String getValue() {
+        return keyword.getValue().trim().equals("") ? null : keyword.getValue().trim();
+    }
+}
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/EnrichContentAdvancedSearchForm.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/EnrichContentAdvancedSearchForm.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/EnrichContentAdvancedSearchForm.java	(revision 44971)
@@ -0,0 +1,189 @@
+package eu.dnetlib.repo.manager.client.enrichcontent.advancedsearch;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.gwt.client.MyFormGroup;
+import eu.dnetlib.repo.manager.shared.broker.AdvQueryObject;
+import org.gwtbootstrap3.client.ui.Alert;
+import org.gwtbootstrap3.client.ui.Button;
+import org.gwtbootstrap3.client.ui.Form;
+import org.gwtbootstrap3.client.ui.constants.AlertType;
+import org.gwtbootstrap3.client.ui.constants.ButtonType;
+import org.gwtbootstrap3.client.ui.constants.FormType;
+import org.gwtbootstrap3.extras.slider.client.ui.Range;
+import org.gwtbootstrap3.extras.slider.client.ui.RangeSlider;
+import org.gwtbootstrap3.extras.slider.client.ui.base.FormatterCallback;
+
+/**
+ * Created by stefania on 11/1/16.
+ */
+public class EnrichContentAdvancedSearchForm implements IsWidget {
+
+    private FlowPanel enrichContentAdvancedSearchFormPanel = new FlowPanel();
+
+    private Alert enrichContentAdvancedSearchErrorAlert = new Alert();
+    private Alert enrichContentAdvancedSearchSuccessAlert = new Alert();
+
+    private Form enrichContentAdvancedSearchForm = new Form();
+
+    private RangeSlider trustSlider = new RangeSlider(0.00, 1.00, new Range(0.00, 1.00));
+
+    private MultiTextBoxFieldSet titles = new MultiTextBoxFieldSet("Title");
+    private MultiTextBoxFieldSet authors = new MultiTextBoxFieldSet("Author");
+    private MultiTextBoxFieldSet subjects = new MultiTextBoxFieldSet("Subject");
+
+    private MultiDateRangePickerFieldSet dates = new MultiDateRangePickerFieldSet("Date");
+
+    private FlowPanel actionButtons = new FlowPanel();
+    private Button search = new Button("Apply");
+    private Button clear = new Button("Clear");
+
+    private AdvancedSearchFormSelectionListener advancedSearchFormSelectionListener;
+
+    private String datasource;
+    private String topic;
+
+    public EnrichContentAdvancedSearchForm(String datasource, String topic) {
+
+        this.datasource = datasource;
+        this.topic = topic;
+
+        enrichContentAdvancedSearchFormPanel.addStyleName("advancedSearchForm");
+
+        enrichContentAdvancedSearchErrorAlert.setType(AlertType.DANGER);
+        enrichContentAdvancedSearchErrorAlert.setVisible(false);
+        enrichContentAdvancedSearchErrorAlert.setDismissable(false);
+        enrichContentAdvancedSearchFormPanel.add(enrichContentAdvancedSearchErrorAlert);
+
+        enrichContentAdvancedSearchSuccessAlert.setType(AlertType.SUCCESS);
+        enrichContentAdvancedSearchSuccessAlert.setVisible(false);
+        enrichContentAdvancedSearchSuccessAlert.setDismissable(false);
+        enrichContentAdvancedSearchFormPanel.add(enrichContentAdvancedSearchSuccessAlert);
+
+        enrichContentAdvancedSearchFormPanel.add(enrichContentAdvancedSearchForm);
+
+        Form trustForm = new Form();
+        trustForm.setType(FormType.HORIZONTAL);
+
+        trustSlider.setEnabled(true);
+        trustSlider.setStep(0.01);
+//        trustSlider.addStyleName("trustSlider");
+
+        trustSlider.setFormatter(new FormatterCallback<Range>() {
+            @Override
+            public String formatTooltip(final Range range) {
+                return "Range: [" + range.getMinValue() + ", " + range.getMaxValue() + "]";
+            }
+        });
+
+        trustForm.add(new MyFormGroup(false, "Trust", trustSlider.asWidget()));
+        enrichContentAdvancedSearchForm.add(trustForm);
+
+        enrichContentAdvancedSearchForm.add(titles);
+
+        enrichContentAdvancedSearchForm.add(authors);
+
+        enrichContentAdvancedSearchForm.add(subjects);
+
+        enrichContentAdvancedSearchForm.add(dates);
+
+        Form actionsForm = new Form();
+        actionsForm.setType(FormType.HORIZONTAL);
+
+        actionButtons.addStyleName("actionButtons");
+        actionsForm.add(new MyFormGroup(false, null, actionButtons));
+
+        search.setType(ButtonType.PRIMARY);
+        search.addStyleName("advancedSearch");
+        search.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+
+                AdvQueryObject advQueryObject = createAdvancedQueryData();
+
+                if(advancedSearchFormSelectionListener!=null)
+                    advancedSearchFormSelectionListener.criteriaSelected(advQueryObject);
+            }
+        });
+        actionButtons.add(search);
+
+        clear.setType(ButtonType.DEFAULT);
+        clear.addStyleName("clearCriteria");
+        clear.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+
+                clearSelections();
+
+                if(advancedSearchFormSelectionListener!=null)
+                    advancedSearchFormSelectionListener.criteriaCleared(createClearQueryData());
+            }
+        });
+        actionButtons.add(clear);
+
+        enrichContentAdvancedSearchForm.add(actionsForm);
+    }
+
+
+    @Override
+    public Widget asWidget() {
+        return enrichContentAdvancedSearchFormPanel;
+    }
+
+    public interface AdvancedSearchFormSelectionListener {
+
+        void criteriaSelected(AdvQueryObject advQueryObject);
+        void criteriaCleared(AdvQueryObject advQueryObject);
+    }
+
+    public void setAdvancedSearchFormSelectionListener(AdvancedSearchFormSelectionListener advancedSearchFormSelectionListener) {
+        this.advancedSearchFormSelectionListener = advancedSearchFormSelectionListener;
+    }
+
+    private AdvQueryObject createAdvancedQueryData() {
+
+        AdvQueryObject advQueryObject = new AdvQueryObject();
+
+        advQueryObject.setDatasource(datasource);
+        advQueryObject.setTopic(topic);
+
+        Range trustSliderValue = trustSlider.getValue();
+        advQueryObject.setTrust(new eu.dnetlib.repo.manager.shared.broker.Range(trustSliderValue.getMinValue()+"", trustSliderValue.getMaxValue()+""));
+
+        advQueryObject.setTitles(titles.getValues());
+        advQueryObject.setAuthors(authors.getValues());
+        advQueryObject.setSubjects(subjects.getValues());
+
+        advQueryObject.setDates(dates.getSelectedDateRanges());
+
+        return advQueryObject;
+    }
+
+    private AdvQueryObject createClearQueryData() {
+
+        AdvQueryObject advQueryObject = new AdvQueryObject();
+
+        advQueryObject.setDatasource(datasource);
+        advQueryObject.setTopic(topic);
+
+        advQueryObject.setDates(dates.getSelectedDateRanges());
+
+        return advQueryObject;
+    }
+
+    private void clearSelections() {
+
+        trustSlider.setValue(new Range(0.00, 1.00));
+
+        titles.clear();
+        authors.clear();
+        subjects.clear();
+
+        dates.clear();
+    }
+
+}
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/MultiDateRangePickerFieldSet.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/MultiDateRangePickerFieldSet.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/MultiDateRangePickerFieldSet.java	(revision 44971)
@@ -0,0 +1,140 @@
+package eu.dnetlib.repo.manager.client.enrichcontent.advancedsearch;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.gwt.client.MyFormGroup;
+import eu.dnetlib.repo.manager.shared.broker.Range;
+import org.gwtbootstrap3.client.ui.Anchor;
+import org.gwtbootstrap3.client.ui.Form;
+import org.gwtbootstrap3.client.ui.constants.FormType;
+import org.gwtbootstrap3.client.ui.constants.IconType;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by stefania on 11/2/16.
+ */
+public class MultiDateRangePickerFieldSet implements IsWidget {
+
+    private FlowPanel dateRangePickersPanel = new FlowPanel();
+
+    private Form multipleDateRangePickerForm = new Form();
+
+    private FlowPanel multipleDateRangePickerPanel = new FlowPanel();
+    private List<DateRangePickerField> dateRangePickerFieldsList = new ArrayList<DateRangePickerField>();
+
+    private Anchor addMore = new Anchor();
+
+    public MultiDateRangePickerFieldSet(String label) {
+
+        dateRangePickersPanel.add(multipleDateRangePickerForm);
+
+        multipleDateRangePickerForm.setType(FormType.HORIZONTAL);
+        multipleDateRangePickerForm.add(new MyFormGroup(false, label, multipleDateRangePickerPanel));
+
+        final DateRangePickerField dateRangePickerField = new DateRangePickerField();
+        dateRangePickerFieldsList.add(dateRangePickerField);
+        multipleDateRangePickerPanel.add(dateRangePickerField.asWidget());
+
+        DateRangePickerField.DeleteDateRangeListener deleteDateRangeListener = new DateRangePickerField.DeleteDateRangeListener() {
+            @Override
+            public void deleteKeyword() {
+                dateRangePickerFieldsList.remove(dateRangePickerField);
+                multipleDateRangePickerPanel.remove(dateRangePickerField.asWidget());
+            }
+        };
+        dateRangePickerField.setDeleteDateRangeListener(deleteDateRangeListener);
+
+        addMore.setIcon(IconType.PLUS);
+        addMore.setText("Add another");
+        addMore.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent clickEvent) {
+
+                final DateRangePickerField dateRangePickerField = new DateRangePickerField();
+                dateRangePickerFieldsList.add(dateRangePickerField);
+                multipleDateRangePickerPanel.insert(dateRangePickerField.asWidget(), multipleDateRangePickerPanel.getWidgetIndex(addMore));
+                DateRangePickerField.DeleteDateRangeListener deleteDateRangeListener = new DateRangePickerField.DeleteDateRangeListener() {
+                    @Override
+                    public void deleteKeyword() {
+                        dateRangePickerFieldsList.remove(dateRangePickerField);
+                        multipleDateRangePickerPanel.remove(dateRangePickerField.asWidget());
+                    }
+                };
+                dateRangePickerField.setDeleteDateRangeListener(deleteDateRangeListener);
+            }
+        });
+        multipleDateRangePickerPanel.add(addMore);
+    }
+
+    @Override
+    public Widget asWidget() {
+        return dateRangePickersPanel;
+    }
+
+    public void clear() {
+
+        multipleDateRangePickerPanel.clear();
+        dateRangePickerFieldsList = new ArrayList<DateRangePickerField>();
+
+        final DateRangePickerField dateRangePickerField = new DateRangePickerField();
+        DateRangePickerField.DeleteDateRangeListener deleteDateRangeListener = new DateRangePickerField.DeleteDateRangeListener() {
+            @Override
+            public void deleteKeyword() {
+                dateRangePickerFieldsList.remove(dateRangePickerField);
+                multipleDateRangePickerPanel.remove(dateRangePickerField.asWidget());
+            }
+        };
+        dateRangePickerField.setDeleteDateRangeListener(deleteDateRangeListener);
+
+        dateRangePickerFieldsList.add(dateRangePickerField);
+        multipleDateRangePickerPanel.add(dateRangePickerField.asWidget());
+        multipleDateRangePickerPanel.add(addMore);
+    }
+
+    public void loadSelectedDateRanges(List<Range> selectedDateRanges) {
+
+        if(selectedDateRanges !=null && !selectedDateRanges.isEmpty()) {
+            multipleDateRangePickerPanel.clear();
+            dateRangePickerFieldsList = new ArrayList<DateRangePickerField>();
+
+            for (Range selectedDateRange : selectedDateRanges) {
+
+                final DateRangePickerField dateRangePickerField = new DateRangePickerField();
+                DateRangePickerField.DeleteDateRangeListener deleteDateRangeListener = new DateRangePickerField.DeleteDateRangeListener() {
+                    @Override
+                    public void deleteKeyword() {
+                        dateRangePickerFieldsList.remove(dateRangePickerField);
+                        multipleDateRangePickerPanel.remove(dateRangePickerField.asWidget());
+                    }
+                };
+                dateRangePickerField.setDeleteDateRangeListener(deleteDateRangeListener);
+                dateRangePickerField.loadSelectedDateRange(selectedDateRange);
+                dateRangePickerFieldsList.add(dateRangePickerField);
+                multipleDateRangePickerPanel.add(dateRangePickerField.asWidget());
+            }
+            multipleDateRangePickerPanel.add(addMore);
+
+        } else {
+            clear();
+        }
+    }
+
+    public List<Range> getSelectedDateRanges() {
+
+        List<Range> selectedDateRanges = new ArrayList<Range>();
+
+        for(DateRangePickerField dateRangePickerField : dateRangePickerFieldsList) {
+
+            Range selectedDateRange = dateRangePickerField.getSelectedDateRange();
+            if(selectedDateRange!=null)
+                selectedDateRanges.add(selectedDateRange);
+        }
+
+        return selectedDateRanges;
+    }
+}
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/MultiTextBoxFieldSet.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/MultiTextBoxFieldSet.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/MultiTextBoxFieldSet.java	(revision 44971)
@@ -0,0 +1,151 @@
+package eu.dnetlib.repo.manager.client.enrichcontent.advancedsearch;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.gwt.client.MyFormGroup;
+import org.gwtbootstrap3.client.ui.Anchor;
+import org.gwtbootstrap3.client.ui.Form;
+import org.gwtbootstrap3.client.ui.constants.FormType;
+import org.gwtbootstrap3.client.ui.constants.IconType;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by stefania on 11/1/16.
+ */
+public class MultiTextBoxFieldSet implements IsWidget {
+
+    private FlowPanel stringsPanel = new FlowPanel();
+
+    private Form multipleStringsForm = new Form();
+
+    private FlowPanel multipleStringPanel = new FlowPanel();
+    private List<SingleTextBoxField> stringFieldsList = new ArrayList<SingleTextBoxField>();
+
+//    private Label documentationLabel = new Label();
+
+    private Anchor addMore = new Anchor();
+
+    public MultiTextBoxFieldSet(String label) {
+
+        stringsPanel.add(multipleStringsForm);
+
+        multipleStringsForm.setType(FormType.HORIZONTAL);
+        multipleStringsForm.add(new MyFormGroup(false, label, multipleStringPanel));
+
+        final SingleTextBoxField stringField = new SingleTextBoxField();
+        stringFieldsList.add(stringField);
+        multipleStringPanel.add(stringField.asWidget());
+
+        SingleTextBoxField.DeleteKeywordListener deleteKeywordListener = new SingleTextBoxField.DeleteKeywordListener() {
+            @Override
+            public void deleteKeyword() {
+                stringFieldsList.remove(stringField);
+                multipleStringPanel.remove(stringField.asWidget());
+            }
+        };
+        stringField.setDeleteKeywordListener(deleteKeywordListener);
+
+        addMore.setIcon(IconType.PLUS);
+        addMore.setText("Add another");
+        addMore.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent clickEvent) {
+
+                final SingleTextBoxField stringField = new SingleTextBoxField();
+                stringFieldsList.add(stringField);
+                multipleStringPanel.insert(stringField.asWidget(), multipleStringPanel.getWidgetIndex(addMore));
+                SingleTextBoxField.DeleteKeywordListener deleteKeywordListener = new SingleTextBoxField.DeleteKeywordListener() {
+                    @Override
+                    public void deleteKeyword() {
+                        stringFieldsList.remove(stringField);
+                        multipleStringPanel.remove(stringField.asWidget());
+                    }
+                };
+                stringField.setDeleteKeywordListener(deleteKeywordListener);
+            }
+        });
+        multipleStringPanel.add(addMore);
+
+//        if(ModelDocumentation.documentationMap.get(ModelDocumentation.project + "." + ModelDocumentation.keywordSets + "." + ModelDocumentation.value)!=null) {
+//            documentationLabel.setText(ModelDocumentation.documentationMap.get(ModelDocumentation.project + "." + ModelDocumentation.keywordSets + "."
+//                    + ModelDocumentation.value));
+//            multipleStringPanel.add(documentationLabel);
+//        }
+//        documentationLabel.addStyleName("comment");
+//        documentationLabel.addStyleName("fontItalic");
+    }
+
+    @Override
+    public Widget asWidget() {
+        return stringsPanel;
+    }
+
+    public void clear() {
+
+        multipleStringPanel.clear();
+        stringFieldsList = new ArrayList<SingleTextBoxField>();
+
+        final SingleTextBoxField stringField = new SingleTextBoxField();
+        SingleTextBoxField.DeleteKeywordListener deleteKeywordListener = new SingleTextBoxField.DeleteKeywordListener() {
+            @Override
+            public void deleteKeyword() {
+                stringFieldsList.remove(stringField);
+                multipleStringPanel.remove(stringField.asWidget());
+            }
+        };
+        stringField.setDeleteKeywordListener(deleteKeywordListener);
+
+        stringFieldsList.add(stringField);
+        multipleStringPanel.add(stringField.asWidget());
+        multipleStringPanel.add(addMore);
+//        multipleStringPanel.add(documentationLabel);
+    }
+
+    public void loadValues(List<String> values) {
+
+        if(values !=null && !values.isEmpty()) {
+            multipleStringPanel.clear();
+            stringFieldsList = new ArrayList<SingleTextBoxField>();
+
+            for (String value : values) {
+
+                final SingleTextBoxField keywordField = new SingleTextBoxField();
+                SingleTextBoxField.DeleteKeywordListener deleteKeywordListener = new SingleTextBoxField.DeleteKeywordListener() {
+                    @Override
+                    public void deleteKeyword() {
+                        stringFieldsList.remove(keywordField);
+                        multipleStringPanel.remove(keywordField.asWidget());
+                    }
+                };
+                keywordField.setDeleteKeywordListener(deleteKeywordListener);
+                keywordField.loadValue(value);
+                stringFieldsList.add(keywordField);
+                multipleStringPanel.add(keywordField.asWidget());
+            }
+            multipleStringPanel.add(addMore);
+//            multipleStringPanel.add(documentationLabel);
+
+        } else {
+            clear();
+        }
+    }
+
+    public List<String> getValues() {
+
+        List<String> values = new ArrayList<String>();
+
+        for(SingleTextBoxField stringField : stringFieldsList) {
+
+            String value = stringField.getValue();
+            if(value!=null)
+                values.add(value);
+        }
+
+        return values;
+    }
+}
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/DateRangePickerField.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/DateRangePickerField.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/enrichcontent/advancedsearch/DateRangePickerField.java	(revision 44971)
@@ -0,0 +1,109 @@
+package eu.dnetlib.repo.manager.client.enrichcontent.advancedsearch;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
+import eu.dnetlib.repo.manager.shared.broker.Range;
+import org.gwtbootstrap3.client.ui.Anchor;
+import org.gwtbootstrap3.client.ui.constants.IconType;
+import org.gwtbootstrap3.extras.datepicker.client.ui.DatePicker;
+
+import java.util.Date;
+
+/**
+ * Created by stefania on 11/2/16.
+ */
+public class DateRangePickerField implements IsWidget {
+
+    private FlowPanel dateRangePickerPanel = new FlowPanel();
+
+    private DatePicker from = new DatePicker();
+    private DatePicker to = new DatePicker();
+
+    private Anchor deleteIcon = new Anchor();
+
+    private DeleteDateRangeListener deleteDateRangeListener;
+
+    private DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy-MM-dd");
+
+    public DateRangePickerField() {
+
+        from.setAutoClose(true);
+        from.addStyleName("inlineBlock");
+        from.addStyleName("fromDate");
+        from.setHighlightToday(true);
+        from.setShowTodayButton(true);
+        from.setPlaceholder("From");
+
+        to.setAutoClose(true);
+        to.addStyleName("inlineBlock");
+        to.addStyleName("toDate");
+        to.setHighlightToday(true);
+        to.setShowTodayButton(true);
+        to.setPlaceholder("To");
+
+        deleteIcon.setIcon(IconType.REMOVE);
+        deleteIcon.addStyleName("inlineBlock");
+        deleteIcon.addStyleName("deleteIcon");
+        deleteIcon.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent clickEvent) {
+
+                if(deleteDateRangeListener !=null)
+                    deleteDateRangeListener.deleteKeyword();
+            }
+        });
+
+        dateRangePickerPanel.add(from);
+        dateRangePickerPanel.add(to);
+        dateRangePickerPanel.add(deleteIcon);
+    }
+
+    @Override
+    public Widget asWidget() {
+        return dateRangePickerPanel;
+    }
+
+    public interface DeleteDateRangeListener {
+        void deleteKeyword();
+    }
+
+    public void setDeleteDateRangeListener(DeleteDateRangeListener deleteDateRangeListener) {
+        this.deleteDateRangeListener = deleteDateRangeListener;
+    }
+
+    public void clear() {
+        from.setValue(new Date());
+        to.setValue(new Date());
+    }
+
+    public void loadSelectedDateRange(Range selectedDateRange) {
+
+        if(selectedDateRange !=null) {
+
+            if(selectedDateRange.getMin()!=null || !selectedDateRange.getMin().trim().equals(""))
+                from.setValue(dtf.parse(selectedDateRange.getMin()));
+
+            if(selectedDateRange.getMax()!=null || !selectedDateRange.getMax().trim().equals(""))
+                to.setValue(dtf.parse(selectedDateRange.getMax()));
+
+        }
+    }
+
+    public Range getSelectedDateRange() {
+
+        if(from.getValue()!=null && to.getValue()!=null) {
+
+            Range selectedDateRange = new Range();
+            selectedDateRange.setMin(dtf.format(from.getValue()));
+            selectedDateRange.setMax(dtf.format(to.getValue()));
+
+            return selectedDateRange;
+        }
+
+        return null;
+    }
+}
Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/SelectFromMyRepositoriesWidget.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/SelectFromMyRepositoriesWidget.java	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/SelectFromMyRepositoriesWidget.java	(revision 44971)
@@ -79,7 +79,7 @@
         myRepositoriesListBoxContent.addStyleName("loading-big");
         myRepositoriesListBoxContent.add(loadingWheel);
 
-        repositoryService.getRepositoriesOfUser(RepositoryManager.currentUser.getEmail(), true, false,
+            repositoryService.getRepositoriesOfUser(RepositoryManager.currentUser.getEmail(), true, false,
                 new AsyncCallback<DatasourcesCollection>() {
 
             @Override
Index: modules/uoa-repository-manager-gui/trunk/src/main/resources/eu/dnetlib/repo/manager/RepositoryManager.gwt.xml
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/xml
Index: modules/uoa-repository-manager-gui/trunk/src/main/webapp/RepositoryManager.css
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/webapp/RepositoryManager.css	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/webapp/RepositoryManager.css	(revision 44971)
@@ -57,6 +57,8 @@
 
 .inlineBlock {
   display: inline-block;
+  *zoom: 1;
+  *display: inline;
 }
 
 .comment {
@@ -615,11 +617,20 @@
   top: 13px;
 }
 
+.repos-list .repo .events {
+  top: 13px;
+  color: #333;
+}
+
 .repos-list .repo .actions {
   top: 13px;
   text-align: center;
 }
 
+.repos-list .repo .actions i {
+  color: #333;
+}
+
 .repos-list .repo:nth-child(2n) {
   background: #fafafc none repeat scroll 0 0;
 }
@@ -639,7 +650,50 @@
   margin-bottom: 30px;
 }
 
+.topics-list {
 
+}
+
+.topics-list .headers {
+  min-height: 35px;
+  padding-bottom: 10px;
+}
+
+.topics-list .footers {
+  min-height: 35px;
+  padding-top: 10px;
+}
+
+.topics-list .events {
+  text-align: right;
+}
+
+.topics-list .headers .header label, .topics-list .headers .header label a {
+  color: #333;
+  font-weight: 600;
+  height: 100%;
+  width: 100%;
+}
+
+.topics-list .repo .actions i {
+  color: #333;
+}
+
+.topics-list .repo:nth-child(2n) {
+  background: #fafafc none repeat scroll 0 0;
+}
+
+.topics-list .repo {
+  border-bottom: 1px solid #f0f0f0;
+  padding: 8px 0;
+}
+
+.topics-list, .repos-grid {
+  margin-top: 30px;
+  margin-bottom: 30px;
+}
+
+
 /**********************************************/
 
 .contentAndPagerPanel {
@@ -856,24 +910,105 @@
   margin-bottom: 50px;
 }
 
+/**********************************************/
 
+.enrichContentAdvancedSearch {
+  /*margin-right: 20px;*/
+}
 
+.enrichContentAdvancedSearch h3, .topics-list h3 {
+  font-size: 17px !important;
+  font-weight: 400;
+  margin: 20px 0 25px;
+  padding: 0 20px;
+  text-align: center;
+}
 
+.advancedSearchForm {
+  font-size: 12px;
+}
 
+.advancedSearchForm .form-control {
+  width: 90%;
+  margin-bottom: 5px;
+  font-size: 12px;
+}
 
+.advancedSearchForm .actionButtons .advancedSearch {
+  width: 44%;
+  margin-right: 2%;
+}
 
+.advancedSearchForm .actionButtons .clearCriteria {
+  width: 44%;
+}
 
+.deleteIcon {
+  margin-left: 3%;
+  width: auto;
+}
 
+.advancedSearchForm label {
+  display: inline-block;
+  font-weight: 700;
+  margin-bottom: 5px !important;
+}
 
+.topics-list {
 
+}
 
+.topics-list .label-success {
+  background-color: #5cb85c;
+}
 
+.topics-list .label-primary {
+  background-color: #337ab7;
+}
 
+.topics-list .table-striped > tbody > tr:nth-of-type(2n+1) {
+  background-color: #fdfdfd;
+}
 
+.topics-list .resultsPageLabel {
+  color: #337ab7;
+  font-size: 12px;
+  margin-top: -40px;
+  text-align: center;
+  margin-bottom: 20px;
+}
 
+/********************************/
 
+.slider.slider-horizontal {
+  margin-left: 2%;
+  width: 91% !important;
+}
 
+.slider {
+  display: block !important;
+}
 
+.fromDate {
+  width: 44% !important;
+}
 
+.toDate {
+  width: 44% !important;
+  margin-left: 2%;
+}
 
+/********************************/
 
+
+
+
+
+
+
+
+
+
+
+
+
Index: modules/uoa-repository-manager-gui/trunk/src/main/webapp/RepositoryManager.html
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/webapp/RepositoryManager.html	(revision 44970)
+++ modules/uoa-repository-manager-gui/trunk/src/main/webapp/RepositoryManager.html	(revision 44971)
@@ -25,6 +25,7 @@
 
       <!-- Custom styles for this template -->
       <link href="css/style.css" rel="stylesheet">
+      <!--<link href="css/plugins/jQueryUI/jquery-ui-1.10.4.custom.min.css" rel="stylesheet">-->
 
       <link href="fonts/yanonekaffeesatz.css" rel="stylesheet">
 
@@ -33,7 +34,7 @@
     <!--                                                               -->
     <link type="text/css" rel="stylesheet" href="RepositoryManager.css">
 
-    <!--                                           -->
+      <!--                                           -->
     <!-- Any title is fine                         -->
     <!--                                           -->
     <title>OpenAIRE's Repository Manager</title>
@@ -829,6 +830,7 @@
 
     <!-- Mainly scripts -->
     <script src="js/jquery-2.1.1.js"></script>
+    <!--<script src="js/jquery-ui-1.10.4.min.js"></script>-->
     <script src="js/bootstrap.min.js"></script>
     <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
     <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
Index: modules/uoa-repository-manager-gui/trunk/pom.xml
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/xml
