In progress on view details
This commit is contained in:
parent
ebc7c60ccc
commit
cee9c97c28
|
@ -1,4 +1,4 @@
|
|||
eclipse.preferences.version=1
|
||||
lastWarOutDir=/home/francesco/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-1.0.0-SNAPSHOT
|
||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-1.0.0-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
|
24
pom.xml
24
pom.xml
|
@ -109,18 +109,18 @@
|
|||
<artifactId>geo-utility</artifactId>
|
||||
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>authorization-client</artifactId>
|
||||
<version>[2.0.0, 3.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.resources.discovery</groupId>
|
||||
<artifactId>ic-client</artifactId>
|
||||
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.gcube.common</groupId> -->
|
||||
<!-- <artifactId>authorization-client</artifactId> -->
|
||||
<!-- <version>[2.0.0, 3.0.0-SNAPSHOT)</version> -->
|
||||
<!-- <scope>provided</scope> -->
|
||||
<!-- </dependency> -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.gcube.resources.discovery</groupId> -->
|
||||
<!-- <artifactId>ic-client</artifactId> -->
|
||||
<!-- <version>[1.0.0, 2.0.0-SNAPSHOT)</version> -->
|
||||
<!-- <scope>provided</scope> -->
|
||||
<!-- </dependency> -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-scope-maps</artifactId>
|
||||
|
|
|
@ -35,6 +35,9 @@ public class ConcessioneView extends Composite {
|
|||
@UiField
|
||||
Paragraph introduzione;
|
||||
|
||||
@UiField
|
||||
HTMLPanel recordPanel;
|
||||
|
||||
@UiField
|
||||
Column autori;
|
||||
|
||||
|
@ -44,17 +47,23 @@ public class ConcessioneView extends Composite {
|
|||
@UiField
|
||||
HTMLPanel imagesPanel;
|
||||
|
||||
@UiField
|
||||
HTMLPanel pageViewDetails;
|
||||
|
||||
private ConcessioneDV concessioneDV;
|
||||
|
||||
private Thumbnails thumbNails = new Thumbnails();
|
||||
|
||||
public ConcessioneView() {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
pageViewDetails.getElement().setId("page-view-details");
|
||||
}
|
||||
|
||||
|
||||
public ConcessioneView(ConcessioneDV concessioneDV) {
|
||||
this();
|
||||
recordPanel.setVisible(true);
|
||||
recordPanel.add(new RecordView(concessioneDV));
|
||||
this.concessioneDV = concessioneDV;
|
||||
titolo.setText(concessioneDV.getNome());
|
||||
introduzione.setText(concessioneDV.getIntroduzione());
|
||||
|
@ -65,7 +74,6 @@ public class ConcessioneView extends Composite {
|
|||
}
|
||||
|
||||
addLabel(contributore, concessioneDV.getContributore());
|
||||
|
||||
addImages();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||
|
||||
<ui:style>
|
||||
.important {
|
||||
font-weight: bold;
|
||||
|
@ -15,13 +16,15 @@
|
|||
font-size: 22px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="pageViewDetails">
|
||||
<b:Hero>
|
||||
<b:Heading size="2" ui:field="titolo">Hero Unit</b:Heading>
|
||||
<b:Paragraph ui:field="introduzione">Some Text for the Hero Unit.</b:Paragraph>
|
||||
<b:Heading size="2" ui:field="titolo"></b:Heading>
|
||||
<b:Paragraph ui:field="introduzione"></b:Paragraph>
|
||||
</b:Hero>
|
||||
<g:HTMLPanel ui:field="concessioniPanel"
|
||||
addStyleNames="{style.margin-left-10}">
|
||||
<g:HTMLPanel ui:field="recordPanel" visible="false">
|
||||
</g:HTMLPanel>
|
||||
<b:Row>
|
||||
<b:Column size="2">
|
||||
<g:Label>Autori</g:Label>
|
||||
|
|
|
@ -2,9 +2,11 @@ package org.gcube.portlets.user.geoportaldataviewer.client.ui.products;
|
|||
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.products.model.RecordDV;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Column;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
@ -16,12 +18,24 @@ public class RecordView extends Composite {
|
|||
interface RecordViewUiBinder extends UiBinder<Widget, RecordView> {
|
||||
}
|
||||
|
||||
@UiField
|
||||
Column creationTime;
|
||||
|
||||
@UiField
|
||||
Column lastUpdateTime;
|
||||
|
||||
@UiField
|
||||
Column updatedByUser;
|
||||
|
||||
public RecordView() {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public RecordView(RecordDV record) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
addLabel(creationTime, record.getCreationTime());
|
||||
addLabel(lastUpdateTime, record.getLastUpdateTime());
|
||||
addLabel(updatedByUser, record.getLastUpdateUser());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
margin-left: 10px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="recordDVPanel"
|
||||
addStyleNames="{style.margin-left-10}">
|
||||
<g:HTMLPanel ui:field="recordDVPanel">
|
||||
<b:Row>
|
||||
<b:Column size="2">
|
||||
<g:Label>Created</g:Label>
|
||||
|
@ -21,5 +20,11 @@
|
|||
</b:Column>
|
||||
<b:Column size="8" ui:field="lastUpdateTime"></b:Column>
|
||||
</b:Row>
|
||||
<b:Row>
|
||||
<b:Column size="2">
|
||||
<g:Label>Updated By</g:Label>
|
||||
</b:Column>
|
||||
<b:Column size="8" ui:field="updatedByUser"></b:Column>
|
||||
</b:Row>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
|
@ -3,12 +3,15 @@ package org.gcube.portlets.user.geoportaldataviewer.server;
|
|||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportal.model.AccessPolicy;
|
||||
import org.gcube.application.geoportal.model.concessioni.Concessione;
|
||||
import org.gcube.application.geoportal.model.concessioni.LayerConcessione;
|
||||
import org.gcube.application.geoportal.model.concessioni.RelazioneScavo;
|
||||
import org.gcube.application.geoportal.model.content.PersistedContent;
|
||||
import org.gcube.application.geoportal.model.content.UploadedImage;
|
||||
import org.gcube.application.geoportal.model.content.WorkspaceContent;
|
||||
|
||||
public class TestModel {
|
||||
|
||||
|
@ -48,6 +51,9 @@ public class TestModel {
|
|||
concessione.setParoleChiaveLibere(Arrays.asList(new String[] {"Robba","Stuff"}));
|
||||
concessione.setParoleChiaveICCD(Arrays.asList(new String[] {"vattelapesca","somthing something"}));
|
||||
|
||||
concessione.setLastUpdateTime(LocalDateTime.now());
|
||||
concessione.setCreationTime(LocalDateTime.now());
|
||||
concessione.setLastUpdateUser("fake user");
|
||||
|
||||
concessione.setCentroidLat(43.0); //N-S
|
||||
concessione.setCentroidLong(9.0); //E-W
|
||||
|
@ -79,6 +85,11 @@ public class TestModel {
|
|||
img.setFormat("TIFF");
|
||||
img.setCreationTime(LocalDateTime.now());
|
||||
img.setResponsabili(concessione.getAuthors());
|
||||
List<PersistedContent> actualContentList = new ArrayList<PersistedContent>(1);
|
||||
WorkspaceContent ws = new WorkspaceContent();
|
||||
ws.setLink("https://data-dev.d4science.net/ie8Y");
|
||||
actualContentList.add(ws);
|
||||
img.setActualContent(actualContentList);
|
||||
imgs.add(img);
|
||||
}
|
||||
concessione.setImmaginiRappresentative(imgs);
|
||||
|
|
|
@ -68,3 +68,24 @@
|
|||
.popup-table div:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#page-view-details div {
|
||||
font-family: Lato, 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#page-view-details .hero-unit h1, #page-view-details .hero-unit h2,
|
||||
#page-view-details .hero-unit p {
|
||||
font-family: Lato, -apple-system, BlinkMacSystemFont, system-ui,
|
||||
Segoe UI, Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#page-view-details .hero-unit {
|
||||
padding: 40px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#page-view-details .span1 .gwt-Label, #page-view-details .span2 .gwt-Label {
|
||||
color: gray;
|
||||
font-weight: bold;
|
||||
}
|
|
@ -6,6 +6,8 @@ import org.gcube.application.geoportal.model.Record;
|
|||
import org.gcube.application.geoportal.model.concessioni.Concessione;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.ConvertToDataViewModel;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.GeoportalDataViewerServiceImpl;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.products.ConcessioneDV;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -14,9 +16,9 @@ public class GetConcessione {
|
|||
private static final Logger LOG = LoggerFactory.getLogger(GetConcessione.class);
|
||||
|
||||
public static String SCOPE = "/gcube/devNext/NextNext";
|
||||
public static long concessioneId = 48;
|
||||
public static long concessioneId = 16;
|
||||
|
||||
public static void main(String[] args) {
|
||||
/*public static void main(String[] args) {
|
||||
|
||||
ScopeProvider.instance.set(SCOPE);
|
||||
|
||||
|
@ -39,6 +41,14 @@ public class GetConcessione {
|
|||
String erroMsg = Concessione.class.getSimpleName() +" with id "+concessioneId+" not available";
|
||||
LOG.error(erroMsg,e);
|
||||
}
|
||||
}*/
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
GeoportalDataViewerServiceImpl geonNaServiecImpl = new GeoportalDataViewerServiceImpl();
|
||||
ScopeProvider.instance.set(SCOPE);
|
||||
LOG.info("Trying to get record for id "+concessioneId);
|
||||
ConcessioneDV concessione = geonNaServiecImpl.getConcessioneForId(concessioneId);
|
||||
LOG.info("Got record for id "+concessione);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue