Index: modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/UpdateRepositoryWidget.java
===================================================================
--- modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/UpdateRepositoryWidget.java	(revision 50367)
+++ modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/UpdateRepositoryWidget.java	(revision 50368)
@@ -2,11 +2,17 @@
 
 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.query.client.Function;
+import com.google.gwt.user.client.Event;
+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.Widget;
 import eu.dnetlib.domain.data.Repository;
+import eu.dnetlib.domain.functionality.validator.JobResultEntry;
 import eu.dnetlib.gwt.client.help.HelpService;
 import eu.dnetlib.gwt.client.help.HelpServiceAsync;
 import eu.dnetlib.repo.manager.client.AbstractRepositoryManagerWidget;
@@ -13,12 +19,21 @@
 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.enrichcontent.EventsSubscriptionForm;
 import eu.dnetlib.repo.manager.client.services.RepositoryService;
 import eu.dnetlib.repo.manager.client.services.RepositoryServiceAsync;
+import eu.dnetlib.repo.manager.client.widgets.*;
 import eu.dnetlib.repo.manager.shared.DatasourceVocabularies;
-import org.gwtbootstrap3.client.ui.Alert;
+import eu.dnetlib.repo.manager.shared.broker.OpenaireSubscription;
+import eu.dnetlib.repo.manager.shared.broker.Subscription;
+import org.gwtbootstrap3.client.ui.*;
+import org.gwtbootstrap3.client.ui.TextBox;
 import org.gwtbootstrap3.client.ui.constants.AlertType;
+import org.gwtbootstrap3.client.ui.constants.ButtonType;
+import org.gwtbootstrap3.client.ui.constants.ModalBackdrop;
 
+import static com.google.gwt.query.client.GQuery.$;
+
 /**
  * Created by stefania on 1/14/16.
  */
@@ -27,9 +42,11 @@
     private String parentToken = "";
     private String restToken = "";
 
+    private static HTML title = new HTML();
     private FlowPanel updateRepositoryBoxContent = new FlowPanel();
 
     private Alert errorAlert = new Alert();
+    private Alert successAlert = new Alert();
 
     private RepositoryServiceAsync repositoryService = GWT.create(RepositoryService.class);
     private static HelpServiceAsync helpService = GWT.create(HelpService.class);
@@ -36,7 +53,6 @@
 
     public UpdateRepositoryWidget() {
 
-        HTML title = new HTML("<h1 class=\"uk-article-title\">Update your datasource</h1>");
         title.addStyleName("uk-margin-medium-bottom");
         contentPanel.add(title);
 
@@ -45,6 +61,11 @@
         errorAlert.setVisible(false);
         updateRepositoryBoxContent.add(errorAlert);
 
+        successAlert.setType(AlertType.SUCCESS);
+        successAlert.setDismissable(false);
+        successAlert.setVisible(false);
+        updateRepositoryBoxContent.add(successAlert);
+
         contentPanel.add(updateRepositoryBoxContent);
     }
 
@@ -52,6 +73,7 @@
     public void clear() {
         updateRepositoryBoxContent.clear();
         errorAlert.setVisible(false);
+        successAlert.setVisible(false);
         gridPanel.remove(helpPanel);
     }
 
@@ -60,6 +82,7 @@
 
         Document.get().getElementById("headerNoTransparent").removeClassName("tm-header-transparent");
         updateRepositoryBoxContent.add(errorAlert);
+        updateRepositoryBoxContent.add(successAlert);
 
         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 repository...</div>" +
@@ -84,6 +107,17 @@
             @Override
             public void onSuccess(final Repository repository) {
 
+                String logoURLSource = "";
+                if(repository.getLogoUrl()==null || repository.getLogoUrl().isEmpty())
+                    logoURLSource = "img/yourLogoHere.jpg";
+                else
+                    logoURLSource = repository.getLogoUrl();
+
+                title.setHTML("<h1 class=\"uk-article-title\">" +
+                        "<a id=\"updateLogoURL\" href=\"javascript:;\">" +
+                        "<img src=\"" + logoURLSource + "\" alt=\"[Repo Logo]\" width=\"60px\" style=\"margin-right: 15px; margin-top:-8px\"></a>" +
+                        repository.getOfficialName() + "</h1>");
+
 //                RepositoryManager.pageHeader.clear();
 //
 //                String logoURLSource = "";
@@ -122,6 +156,8 @@
                         UpdateRepositoryForm updateRepositoryForm =
                                 new UpdateRepositoryForm(repository.getDatasourceType(), datasourceVocabularies, repository);
                         updateRepositoryBoxContent.add(updateRepositoryForm.asWidget());
+
+                        addHandlers(repository);
                     }
                 });
             }
