Project

General

Profile

« Previous | Next » 

Revision c70ef402

Added by Katja Luther about 4 years ago

fix #8906: show determinations only if preference allow it

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/DnaSampleGeneralDetailElement.java
28 28

  
29 29
    private EntitySelectionElement<Collection> selection_collection;
30 30
    private TextWithLabelElement textBarcode;
31
    private TextWithLabelElement text_catalogNumber;
32
    private TextWithLabelElement text_accessionNumber;
31 33
    private CheckboxElement checkIsPublish;
32 34

  
33 35
    public DnaSampleGeneralDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
......
42 44
                        entity.getCollection(),
43 45
                        EntitySelectionElement.ALL, style);
44 46
        textBarcode = formFactory.createTextWithLabelElement(formElement, "Barcode", entity.getBarcode(), style);
47
//        text_catalogNumber = formFactory.createTextWithLabelElement(formElement, "Catalog Number", entity.getCatalogNumber(), style);
48
        text_accessionNumber = formFactory.createTextWithLabelElement(formElement, "Accession Number", entity.getAccessionNumber(), style);
45 49
        checkIsPublish = formFactory.createCheckbox(formElement, "Publish", entity.isPublish(), style);
46 50

  
47 51
    }
......
51 55
        if(eventSource==textBarcode){
52 56
            getEntity().setBarcode(textBarcode.getText());
53 57
        }
58
        if(eventSource==text_catalogNumber){
59
            getEntity().setCatalogNumber(text_catalogNumber.getText());
60
        }
61
        if(eventSource==text_accessionNumber){
62
            getEntity().setAccessionNumber(text_accessionNumber.getText());
63
        }
54 64
        else if(eventSource==checkIsPublish){
55 65
            ((DnaSample)getEntity().innerDerivedUnit()).setPublish(checkIsPublish.getSelection());
56 66
        } else if (eventSource == selection_collection) {
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
794 794
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SampleDesignationDetailSection.class, getInput().getClass().getCanonicalName(), true));
795 795

  
796 796
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
797
        DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
798

  
797
        DeterminationDetailSection determinationDetailSection = null;
798
        if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
799
            determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
800
        }
799 801
        addPart(section);
800 802
        addPart(preparationPreservationSection);
801 803
        addPart(qualitySection);
802 804
        addPart(sampleDesignationDetailSection);
803
        addPart(determinationDetailSection);
805
        if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
806
            addPart(determinationDetailSection);
807
        }
804 808
    }
805 809

  
806 810
    private void createSequenceSection(RootElement parent) {

Also available in: Unified diff