diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/TabContent.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/TabContent.java index 1ae2a5a21f26970a29e5c878ef528c3ebf0033d6..fb5d83bc81cfe54d86981694c10f9171e266d5fc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/TabContent.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/TabContent.java @@ -55,9 +55,9 @@ abstract public class TabContent extends ContentPanel private final String ownerId; - public TabContent(final String header, IViewContext<?> viewContext, IIdHolder ownerId) + public TabContent(final String header, IViewContext<?> viewContext, IIdHolder ownerOrNull) { - this(header, viewContext, ownerId.getId().toString()); + this(header, viewContext, (ownerOrNull != null) ? ownerOrNull.getId().toString() : ""); } private TabContent(final String header, IViewContext<?> viewContext, String ownerId) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java index c1cef6079807168aeaa0b5afbe013a8d9e64b34e..53a427bf319bc9317fe5018af7c9889e41f2fa1c 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java @@ -79,6 +79,8 @@ public final class Dict extends ch.systemsx.cisd.openbis.generic.client.web.clie public static final String EXACT_MATCH_ONLY = "EXACT_MATCH_ONLY"; + public static final String WELLS_SEARCH_MENU_ITEM = "WELLS_SEARCH"; + private Dict() { // Can not be instantiated. diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningModule.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningModule.java index c91484c673569b84aff06a73947d94cca37feb99..740b610f6ca423fbfa62da0b455d3ee09bbd64c8 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningModule.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningModule.java @@ -25,10 +25,15 @@ import com.extjs.gxt.ui.client.widget.menu.MenuItem; import com.google.gwt.user.client.rpc.AsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.TabContent; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DatabaseModificationAwareComponent; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.ITabActionMenuItemDefinition; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.TabActionMenuItemFactory; import ch.systemsx.cisd.openbis.generic.client.web.client.application.plugin.IModule; import ch.systemsx.cisd.openbis.generic.shared.basic.IEntityInformationHolderWithIdentifier; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; +import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientServiceAsync; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.ExperimentPlateLocationsSection; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.ExperimentWellMaterialsSection; @@ -51,7 +56,33 @@ public class ScreeningModule implements IModule public List<? extends MenuItem> getMenuItems() { - return Collections.emptyList(); + return Collections.singletonList(TabActionMenuItemFactory.createActionMenu(viewContext, ID, + new ITabActionMenuItemDefinition<IScreeningClientServiceAsync>() + { + + public String getName() + { + return Dict.WELLS_SEARCH_MENU_ITEM; + } + + public DatabaseModificationAwareComponent createComponent( + IViewContext<IScreeningClientServiceAsync> context) + { + TabContent wellSearchTab = + new ExperimentPlateLocationsSection(viewContext); + return DatabaseModificationAwareComponent.wrapUnaware(wellSearchTab); + } + + public String tryGetLink() + { + return null; + } + + public String getHelpPageTitle() + { + return null; + } + })); } public String getName() diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentPlateLocationsSection.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentPlateLocationsSection.java index 81a461014ebd400551398497b1b39e149e5217f4..1ccf77c522b795c6212a91490e2879331e3c4a08 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentPlateLocationsSection.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ExperimentPlateLocationsSection.java @@ -49,14 +49,21 @@ public class ExperimentPlateLocationsSection extends TabContent private List<MaterialType> materialTypesOrNull; + public ExperimentPlateLocationsSection( + IViewContext<IScreeningClientServiceAsync> screeningViewContext) + { + this(screeningViewContext, null); + setContentVisible(true); + } + public ExperimentPlateLocationsSection( IViewContext<IScreeningClientServiceAsync> screeningViewContext, - IEntityInformationHolderWithIdentifier experiment) + IEntityInformationHolderWithIdentifier experimentOrNull) { super(screeningViewContext.getMessage(Dict.EXPERIMENT_PLATE_MATERIAL_REVIEWER_SECTION), - screeningViewContext, experiment); + screeningViewContext, experimentOrNull); this.screeningViewContext = screeningViewContext; - this.experiment = experiment; + this.experiment = experimentOrNull; this.materialListField = createMaterialListArea(); this.exactMatchOnly = new CheckBoxField(screeningViewContext.getMessage(Dict.EXACT_MATCH_ONLY), false); @@ -140,6 +147,10 @@ public class ExperimentPlateLocationsSection extends TabContent private ExperimentSearchCriteria getExperimentSearchCriteria() { + if (experiment == null) + { + return ExperimentSearchCriteria.createAllExperiments(); + } return ExperimentSearchCriteria.createExperiment(experiment.getId(), experiment.getPermId(), experiment.getIdentifier()); } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js index 827b6eb6e2a38dfd8e284eb007765953582efbdd..bd351a49dbafc594c7c09ee3d67e37d15981a38b 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js @@ -10,7 +10,7 @@ var screening = { GENE_LIBRARY_URL: "http://www.genecards.org/cgi-bin/carddisp.pl?gene={0}", GENE_LIBRARY_SEARCH_URL: "http://www.genecards.org//index.php?path=/Search/keyword/{0}", - + // // General // @@ -21,7 +21,13 @@ var screening = { WELL_IMAGES: "Well Images", PREVIEW: "Preview", PLATE_VIEWER_TITLE: "Plate {0}", - + + // + // Menu items + // + WELLS_SEARCH_menu_item: "Wells Search", + WELLS_SEARCH_tab_label: "Wells Search", + // // Experiment Viewer // @@ -73,7 +79,7 @@ var screening = { IMAGE_ANALYSIS_DATA_SET: "Image Analysis Dataset", IMAGE_DATA_SET: "Image Dataset", - PLATE_MATERIAL_REVIEWER_TITLE: "Wells Search", + PLATE_MATERIAL_REVIEWER_TITLE: "Wells Search Results", PLATE_MATERIAL_REVIEWER_SPECIFY_METERIAL_ITEMS: "E.g. gene symbols, gene ids, gene descriptions, control names or compound names. Separate items with commas (\",\") or specify one item per line.", EXPERIMENT_PLATE_MATERIAL_REVIEWER_SECTION: "Wells Search",