Project

General

Profile

« Previous | Next » 

Revision adb55b39

Added by Andreas Kohlbecker about 6 years ago

ref #7322 showing sumbitter per registration in working set editor

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorksetViewBean.java
8 8
*/
9 9
package eu.etaxonomy.cdm.vaadin.view.registration;
10 10

  
11
import static eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStyles.LABEL_NOWRAP;
12

  
11 13
import java.util.ArrayList;
12 14
import java.util.Collection;
13 15
import java.util.Collections;
......
27 29
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
28 30
import com.vaadin.server.FontAwesome;
29 31
import com.vaadin.server.Page;
32
import com.vaadin.shared.ui.label.ContentMode;
30 33
import com.vaadin.spring.annotation.SpringView;
31 34
import com.vaadin.ui.Alignment;
32 35
import com.vaadin.ui.Button;
......
163 166
            getLayout().removeComponent(registrationListPanel);
164 167
        }
165 168
        workingsetHeader = new RegistrationItem(workingset, this);
166
        if(UserHelper.fromSession().userIsRegistrationCurator() || UserHelper.fromSession().userIsAdmin()){
167
            workingsetHeader.getSubmitterLabel().setVisible(true);
168
        }
169 169
        addContentComponent(workingsetHeader, null);
170 170

  
171 171
        registrationListPanel = createRegistrationsList(workingset);
......
369 369
        messageButton.setStyleName(ValoTheme.BUTTON_TINY);
370 370

  
371 371
        RegistrationStateLabel stateLabel = new RegistrationStateLabel().update(dto.getStatus());
372
        Label submitterLabel = new Label(dto.getSubmitterUserName());
373
        submitterLabel.setStyleName(LABEL_NOWRAP + " submitter");
374
        submitterLabel.setIcon(FontAwesome.USER);
375
        submitterLabel.setContentMode(ContentMode.HTML);
376
        CssLayout stateAndSubmitter = new CssLayout(stateLabel, submitterLabel);
372 377

  
373 378

  
374 379
        if(UserHelper.fromSession().userIsRegistrationCurator() || UserHelper.fromSession().userIsAdmin()) {
......
388 393
                EnumSet.of(CRUD.UPDATE), RegistrationStatus.PREPARATION.name());
389 394

  
390 395
        row++;
391
        registrationsGrid.addComponent(stateLabel, COL_INDEX_STATE_LABEL, row);
392
        registrationsGrid.setComponentAlignment(stateLabel, Alignment.TOP_LEFT);
396
        registrationsGrid.addComponent(stateAndSubmitter, COL_INDEX_STATE_LABEL, row);
397
        // registrationsGrid.setComponentAlignment(stateLabel, Alignment.TOP_LEFT);
393 398
        registrationsGrid.addComponent(regItemButtonGroup, COL_INDEX_REG_ITEM, row);
394 399
        registrationsGrid.addComponent(regItemButtons, COL_INDEX_BUTTON_GROUP, row);
395 400
        registrationsGrid.setComponentAlignment(regItemButtons, Alignment.TOP_LEFT);

Also available in: Unified diff