added label with number of supervisors for each keyword and made some changes to dialog sizes
This commit is contained in:
parent
b79ac663ec
commit
388b77beaf
src/main/java/se/su/dsv/scipro/admin/panels/match
@ -8,7 +8,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="rounded-left-top">Supervisors with selected keyword </th>
|
<th class="rounded-left-top">Supervisors with selected keyword </th>
|
||||||
<th class="rounded-right-top"> </th>
|
<th class="rounded-right-top"><span class="right" wicket:id="totalLabel"></span></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -37,6 +37,7 @@ public class KeywordDetailsPanel extends Panel {
|
|||||||
List<Employee> listOfSupervisors = supervisorDao.getSupervisorsByKeyword(keyword);
|
List<Employee> listOfSupervisors = supervisorDao.getSupervisorsByKeyword(keyword);
|
||||||
|
|
||||||
Label emptyLabel = new Label("emptyLabel","No supervisors attached to the selected keyword");
|
Label emptyLabel = new Label("emptyLabel","No supervisors attached to the selected keyword");
|
||||||
|
Label totalNumberLabel = new Label("totalLabel", "Total: " + listOfSupervisors.size());
|
||||||
emptyLabel.setVisible(listOfSupervisors.isEmpty());
|
emptyLabel.setVisible(listOfSupervisors.isEmpty());
|
||||||
WebMarkupContainer container = new WebMarkupContainer("table");
|
WebMarkupContainer container = new WebMarkupContainer("table");
|
||||||
container.setOutputMarkupId(true);
|
container.setOutputMarkupId(true);
|
||||||
@ -52,6 +53,7 @@ public class KeywordDetailsPanel extends Panel {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
container.add(listView);
|
container.add(listView);
|
||||||
|
container.add(totalNumberLabel);
|
||||||
container.add(emptyLabel);
|
container.add(emptyLabel);
|
||||||
AjaxPagingNavigator navigator = new AjaxPagingNavigator("navigator", listView);
|
AjaxPagingNavigator navigator = new AjaxPagingNavigator("navigator", listView);
|
||||||
navigator.setVisible(!listOfSupervisors.isEmpty());
|
navigator.setVisible(!listOfSupervisors.isEmpty());
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package se.su.dsv.scipro.admin.panels.match;
|
package se.su.dsv.scipro.admin.panels.match;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||||
import org.apache.wicket.ajax.markup.html.AjaxLink;
|
import org.apache.wicket.ajax.markup.html.AjaxLink;
|
||||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||||
@ -17,10 +15,8 @@ import org.apache.wicket.spring.injection.annot.SpringBean;
|
|||||||
import org.odlabs.wiquery.ui.dialog.Dialog;
|
import org.odlabs.wiquery.ui.dialog.Dialog;
|
||||||
|
|
||||||
import se.su.dsv.scipro.components.LazyDeleteAjaxLink;
|
import se.su.dsv.scipro.components.LazyDeleteAjaxLink;
|
||||||
import se.su.dsv.scipro.data.dataobjects.Employee;
|
|
||||||
import se.su.dsv.scipro.icons.ImageObject;
|
import se.su.dsv.scipro.icons.ImageObject;
|
||||||
import se.su.dsv.scipro.match.dao.interfaces.KeywordDao;
|
import se.su.dsv.scipro.match.dao.interfaces.KeywordDao;
|
||||||
import se.su.dsv.scipro.match.dao.interfaces.SupervisorDao;
|
|
||||||
import se.su.dsv.scipro.match.dataobject.Keyword;
|
import se.su.dsv.scipro.match.dataobject.Keyword;
|
||||||
import se.su.dsv.scipro.match.dataobject.KeywordType;
|
import se.su.dsv.scipro.match.dataobject.KeywordType;
|
||||||
import se.su.dsv.scipro.match.dataprovider.KeywordsDataProvider;
|
import se.su.dsv.scipro.match.dataprovider.KeywordsDataProvider;
|
||||||
@ -31,8 +27,6 @@ public class ManageKeywordPanel extends Panel {
|
|||||||
|
|
||||||
@SpringBean
|
@SpringBean
|
||||||
private KeywordDao keywordDao;
|
private KeywordDao keywordDao;
|
||||||
@SpringBean
|
|
||||||
private SupervisorDao supervisorDao;
|
|
||||||
|
|
||||||
private KeywordsDataProvider keywordsDataProvider;
|
private KeywordsDataProvider keywordsDataProvider;
|
||||||
|
|
||||||
@ -91,6 +85,8 @@ public class ManageKeywordPanel extends Panel {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(AjaxRequestTarget target) {
|
public void onClick(AjaxRequestTarget target) {
|
||||||
target.addComponent(dialog);
|
target.addComponent(dialog);
|
||||||
|
dialog.setWidth(400);
|
||||||
|
dialog.setHeight(225);
|
||||||
dialog.setTitle("Edit keyword...");
|
dialog.setTitle("Edit keyword...");
|
||||||
dialog.replace(new EditKeywordPanel("dialogContent", new Model<Keyword>(item.getModelObject())));
|
dialog.replace(new EditKeywordPanel("dialogContent", new Model<Keyword>(item.getModelObject())));
|
||||||
dialog.open(target);
|
dialog.open(target);
|
||||||
@ -123,7 +119,7 @@ public class ManageKeywordPanel extends Panel {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(AjaxRequestTarget target) {
|
public void onClick(AjaxRequestTarget target) {
|
||||||
target.addComponent(dialog);
|
target.addComponent(dialog);
|
||||||
dialog.setWidth(400);
|
dialog.setWidth(500);
|
||||||
dialog.setHeight(580);
|
dialog.setHeight(580);
|
||||||
dialog.setTitle(keyword.getKeyword());
|
dialog.setTitle(keyword.getKeyword());
|
||||||
dialog.replace(new KeywordDetailsPanel("dialogContent", keyword));
|
dialog.replace(new KeywordDetailsPanel("dialogContent", keyword));
|
||||||
@ -133,7 +129,6 @@ public class ManageKeywordPanel extends Panel {
|
|||||||
};
|
};
|
||||||
keywordDetailsLink.add(new Label("name", new Model<String>(keyword.getKeyword())));
|
keywordDetailsLink.add(new Label("name", new Model<String>(keyword.getKeyword())));
|
||||||
item.add(keywordDetailsLink);
|
item.add(keywordDetailsLink);
|
||||||
//item.add(new Label("name", new Model<String>(keyword.getKeyword())));
|
|
||||||
item.add(new Label("type", new Model<String>(keyword.getType().getName())));
|
item.add(new Label("type", new Model<String>(keyword.getType().getName())));
|
||||||
item.add(editLink);
|
item.add(editLink);
|
||||||
item.add(activeLink);
|
item.add(activeLink);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user