Project

General

Profile

« Previous | Next » 

Revision 41637

In the Update repository page's title section we now show the repository logo and name

View differences:

modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/DatasourceUpdateController.java
44 44
            RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2>My Datasources</h2><ol class=\"breadcrumb\">" +
45 45
                    "<li><a href=\"#dashboard\">Home</a></li><li class=\"active\"><strong>My Datasources</strong></li></ol></div>"));
46 46
        } else {
47
            RepositoryManager.pageHeader.clear();
48
            RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2>Updating repository</h2><ol class=\"breadcrumb\">" +
49
                    "<li><a href=\"#dashboard\">Home</a></li><li class=\"active\"><strong>My Datasources</strong></li></ol></div>"));
47
//            RepositoryManager.pageHeader.clear();
48
//            RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2>Updating repository</h2><ol class=\"breadcrumb\">" +
49
//                    "<li><a href=\"#dashboard\">Home</a></li><li class=\"active\"><strong>My Datasources</strong></li></ol></div>"));
50 50
        }
51 51
    }
52 52

  
modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/SelectFromMyRepositoriesWidget.java
210 210
                        "<div class=\"col-sm-2 avatar\">";
211 211

  
212 212
                if(repository.getLogoUrl()==null || repository.getLogoUrl().trim().isEmpty())
213
                    content += "<img src=\"img/yourLogoHere.jpg\" alt=\"[]\" style=\"width: 45px; height: 45px\">";
213
                    content += "<img src=\"img/yourLogoHere.jpg\" alt=\"[Repo Logo]\" style=\"width: 45px; height: 45px\">";
214 214
                else
215
                    content += "<img src=\"" + repository.getLogoUrl() + "\" alt=\"[]\" style=\"width: 45px; height: 45px\">";
215
                    content += "<img src=\"" + repository.getLogoUrl() + "\" alt=\"[Repo Logo]\" style=\"width: 45px; height: 45px\">";
216 216

  
217 217
                content += "</div>" +
218 218
                        "<div class=\"col-sm-9\">" +
......
244 244
                String content = "<div class=\"repo col-sm-3 col-xs-6\"><a href=\"#" + parentToken + "/" +
245 245
                        repository.getId() + "\">";
246 246
                if(repository.getLogoUrl()==null || repository.getLogoUrl().trim().isEmpty())
247
                    content += "<img src=\"img/yourLogoHere.jpg\" alt=\"[]\" style=\"width: 128px; height: 128px\">";
247
                    content += "<img src=\"img/yourLogoHere.jpg\" alt=\"[Repo Logo]\" style=\"width: 128px; height: 128px\">";
248 248
                else
249
                    content += "<img src=\"" + repository.getLogoUrl() + "\" alt=\"[]\" style=\"width: 128px; height: 128px\">";
249
                    content += "<img src=\"" + repository.getLogoUrl() + "\" alt=\"[Repo Logo]\" style=\"width: 128px; height: 128px\">";
250 250

  
251 251
                content+= "</a><div class=\"name\">" + repository.getOfficialName() + "</div></div>";
252 252

  
modules/uoa-repository-manager-gui/trunk/src/main/java/eu/dnetlib/repo/manager/client/datasources/update/UpdateRepositoryWidget.java
9 9
import eu.dnetlib.gwt.client.help.HelpService;
10 10
import eu.dnetlib.gwt.client.help.HelpServiceAsync;
11 11
import eu.dnetlib.repo.manager.client.HelpCallback;
12
import eu.dnetlib.repo.manager.client.RepositoryManager;
12 13
import eu.dnetlib.repo.manager.client.RepositoryManagerWidget;
13 14
import eu.dnetlib.repo.manager.client.services.RepositoryService;
14 15
import eu.dnetlib.repo.manager.client.services.RepositoryServiceAsync;
......
96 97
            @Override
97 98
            public void onSuccess(final Repository repository) {
98 99

  
100
                RepositoryManager.pageHeader.clear();
101

  
102
                String logoURLSource = "";
103
                if(repository.getLogoUrl()==null || repository.getLogoUrl().isEmpty())
104
                    logoURLSource = "img/yourLogoHere.jpg";
105
                else
106
                    logoURLSource = repository.getLogoUrl();
107

  
108
                RepositoryManager.pageHeader.add(new HTML("<div class=\"col-sm-9\"><h2><img src=\"" + logoURLSource + "\" alt=[Repo Logo]" +
109
                        "width=\"35px\" height=\"35px\" style=\"margin-right: 15px; margin-top:-2px\">" + repository.getOfficialName() + "</h2>" +
110
                        "<ol class=\"breadcrumb\"><li><a href=\"#dashboard\">Home</a></li><li><a href=\"#" + parentToken +
111
                        "\">Manage Datasources</a></li><li class=\"active\"><strong>" + repository.getOfficialName() +
112
                        "</strong></li></ol></div><div class=\"col-sm-3\"><div class=\"nav navbar-top-links navbar-right\">" +
113
                        "<button id=\"addLogoURL\" style=\"margin-top: 30px; margin-right: 20px\" type=\"button\" " +
114
                        "class=\"btn btn-w-m btn-white\">Update Logo URL</button></div></div>"));
115

  
99 116
                repositoryService.getDatasourceVocabularies(repository.getDatasourceType(),
100 117
                        new AsyncCallback<DatasourceVocabularies>() {
101 118

  

Also available in: Unified diff