Improved GUI and layout
This commit is contained in:
parent
6178b38bfa
commit
30881a9d30
|
@ -44,16 +44,16 @@ public class ConstantsGeoPortalDataEntryApp {
|
|||
|
||||
public static final String CSS_CLASS_GEOPORTAL_LOADERS_CENTER = "geoportal-loaders-center";
|
||||
|
||||
/**
|
||||
* The Enum RECORD_TYPE.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Aug 6, 2021
|
||||
*/
|
||||
public enum RECORD_TYPE {
|
||||
CONCESSIONE
|
||||
}
|
||||
// /**
|
||||
// * The Enum RECORD_TYPE.
|
||||
// *
|
||||
// * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
// *
|
||||
// * Aug 6, 2021
|
||||
// */
|
||||
// public enum RECORD_TYPE {
|
||||
// CONCESSIONE
|
||||
// }
|
||||
|
||||
/**
|
||||
* The Enum ACTION_PERFORMED_ON_ITEM.
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.gcube.application.geoportalcommon.shared.geoportal.project.Relationsh
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclarationDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.ACTION_PERFORMED_ON_ITEM;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalClientCaches.CacheSearchingFilterParametersFromConfig;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.events.ClickItemEvent;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.events.ClickItemEventHandler;
|
||||
|
@ -110,9 +109,6 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
|
||||
private GeonaDataEntryMainForm geoNaMainForm = null;
|
||||
|
||||
// private Collection<GeoNaFormCardModel> orderedCards = new
|
||||
// ArrayList<GeoNaFormCardModel>();
|
||||
|
||||
private GeonaMainTabPanel mainTabPanel;
|
||||
|
||||
private LinkedHashMap<String, Tree_Node<GeoNaFormDataObject>> savedMap = new LinkedHashMap<String, Tree_Node<GeoNaFormDataObject>>();
|
||||
|
@ -141,8 +137,6 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
return numberOfCards;
|
||||
}
|
||||
|
||||
// private List<UseCaseDescriptorDV> listUCDescriptors;
|
||||
|
||||
private boolean dataEntryProjectCreated = false;
|
||||
|
||||
private TreeItemPanel treeItemPanel;
|
||||
|
@ -797,7 +791,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
public void onSuccess(List<String> relationshipNames) {
|
||||
GWT.log("getRelationshipNames for " + profileID + " are: " + relationshipNames);
|
||||
geoportalCaches.putListRelationNamesForProfileID(profileID, relationshipNames);
|
||||
mainTabPanel.setVisibleCreateRelationButton(
|
||||
mainTabPanel.enableRelatioshipFacilities(
|
||||
relationshipNames != null && !relationshipNames.isEmpty());
|
||||
}
|
||||
|
||||
|
@ -1251,8 +1245,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
modal3.setCloseVisible(true);
|
||||
((Element) modal3.getElement().getChildNodes().getItem(1))
|
||||
.addClassName("modal-body-custom");
|
||||
EditModeRecord emr = new EditModeRecord(appManagerBus, resultDocumentDV,
|
||||
RECORD_TYPE.CONCESSIONE);
|
||||
EditModeRecord emr = new EditModeRecord(appManagerBus, resultDocumentDV);
|
||||
modal3.add(emr);
|
||||
modal3.show();
|
||||
break;
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescrip
|
|||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
||||
import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV;
|
||||
import org.gcube.application.geoportalcommon.shared.products.paths.FileSetPathsDV;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.GNADataEntryExtConfigProfile;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
||||
|
@ -105,16 +104,6 @@ public interface GeoportalDataEntryService extends RemoteService {
|
|||
*/
|
||||
FileSetPathsDV readFileSetPaths() throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the record.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @param recordType the record type
|
||||
* @return the record
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
ConcessioneDV getRecord(String itemId, RECORD_TYPE recordType) throws Exception;
|
||||
|
||||
/**
|
||||
* Update record.
|
||||
*
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescrip
|
|||
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
||||
import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV;
|
||||
import org.gcube.application.geoportalcommon.shared.products.paths.FileSetPathsDV;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.GNADataEntryExtConfigProfile;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
||||
|
@ -30,7 +29,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Sep 1, 2022
|
||||
* Sep 1, 2022
|
||||
*/
|
||||
public interface GeoportalDataEntryServiceAsync {
|
||||
|
||||
|
@ -52,7 +51,8 @@ public interface GeoportalDataEntryServiceAsync {
|
|||
}
|
||||
}
|
||||
|
||||
void saveGeonaDataForms(String profileID, Tree_Node<GeoNaFormDataObject> tree_Node, AsyncCallback<CommitReport> callback);
|
||||
void saveGeonaDataForms(String profileID, Tree_Node<GeoNaFormDataObject> tree_Node,
|
||||
AsyncCallback<CommitReport> callback);
|
||||
|
||||
void getGeonaInitConfig(AsyncCallback<GeonaISConfig> callback);
|
||||
|
||||
|
@ -69,8 +69,6 @@ public interface GeoportalDataEntryServiceAsync {
|
|||
|
||||
void readFileSetPaths(AsyncCallback<FileSetPathsDV> callback);
|
||||
|
||||
void getRecord(String itemId, RECORD_TYPE recordType, AsyncCallback<ConcessioneDV> callback);
|
||||
|
||||
void updateSectionForRecord(String itemId, String recordType, String section, int pathIndex,
|
||||
List<WorkspaceContentDV> keepCurrentContent, GenericDatasetBean gDBean,
|
||||
AsyncCallback<ConcessioneDV> callback);
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.gcube.portlets.user.geoportaldataentry.client.ui.projects.ListOfProje
|
|||
import org.gcube.portlets.user.geoportaldataentry.client.ui.projects.ListOfProjectWorkflowActionsPanel;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.relation.CreateRelationProjectsPanel;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.relation.ViewRelationshipPanel;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.table.ItemsTable.DEFAULT_DISPLAYING_COLUMN_NAME;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.DialogInform;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.LoaderIcon;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.UCD_Util;
|
||||
|
@ -577,14 +578,13 @@ public class GeonaMainTabPanel extends Composite {
|
|||
viewRelationshipPanel = new ViewRelationshipPanel(appManagerBus, selectedDocument);
|
||||
detailsPanel.add(viewRelationshipPanel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the visible create relation.
|
||||
*
|
||||
* @param bool the new visible create relation
|
||||
*/
|
||||
public void setVisibleCreateRelationButton(boolean bool) {
|
||||
|
||||
|
||||
public void enableRelatioshipFacilities(boolean bool) {
|
||||
navCreateRelation.setVisible(bool);
|
||||
if(!bool) {
|
||||
grpw.removeColumn(DEFAULT_DISPLAYING_COLUMN_NAME.RELATIONSHIPS);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
|||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalDataEntryApp;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.table.ItemsTable;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.table.ItemsTable.DEFAULT_DISPLAYING_COLUMN_NAME;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.table.SortedCellTable;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.LoaderIcon;
|
||||
|
||||
|
@ -264,6 +265,14 @@ public class GeonaRecordsPaginatedView {
|
|||
itemsTable.getSelectionModel().setSelected(item, select);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeColumn(DEFAULT_DISPLAYING_COLUMN_NAME columnName) {
|
||||
try {
|
||||
itemsTable.removeColumn(columnName);
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the select items.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</ui:style>
|
||||
<g:HTMLPanel ui:field="actionListBasePanel"
|
||||
addStyleNames="{style.action-panel}">
|
||||
<g:HTML addStyleNames="{style.action-title}">WORKFLOW ACTIONS</g:HTML>
|
||||
<g:HTML addStyleNames="{style.action-title}">MODERATION ACTIONS</g:HTML>
|
||||
<g:HTMLPanel ui:field="actionListContainer"></g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
|
@ -7,7 +7,6 @@ import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.ACTION_PERFORMED_ON_ITEM;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalDataEntryApp;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.events.OperationPerformedOnItemEvent;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.events.OperationPerformedOnItemEventHandler;
|
||||
|
@ -63,8 +62,6 @@ public class EditModeRecord extends Composite {
|
|||
|
||||
private ResultDocumentDV selectedProject;
|
||||
|
||||
private RECORD_TYPE recordType;
|
||||
|
||||
private JSONEditorWrapper jsEditor;
|
||||
|
||||
private HandlerManager appManagerBus;
|
||||
|
@ -81,10 +78,9 @@ public class EditModeRecord extends Composite {
|
|||
interface EditModeRecordUiBinder extends UiBinder<Widget, EditModeRecord> {
|
||||
}
|
||||
|
||||
public EditModeRecord(HandlerManager appManagerBus, ResultDocumentDV selectedProject, RECORD_TYPE type) {
|
||||
public EditModeRecord(HandlerManager appManagerBus, ResultDocumentDV selectedProject) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
this.selectedProject = selectedProject;
|
||||
this.recordType = type;
|
||||
this.appManagerBus = appManagerBus;
|
||||
this.filesUpdatePanel.setHeight("490px");
|
||||
// filesUpdatePanel.getElement().getStyle().setProperty("maxHeight", "550px");
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.project.BasicLifec
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.project.PublicationInfoDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.RelationshipDV;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.StringUtil;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.ButtonCell;
|
||||
import com.github.gwtbootstrap.client.ui.Pagination;
|
||||
|
@ -51,6 +52,8 @@ import com.google.gwt.view.client.SingleSelectionModel;
|
|||
*/
|
||||
public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T> {
|
||||
|
||||
private static final String CSS_CLASS_BACK_SYSTEM_CELL = "back-system-cell";
|
||||
private static final int MAX_TEXT_DIMENSION = 350;
|
||||
private static final int ITEMS_PER_PAGE = 10;
|
||||
private static final String NO_DATA = "No data";
|
||||
public static DateTimeFormat dtformat = DateTimeFormat.getFormat(ConvertToDataViewModel.DATE_FORMAT);
|
||||
|
@ -58,14 +61,14 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
private List<ItemFieldDV> displayFields;
|
||||
private boolean isAsyncronusTable;
|
||||
|
||||
private Map<COLUMN_NAME, Column> mapColumns = new HashMap<COLUMN_NAME, Column>();
|
||||
private Map<DEFAULT_DISPLAYING_COLUMN_NAME, Column> mapColumns = new HashMap<DEFAULT_DISPLAYING_COLUMN_NAME, Column>();
|
||||
|
||||
public enum COLUMN_NAME {
|
||||
public enum DEFAULT_DISPLAYING_COLUMN_NAME {
|
||||
CREATED("Created"), CREATED_BY("Created by"), PHASE("Phase"), STATUS("Status"), RELATIONSHIPS("Relationships");
|
||||
|
||||
String title;
|
||||
|
||||
COLUMN_NAME(String title) {
|
||||
DEFAULT_DISPLAYING_COLUMN_NAME(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
|
@ -136,7 +139,8 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
// removing the '_theDocument.' prefix for searching in the Document Map
|
||||
String key = itemField.getJsonFields().get(0)
|
||||
.replace(ConstantsGeoPortalDataEntryApp.DEFAULT_DOCUMENT_PROJECTION_NAME + ".", "");
|
||||
return documentDV.getDocumentAsMap().get(key).toString();
|
||||
Object value = documentDV.getDocumentAsMap().get(key);
|
||||
return value.toString();
|
||||
} catch (Exception e) {
|
||||
GWT.log("Error e: " + e);
|
||||
}
|
||||
|
@ -144,6 +148,43 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(com.google.gwt.cell.client.Cell.Context context, T object, SafeHtmlBuilder sb) {
|
||||
if (object == null)
|
||||
return;
|
||||
|
||||
DocumentDV documentDV = (DocumentDV) object;
|
||||
String objectToRender = "";
|
||||
try {
|
||||
// removing the '_theDocument.' prefix for searching in the Document Map
|
||||
String key = itemField.getJsonFields().get(0)
|
||||
.replace(ConstantsGeoPortalDataEntryApp.DEFAULT_DOCUMENT_PROJECTION_NAME + ".", "");
|
||||
Object value = documentDV.getDocumentAsMap().get(key);
|
||||
// GWT.log("key: "+key+" is instance of: "+value.getClass());
|
||||
|
||||
if (value instanceof ArrayList) {
|
||||
ArrayList<Object> arrayValues = (ArrayList<Object>) value;
|
||||
String toReturn = "<ul>";
|
||||
for (Object arrayValue : arrayValues) {
|
||||
toReturn += "<li>" + arrayValue + "</li>";
|
||||
}
|
||||
toReturn += "</ul>";
|
||||
GWT.log("Array returning: " + key + " is instance of: " + value.getClass() + " to return: "
|
||||
+ toReturn);
|
||||
objectToRender = StringUtil.ellipsize(toReturn, MAX_TEXT_DIMENSION);
|
||||
} else {
|
||||
objectToRender = StringUtil.ellipsize(value.toString(), MAX_TEXT_DIMENSION);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
GWT.log("Error e: " + e);
|
||||
}
|
||||
sb.appendHtmlConstant(objectToRender);
|
||||
// super.render(context, object, sb);
|
||||
// sb.appendHtmlConstant("</span>");
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
sortedCellTable.addColumn(col, displayName, true);
|
||||
i++;
|
||||
|
@ -171,9 +212,10 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
sortedCellTable.addColumn(colCreated, COLUMN_NAME.CREATED.getTitle(), true);
|
||||
mapColumns.put(COLUMN_NAME.CREATED, colCreated);
|
||||
|
||||
colCreated.setCellStyleNames(CSS_CLASS_BACK_SYSTEM_CELL);
|
||||
sortedCellTable.addColumn(colCreated, DEFAULT_DISPLAYING_COLUMN_NAME.CREATED.getTitle(), true);
|
||||
mapColumns.put(DEFAULT_DISPLAYING_COLUMN_NAME.CREATED, colCreated);
|
||||
|
||||
// COL PUBLISHER
|
||||
TextColumn<T> colPublisher = new TextColumn<T>() {
|
||||
|
@ -197,9 +239,10 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
sortedCellTable.addColumn(colPublisher, COLUMN_NAME.CREATED_BY.getTitle(), true);
|
||||
mapColumns.put(COLUMN_NAME.CREATED_BY, colPublisher);
|
||||
|
||||
colPublisher.setCellStyleNames(CSS_CLASS_BACK_SYSTEM_CELL);
|
||||
sortedCellTable.addColumn(colPublisher, DEFAULT_DISPLAYING_COLUMN_NAME.CREATED_BY.getTitle(), true);
|
||||
mapColumns.put(DEFAULT_DISPLAYING_COLUMN_NAME.CREATED_BY, colPublisher);
|
||||
|
||||
// COL PUBLICATION PHASE
|
||||
TextColumn<T> colPublicationPhase = new TextColumn<T>() {
|
||||
|
@ -221,8 +264,9 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
}
|
||||
};
|
||||
|
||||
sortedCellTable.addColumn(colPublicationPhase, COLUMN_NAME.PHASE.getTitle(), true);
|
||||
mapColumns.put(COLUMN_NAME.PHASE, colPublicationPhase);
|
||||
colPublicationPhase.setCellStyleNames(CSS_CLASS_BACK_SYSTEM_CELL);
|
||||
sortedCellTable.addColumn(colPublicationPhase, DEFAULT_DISPLAYING_COLUMN_NAME.PHASE.getTitle(), true);
|
||||
mapColumns.put(DEFAULT_DISPLAYING_COLUMN_NAME.PHASE, colPublicationPhase);
|
||||
|
||||
// COL OPERTION STATUS
|
||||
TextColumn<T> colOperationStatus = new TextColumn<T>() {
|
||||
|
@ -271,9 +315,10 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
sortedCellTable.addColumn(colOperationStatus, COLUMN_NAME.STATUS.getTitle(), true);
|
||||
mapColumns.put(COLUMN_NAME.STATUS, colOperationStatus);
|
||||
|
||||
colOperationStatus.setCellStyleNames(CSS_CLASS_BACK_SYSTEM_CELL);
|
||||
sortedCellTable.addColumn(colOperationStatus, DEFAULT_DISPLAYING_COLUMN_NAME.STATUS.getTitle(), true);
|
||||
mapColumns.put(DEFAULT_DISPLAYING_COLUMN_NAME.STATUS, colOperationStatus);
|
||||
|
||||
// COL OPERTION STATUS
|
||||
TextColumn<T> colRelationship = new TextColumn<T>() {
|
||||
|
@ -287,7 +332,7 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
String htmlValue = toDisplayClusterOfRelationships(documentDV.getListRelationshipDV());
|
||||
return htmlValue;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(com.google.gwt.cell.client.Cell.Context context, T object, SafeHtmlBuilder sb) {
|
||||
if (object == null)
|
||||
|
@ -296,24 +341,25 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
ResultDocumentDV documentDV = (ResultDocumentDV) object;
|
||||
List<RelationshipDV> relations = documentDV.getListRelationshipDV();
|
||||
String color = "#333";
|
||||
if (relations==null || relations.isEmpty()) {
|
||||
if (relations == null || relations.isEmpty()) {
|
||||
color = "#555";
|
||||
}
|
||||
|
||||
|
||||
sb.appendHtmlConstant("<span style='color:" + color + "; font-style: italic;'>");
|
||||
super.render(context, object, sb);
|
||||
sb.appendHtmlConstant("</span>");
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
sortedCellTable.addColumn(colRelationship, COLUMN_NAME.RELATIONSHIPS.getTitle(), true);
|
||||
mapColumns.put(COLUMN_NAME.RELATIONSHIPS, colRelationship);
|
||||
};
|
||||
|
||||
colRelationship.setCellStyleNames(CSS_CLASS_BACK_SYSTEM_CELL);
|
||||
sortedCellTable.addColumn(colRelationship, DEFAULT_DISPLAYING_COLUMN_NAME.RELATIONSHIPS.getTitle(), true);
|
||||
mapColumns.put(DEFAULT_DISPLAYING_COLUMN_NAME.RELATIONSHIPS, colRelationship);
|
||||
|
||||
}
|
||||
|
||||
public void removeColumn(COLUMN_NAME columnName) {
|
||||
public void removeColumn(DEFAULT_DISPLAYING_COLUMN_NAME columnName) {
|
||||
try {
|
||||
|
||||
Column theColumn = mapColumns.get(columnName);
|
||||
|
@ -349,7 +395,7 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
|
|||
|
||||
for (String relationName : mapclusterOfRelationships.keySet()) {
|
||||
|
||||
html += mapclusterOfRelationships.get(relationName) + " - " +relationName + "\n";
|
||||
html += mapclusterOfRelationships.get(relationName) + " - " + relationName + "\n";
|
||||
}
|
||||
|
||||
return html;
|
||||
|
|
|
@ -13,11 +13,7 @@ import org.gcube.application.geoportal.client.utils.Serialization;
|
|||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
|
||||
import org.gcube.application.geoportal.common.model.document.relationships.Relationship;
|
||||
import org.gcube.application.geoportal.common.model.legacy.Concessione;
|
||||
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
|
||||
import org.gcube.application.geoportal.common.model.rest.TempFile;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
|
||||
import org.gcube.application.geoportalcommon.ConvertToDataValueObjectModel;
|
||||
import org.gcube.application.geoportalcommon.ConvertToDataViewModel;
|
||||
import org.gcube.application.geoportalcommon.GeoportalCommon;
|
||||
|
@ -49,7 +45,6 @@ import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
|||
import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV;
|
||||
import org.gcube.application.geoportalcommon.shared.products.paths.FileSetPathsDV;
|
||||
import org.gcube.common.portal.PortalContext;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoportalDataEntryService;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ProjectFormCard;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
||||
|
@ -570,39 +565,6 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the record.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @param recordType the record type
|
||||
* @return the record
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Override
|
||||
public ConcessioneDV getRecord(String itemId, RECORD_TYPE recordType) throws Exception {
|
||||
LOG.info("getRecord called with itemId: " + itemId + ", recordType: " + recordType);
|
||||
try {
|
||||
|
||||
if (itemId == null)
|
||||
throw new Exception("Item id is null");
|
||||
|
||||
if (recordType.equals(RECORD_TYPE.CONCESSIONE)) {
|
||||
SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true);
|
||||
MongoServiceUtil serviceUtil = new MongoServiceUtil();
|
||||
MongoConcessioni clientMongo = serviceUtil.getInstanceMongoConcessioni();
|
||||
Concessione concessione = clientMongo.getById(itemId);
|
||||
return ConvertToDataViewModel.toConcessione(concessione);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error on reading the record with item id: " + itemId, e);
|
||||
throw new Exception(
|
||||
"Error occurred on reading the record with id: " + itemId + ". Error: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Read file set paths.
|
||||
*
|
||||
|
@ -635,6 +597,8 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
+ pathIndex + ", gDBean: " + gDBean, "");
|
||||
try {
|
||||
|
||||
throw new Exception("updateSectionForRecord not implemented!");
|
||||
/*
|
||||
if (itemId == null)
|
||||
throw new Exception("Item id is null");
|
||||
|
||||
|
@ -663,29 +627,28 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
|
||||
// TODO MUST BE REVISITED
|
||||
|
||||
/*
|
||||
* if (section.contains("abstract_relazione")) {
|
||||
*
|
||||
* toEditPath = Paths.ABSTRACT_RELAZIONE; request = new
|
||||
* AddSectionToConcessioneRequest(toEditPath, files);
|
||||
*
|
||||
* } else if (section.contains("immagini")) { toEditPath =
|
||||
* Paths.imgByIndex(pathIndex); request = new
|
||||
* AddSectionToConcessioneRequest(toEditPath, files);
|
||||
*
|
||||
* } else if (section.contains("relazione")) { toEditPath = Paths.RELAZIONE;
|
||||
* request = new AddSectionToConcessioneRequest(toEditPath, files);
|
||||
*
|
||||
* } else if (section.contains("posizionamentoScavo")) { toEditPath =
|
||||
* Paths.POSIZIONAMENTO; request = new
|
||||
* AddSectionToConcessioneRequest(toEditPath, files);
|
||||
*
|
||||
* } else if (section.contains("piante")) { toEditPath =
|
||||
* Paths.piantaByIndex(pathIndex); request = new
|
||||
* AddSectionToConcessioneRequest(toEditPath, files); }
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
if (section.contains("abstract_relazione")) {
|
||||
|
||||
toEditPath = Paths.ABSTRACT_RELAZIONE; request = new
|
||||
AddSectionToConcessioneRequest(toEditPath, files);
|
||||
|
||||
} else if (section.contains("immagini")) { toEditPath =
|
||||
Paths.imgByIndex(pathIndex); request = new
|
||||
AddSectionToConcessioneRequest(toEditPath, files);
|
||||
|
||||
} else if (section.contains("relazione")) { toEditPath = Paths.RELAZIONE;
|
||||
request = new AddSectionToConcessioneRequest(toEditPath, files);
|
||||
|
||||
} else if (section.contains("posizionamentoScavo")) { toEditPath =
|
||||
Paths.POSIZIONAMENTO; request = new
|
||||
AddSectionToConcessioneRequest(toEditPath, files);
|
||||
|
||||
} else if (section.contains("piante")) { toEditPath =
|
||||
Paths.piantaByIndex(pathIndex); request = new
|
||||
AddSectionToConcessioneRequest(toEditPath, files); }
|
||||
|
||||
|
||||
// Unpublish
|
||||
LOG.info("Unpublishing " + itemId);
|
||||
clientMongo.unPublish(itemId);
|
||||
|
@ -712,8 +675,8 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
LOG.debug("returning concessione: " + concessione);
|
||||
return ConvertToDataViewModel.toConcessione(concessione);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
*/
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error on updating the project with item id: " + itemId, e);
|
||||
|
|
|
@ -69,7 +69,7 @@ h1 {
|
|||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.table-glor td:nth-last-child(-n+4) {
|
||||
.back-system-cell {
|
||||
background-color: #d9edf7 !important;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue