@@ -65,9 +65,22 @@ public TaskListEntry(TaskIndexDto task) {
6565
6666 Label taskTypeLabel = new Label (DataHelper .toStringNullable (task .getTaskType ()));
6767 CssStyles .style (taskTypeLabel , CssStyles .LABEL_BOLD , CssStyles .LABEL_UPPERCASE );
68- taskTypeLabel .setWidth (50 , Unit .PERCENTAGE );
68+ taskTypeLabel .setWidth (100 , Unit .PERCENTAGE );
6969 topLeftLayout .addComponent (taskTypeLabel );
7070
71+ Label statusLabel = new Label (DataHelper .toStringNullable (task .getTaskStatus ()));
72+ CssStyles .style (statusLabel , CssStyles .LABEL_BOLD , CssStyles .LABEL_UPPERCASE );
73+ topLeftLayout .addComponent (statusLabel );
74+
75+ Label priorityLabel = new Label (
76+ DataHelper .toStringNullable (I18nProperties .getPrefixCaption (TaskDto .I18N_PREFIX , TaskDto .PRIORITY ) + ": " + task .getPriority ()));
77+ if (TaskPriority .HIGH == task .getPriority ()) {
78+ priorityLabel .addStyleName (CssStyles .LABEL_IMPORTANT );
79+ } else if (TaskPriority .NORMAL == task .getPriority ()) {
80+ priorityLabel .addStyleName (CssStyles .LABEL_NEUTRAL );
81+ }
82+ topLeftLayout .addComponent (priorityLabel );
83+
7184 Label suggestedStartLabel = new Label (
7285 I18nProperties .getPrefixCaption (TaskDto .I18N_PREFIX , TaskDto .SUGGESTED_START ) + ": "
7386 + DateFormatHelper .formatDate (task .getSuggestedStart ()));
@@ -83,25 +96,14 @@ public TaskListEntry(TaskIndexDto task) {
8396 VerticalLayout topRightLayout = new VerticalLayout ();
8497
8598 topRightLayout .addStyleName (CssStyles .ALIGN_RIGHT );
86- topRightLayout .setMargin (false );
87- topRightLayout .setSpacing (false );
88-
89- Label statusLabel = new Label (DataHelper .toStringNullable (task .getTaskStatus ()));
90- CssStyles .style (statusLabel , CssStyles .LABEL_BOLD , CssStyles .LABEL_UPPERCASE );
91- topRightLayout .addComponent (statusLabel );
92-
93- Label priorityLabel = new Label (
94- DataHelper .toStringNullable (I18nProperties .getPrefixCaption (TaskDto .I18N_PREFIX , TaskDto .PRIORITY ) + ": " + task .getPriority ()));
95- if (TaskPriority .HIGH == task .getPriority ()) {
96- priorityLabel .addStyleName (CssStyles .LABEL_IMPORTANT );
97- } else if (TaskPriority .NORMAL == task .getPriority ()) {
98- priorityLabel .addStyleName (CssStyles .LABEL_NEUTRAL );
99- }
100- topRightLayout .addComponent (priorityLabel );
99+ /*
100+ * topRightLayout.setMargin(false);
101+ * topRightLayout.setSpacing(false);
102+ */
101103
102104 Label userLabel =
103105 new Label (I18nProperties .getPrefixCaption (TaskDto .I18N_PREFIX , TaskDto .ASSIGNEE_USER ) + ": " + task .getAssigneeUser ().getCaption ());
104- topRightLayout .addComponent (userLabel );
106+ topLeftLayout .addComponent (userLabel );
105107
106108 topLayout .addComponent (topRightLayout );
107109 topLayout .setComponentAlignment (topRightLayout , Alignment .TOP_RIGHT );
@@ -143,7 +145,7 @@ public void addEditListener(int rowIndex, ClickListener editClickListener) {
143145 CssStyles .BUTTON_COMPACT );
144146
145147 addComponent (editButton );
146- setComponentAlignment (editButton , Alignment .MIDDLE_RIGHT );
148+ setComponentAlignment (editButton , Alignment .TOP_RIGHT );
147149 setExpandRatio (editButton , 0 );
148150 }
149151
0 commit comments