@@ -138,4 +174,116 @@
     public void afterAdditionToRootPanel() {
 
     }
+
+    private void addHandlers(final Repository repository) {
+
+        $("#updateLogoURL").click(new Function() {
+
+            public boolean f(Event e) {
+
+                errorAlert.setVisible(false);
+                successAlert.setVisible(false);
+
+                openModalToEnterLogoURL(repository);
+
+                return true;
+            }
+        });
+    }
+
+    private void openModalToEnterLogoURL(final Repository repository) {
+
+        final Modal updateLogoURLModal = new Modal();
+        updateLogoURLModal.setDataBackdrop(ModalBackdrop.STATIC);
+
+        FlowPanel modalContent = new FlowPanel();
+
+        HTML title = new HTML("<h2 class=\"uk-modal-title\">Update Logo URL</h2>\n");
+        modalContent.add(title);
+
+        Form logoURLForm = new Form();
+
+        final TextBox logoURLTextBox = new TextBox();
+        if(repository.getLogoUrl()==null || repository.getLogoUrl().isEmpty())
+            logoURLTextBox.setPlaceholder("Logo URL");
+        else
+            logoURLTextBox.setValue(repository.getLogoUrl());
+
+        logoURLForm.addStyleName("uk-margin uk-grid");
+
+        FlowPanel logoURLTextBoxWrapper = new FlowPanel();
+        logoURLTextBoxWrapper.addStyleName("uk-width-1-1");
+        logoURLTextBoxWrapper.add(logoURLTextBox);
+        logoURLForm.add(logoURLTextBoxWrapper);
+
+        modalContent.add(logoURLForm);
+
+        FlowPanel actionButtons = new FlowPanel();
+        actionButtons.addStyleName("uk-text-right uk-margin-bottom");
+        modalContent.add(actionButtons);
+
+        Button no = new Button("Cancel");
+        no.addStyleName("uk-button uk-button-default");
+        no.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+                updateLogoURLModal.hide();
+                updateLogoURLModal.removeFromParent();
+            }
+        });
+        actionButtons.add(no);
+
+        Button yes = new Button("Update");
+        yes.addStyleName("uk-button uk-button-primary");
+        yes.addClickHandler(new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+
+                repository.setLogoUrl(logoURLTextBox.getValue().trim());
+                repositoryService.updateRepositoryInformation(repository, new AsyncCallback<Void>() {
+
+                    @Override
+                    public void onFailure(Throwable throwable) {
+
+                        errorAlert.setText("System error updating logo URL");
+                        errorAlert.setVisible(true);
+
+                        updateLogoURLModal.hide();
+                        updateLogoURLModal.removeFromParent();
+                    }
+
+                    @Override
+                    public void onSuccess(Void aVoid) {
+
+                        successAlert.setVisible(true);
+                        successAlert.setText("Logo updated successfully");
+
+                        String logoURLSource = "";
+                        if(repository.getLogoUrl()==null || repository.getLogoUrl().isEmpty())
+                            logoURLSource = "img/yourLogoHere.jpg";
+                        else
+                            logoURLSource = repository.getLogoUrl();
+
+                        UpdateRepositoryWidget.title.setHTML("<h1 class=\"uk-article-title\">" +
+                                "<a id=\"updateLogoURL\" href=\"javascript:;\">" +
+                                "<img src=\"" + logoURLSource + "\" alt=\"[Repo Logo]\" width=\"60px\" style=\"margin-right: 15px; margin-top:-8px\"></a>" +
+                                repository.getOfficialName() + "</h1>");
+
+                        addHandlers(repository);
+
+                        updateLogoURLModal.hide();
+                        updateLogoURLModal.removeFromParent();
+                    }
+                });
+            }
+        });
+        actionButtons.add(yes);
+
+        ModalBody modalBody = new ModalBody();
+        modalBody.add(modalContent);
+        updateLogoURLModal.add(modalBody);
+        updateLogoURLModal.getElement().getChild(0).getChild(0).getChild(0).removeFromParent();
+
+        updateLogoURLModal.show();
+    }
 }
