Project

General

Profile

Revision d95dc737

IDd95dc7372116f9be75116008c36d53d378d70fc7
Parent 6d1422f1
Child 2e765343

Added by Patrick Plitzner over 1 year ago

fix #7776 Add sources to details view for specimen descriptions

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
269 269
                } else if (isUseDescription) {
270 270
                    createUseDescriptionSection(rootElement);
271 271
                } else {
272
                    createDescriptionSection(rootElement);
272
                    createTaxonDescriptionSection(rootElement);
273 273

  
274 274
                }
275 275
            }
......
571 571
        addPart(descriptionElementMediaSection);
572 572
    }
573 573

  
574
    private void createDescriptionSection(RootElement parent) {
574
    private void createDescriptionSection(RootElement parent, boolean isTaxonDescription) {
575 575
        destroySections();
576 576
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
577
        addPart(descriptionDetailSection);
577 578

  
578 579
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
579 580

  
580
        NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
581

  
582
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
583

  
584
        //        DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
585
        //
586
        //        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
587

  
581
        if(isTaxonDescription) {
582
            NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(
583
                    getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
584
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
585
            addPart(naturalLanguageSection);
586
        }
588 587
        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(
589 588
                getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
589
        addPart(descriptionSourceSection);
590 590

  
591 591
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
592 592

  
593
        ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
594

  
595
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
593
        if(isTaxonDescription) {
594
            ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
595
            addPart(scopeSection);
596
        }
597
    }
596 598

  
597
        addPart(descriptionDetailSection);
598
        addPart(naturalLanguageSection);
599
        //        addPart(describedSpecimenSection);
600
        addPart(descriptionSourceSection);
601
        addPart(scopeSection);
599
    private void createTaxonDescriptionSection(RootElement parent) {
600
        createDescriptionSection(parent, true);
602 601
    }
603 602

  
604 603
    private void createSpecimenDescriptionSection(RootElement parent) {
605
        destroySections();
606
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
607
        addPart(descriptionDetailSection);
604
        createDescriptionSection(parent, false);
608 605
    }
609 606

  
610 607
    private void createUseDescriptionSection(RootElement parent) {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)