Project

General

Profile

« Previous | Next » 

Revision c7158180

Added by Andreas Kohlbecker over 3 years ago

fix #8156 registation workingset editor: type designation status in bold letters

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItemNameAndTypeButtons.java
17 17

  
18 18
import com.vaadin.server.ExternalResource;
19 19
import com.vaadin.server.FontAwesome;
20
import com.vaadin.shared.ui.label.ContentMode;
20 21
import com.vaadin.ui.Button;
21 22
import com.vaadin.ui.Label;
22 23
import com.vaadin.ui.Link;
......
30 31
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
31 32
import eu.etaxonomy.cdm.model.name.TaxonName;
32 33
import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
34
import eu.etaxonomy.cdm.model.name.TypeDesignationStatusBase;
33 35
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
34 36
import eu.etaxonomy.cdm.model.permission.CRUD;
35 37
import eu.etaxonomy.cdm.ref.TypedEntityReference;
......
129 131
                        );
130 132
                String labelText = typeDesignationWorkingSet.getRepresentation();
131 133
                labelText = labelText.replaceAll("^[^:]+:", ""); // remove "Type:", "NameType:" from the beginning
134
                for(TypeDesignationStatusBase<?> typeStatus : typeDesignationWorkingSet.keySet()){
135
                    labelText = labelText.replace(typeStatus.getLabel(), "<strong>" + typeStatus.getLabel() + "</strong>");
136
                }
132 137
                if(typeDesignationWorkingSet.getWorkingsetType().equals(TypeDesignationWorkingSetType.NAME_TYPE_DESIGNATION_WORKINGSET)){
133 138
                    // remove the citation from the label which looks very redundant in the registration working set editor
134 139
                    // TODO when use in other contexts. it might be required to make this configurable.
......
136 141
                    String citationString = regDto.getCitation().getCitation();
137 142
                    labelText = labelText.replaceFirst(citationString, "");
138 143
                }
139
                Label label = new Label(labelText);
144
                Label label = new Label(labelText, ContentMode.HTML);
140 145

  
141 146
                label.setWidthUndefined();
142 147
                addComponent(label);

Also available in: Unified diff