Project

General

Profile

« Previous | Next » 

Revision 677973fa

Added by Andreas Kohlbecker almost 7 years ago

fix #6995, fix #6994 showing registrationID in workingset items and disabling when not published

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java
30 30
import com.vaadin.ui.themes.ValoTheme;
31 31

  
32 32
import eu.etaxonomy.cdm.model.common.TimePeriod;
33
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
33 34
import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.Action;
34 35
import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction;
35 36
import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent;
......
254 255
            stateLabel.setVisible(true);
255 256
            stateLabel.update(regDto.getStatus());
256 257
            getIdentifierLink().setResource(new ExternalResource(regDto.getIdentifier()));
258
            getIdentifierLink().setCaption(regDto.getIdentifier());
257 259
            //TODO make responsive and use specificIdentifier in case the space gets too narrow
258 260
            getIdentifierLink().setVisible(true);
259
            getIdentifierLink().setCaption(regDto.getIdentifier());
261
            getIdentifierLink().setEnabled(regDto.getStatus() == RegistrationStatus.PUBLISHED);
260 262

  
261 263
            registrationDate = regDto.getRegistrationDate();
262 264
        }
src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItemEditButtonGroup.java
12 12
import java.util.EnumSet;
13 13
import java.util.List;
14 14

  
15
import com.vaadin.server.ExternalResource;
15 16
import com.vaadin.server.FontAwesome;
16 17
import com.vaadin.ui.Button;
17 18
import com.vaadin.ui.Label;
19
import com.vaadin.ui.Link;
18 20
import com.vaadin.ui.themes.ValoTheme;
19 21

  
20 22
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
......
53 55

  
54 56
    private Label nameLabel = null;
55 57

  
58
    private Link identifierLink;
56 59

  
57 60
    public RegistrationItemEditButtonGroup(RegistrationDTO regDto){
58 61

  
......
107 110
        addTypeDesignationButton.setVisible(!isRegistrationLocked);
108 111
        addComponent(addTypeDesignationButton);
109 112

  
113
        //TODO make responsive and use specificIdentifier in case the space gets too narrow
114
        identifierLink = new Link(regDto.getIdentifier(), new ExternalResource(regDto.getIdentifier()));
115
        identifierLink.setEnabled(regDto.getStatus() == RegistrationStatus.PUBLISHED);
116

  
117
        addComponents(identifierLink);
118

  
110 119
        iterator().forEachRemaining(c -> addStyledComponent(c));
111 120
        addDefaultStyles();
112 121

  

Also available in: Unified diff