commented out units from admin match manage keywords. unit is not a keyword that students or supervisors select so it makes no sense for it to be here
This commit is contained in:
parent
f4358c4d5d
commit
10d7c2aeff
src/main/java/se/su/dsv/scipro
admin/pages/match
springdata
@ -5,11 +5,13 @@
|
|||||||
<wicket:extend>
|
<wicket:extend>
|
||||||
<h5 class="peer-title">Manage regular keywords</h5>
|
<h5 class="peer-title">Manage regular keywords</h5>
|
||||||
<div wicket:id="manageWordKeyword"></div>
|
<div wicket:id="manageWordKeyword"></div>
|
||||||
<h5 class="peer-title">Manage unit keywords</h5>
|
<!--<h5 class="peer-title">Manage unit keywords</h5>-->
|
||||||
<div class="info-box rounded-box">
|
<!--<div class="info-box rounded-box">-->
|
||||||
Unit keywords are imported from a remote system and may not be edited in Scipro.<br />To make changes to available units, please do so in Daisy.
|
<!--Unit keywords are imported from a remote system and may not be edited in Scipro.<br />To make changes to available units, please do so in Daisy.-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div wicket:id="manageUnitKeyword"></div>
|
<!--<div wicket:id="manageUnitKeyword">-->
|
||||||
|
<!--<div wicket:id="titleLabel"></div>-->
|
||||||
|
<!--</div>-->
|
||||||
<h5 class="peer-title">Manage research area keywords</h5>
|
<h5 class="peer-title">Manage research area keywords</h5>
|
||||||
<div class="info-box rounded-box">
|
<div class="info-box rounded-box">
|
||||||
Research area keywords are imported from a remote system and may not be edited in Scipro.<br />To make changes to available research areas, please do so in Daisy.
|
Research area keywords are imported from a remote system and may not be edited in Scipro.<br />To make changes to available research areas, please do so in Daisy.
|
||||||
|
@ -1,21 +1,37 @@
|
|||||||
package se.su.dsv.scipro.admin.pages.match;
|
package se.su.dsv.scipro.admin.pages.match;
|
||||||
|
|
||||||
import org.apache.wicket.PageParameters;
|
import org.apache.wicket.PageParameters;
|
||||||
|
import org.apache.wicket.markup.html.basic.Label;
|
||||||
|
import org.apache.wicket.markup.html.list.ListItem;
|
||||||
|
import org.apache.wicket.markup.html.list.ListView;
|
||||||
|
import org.apache.wicket.model.PropertyModel;
|
||||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||||
|
|
||||||
import se.su.dsv.scipro.admin.pages.AbstractAdminMatchPage;
|
import se.su.dsv.scipro.admin.pages.AbstractAdminMatchPage;
|
||||||
import se.su.dsv.scipro.admin.panels.match.ManageKeywordPanel;
|
import se.su.dsv.scipro.admin.panels.match.ManageKeywordPanel;
|
||||||
|
import se.su.dsv.scipro.data.dataobjects.Unit;
|
||||||
import se.su.dsv.scipro.match.dao.interfaces.KeywordTypeDao;
|
import se.su.dsv.scipro.match.dao.interfaces.KeywordTypeDao;
|
||||||
|
import se.su.dsv.scipro.springdata.services.UnitService;
|
||||||
|
|
||||||
public class AdminKeywordPage extends AbstractAdminMatchPage {
|
public class AdminKeywordPage extends AbstractAdminMatchPage {
|
||||||
|
|
||||||
@SpringBean
|
@SpringBean
|
||||||
private KeywordTypeDao keywordTypeDao;
|
private KeywordTypeDao keywordTypeDao;
|
||||||
|
@SpringBean
|
||||||
|
private UnitService unitService;
|
||||||
|
|
||||||
public AdminKeywordPage(PageParameters pp) {
|
public AdminKeywordPage(PageParameters pp) {
|
||||||
super(pp);
|
super(pp);
|
||||||
add(new ManageKeywordPanel("manageWordKeyword", keywordTypeDao.findByType(KeywordTypeDao.TYPE.REGULAR), true, false));
|
add(new ManageKeywordPanel("manageWordKeyword", keywordTypeDao.findByType(KeywordTypeDao.TYPE.REGULAR), true, false));
|
||||||
add(new ManageKeywordPanel("manageUnitKeyword", keywordTypeDao.findByType(KeywordTypeDao.TYPE.UNIT), false, false));
|
|
||||||
|
// add(new ManageKeywordPanel("manageUnitKeyword", keywordTypeDao.findByType(KeywordTypeDao.TYPE.UNIT), false, false));
|
||||||
|
// add(new ListView<Unit>("manageUnitKeyword", unitService.findAllAsList()) {
|
||||||
|
// @Override
|
||||||
|
// protected void populateItem(ListItem<Unit> unitListItem) {
|
||||||
|
// unitListItem.add(new Label("titleLabel", new PropertyModel<String>(unitListItem.getModelObject(), "title")));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
add(new ManageKeywordPanel("manageAreaKeyword", keywordTypeDao.findByType(KeywordTypeDao.TYPE.RESEARCH_AREA), false, true));
|
add(new ManageKeywordPanel("manageAreaKeyword", keywordTypeDao.findByType(KeywordTypeDao.TYPE.RESEARCH_AREA), false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import se.su.dsv.scipro.springdata.services.UnitService;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,4 +41,9 @@ public class UnitServiceImpl extends AbstractQueryService<Unit, Long> implements
|
|||||||
public Set<Unit> findAllAsSet() {
|
public Set<Unit> findAllAsSet() {
|
||||||
return new HashSet<Unit>(unitRepo.findAll());
|
return new HashSet<Unit>(unitRepo.findAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Unit> findAllAsList() {
|
||||||
|
return unitRepo.findAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package se.su.dsv.scipro.springdata.services;
|
|||||||
|
|
||||||
import se.su.dsv.scipro.data.dataobjects.Unit;
|
import se.su.dsv.scipro.data.dataobjects.Unit;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,5 +13,6 @@ public interface UnitService extends GenericService<Unit, Long>, QueryService<Un
|
|||||||
|
|
||||||
public Unit findByIdentifier(Long identifier);
|
public Unit findByIdentifier(Long identifier);
|
||||||
public Set<Unit> findAllAsSet();
|
public Set<Unit> findAllAsSet();
|
||||||
|
public List<Unit> findAllAsList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user