Revision fa315d14
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java | ||
---|---|---|
28 | 28 |
import com.vaadin.ui.CssLayout; |
29 | 29 |
import com.vaadin.ui.GridLayout; |
30 | 30 |
import com.vaadin.ui.Label; |
31 |
import com.vaadin.ui.Layout; |
|
32 | 31 |
import com.vaadin.ui.Link; |
33 | 32 |
import com.vaadin.ui.Panel; |
34 | 33 |
import com.vaadin.ui.themes.ValoTheme; |
... | ... | |
111 | 110 |
public RegistrationItem(RegistrationWorkingSet workingSet, AbstractView<?> parentView) { |
112 | 111 |
super(GRID_COLS, GRID_ROWS); |
113 | 112 |
init(); |
113 |
blockedByButton.setVisible(false); |
|
114 | 114 |
setWorkingSet(workingSet, parentView); |
115 | 115 |
} |
116 | 116 |
|
... | ... | |
228 | 228 |
private void createBlockingRelationsContent(){ |
229 | 229 |
|
230 | 230 |
if(blockingRelationsPanel == null && !regDto.getBlockedBy().isEmpty()){ |
231 |
blockingRelationsPanel = new Panel("blocked by"); |
|
232 |
Layout blockingRelations = new CssLayout(); |
|
233 |
blockingRelations.setWidth(100, Unit.PERCENTAGE); |
|
234 |
blockingRelationsPanel.setContent(blockingRelations); |
|
235 |
for(RegistrationDTO blockRegDto : regDto.getBlockedBy()){ |
|
236 |
RegistrationItem blockRegItem = new RegistrationItem(blockRegDto, parentView); |
|
237 |
blockingRelations.addComponent(blockRegItem); |
|
238 |
} |
|
239 |
blockingRelationsPanel.setWidth(100, Unit.PERCENTAGE); |
|
231 |
blockingRelationsPanel = new RegistrationItemsPanel(parentView, "blocked by", regDto.getBlockedBy()); |
|
240 | 232 |
addComponent(blockingRelationsPanel, 0, 4, GRID_COLS - 1, 4); |
241 | 233 |
} |
242 | 234 |
|
... | ... | |
277 | 269 |
getMessageButton().setCaptionAsHtml(true); |
278 | 270 |
} |
279 | 271 |
|
280 |
if(regDto != null && !regDto.getBlockedBy().isEmpty()){
|
|
272 |
if(regDto != null && !regDto.isBlocked()){
|
|
281 | 273 |
getBlockedByButton().setEnabled(true); |
282 | 274 |
getBlockedByButton().addStyleName("blocked"); |
283 | 275 |
} |
Also available in: Unified diff
ref #7195 showing blocking registrations in RegistrationWorkingsetEditor