mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 05:53:08 +00:00
DS-816 Fixed order of search types in XMLUI Advanced Search to be determined by order in config
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6586 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -235,27 +235,24 @@ public class AdvancedSearch extends AbstractSearch implements CacheableProcessin
|
||||
|
||||
Select select = cell.addSelect("field" + row);
|
||||
|
||||
Map<String, Message> searchTypes = new HashMap<String, Message>();
|
||||
// Special case ANY
|
||||
select.addOption((current == null), "ANY").addContent(
|
||||
message("xmlui.ArtifactBrowser.AdvancedSearch.type_ANY"));
|
||||
|
||||
ArrayList<String> usedSearchTypes = new ArrayList<String>();
|
||||
int i = 1;
|
||||
String sindex = ConfigurationManager.getProperty("search.index." + i);
|
||||
while(sindex != null)
|
||||
{
|
||||
String field = sindex.split(":")[0];
|
||||
searchTypes.put(field, message("xmlui.ArtifactBrowser.AdvancedSearch.type_" + field));
|
||||
|
||||
sindex = ConfigurationManager.getProperty("search.index." + ++i);
|
||||
if(! usedSearchTypes.contains(field))
|
||||
{
|
||||
usedSearchTypes.add(field);
|
||||
select.addOption(field.equals(current), field).addContent(message("xmlui.ArtifactBrowser.AdvancedSearch.type_" + field));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Special case ANY
|
||||
select.addOption((current == null), "ANY").addContent(
|
||||
message("xmlui.ArtifactBrowser.AdvancedSearch.type_ANY"));
|
||||
|
||||
for (Map.Entry<String, Message> searchType : searchTypes.entrySet())
|
||||
{
|
||||
select.addOption(searchType.getKey().equals(current), searchType.getKey()).addContent(searchType.getValue());
|
||||
sindex = ConfigurationManager.getProperty("search.index." + ++i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
--
|
||||
--
|
||||
-- database_schema_17-18.sql
|
||||
--
|
||||
-- Version: $Revision$
|
||||
@@ -20,6 +20,7 @@
|
||||
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||
--
|
||||
BEGIN
|
||||
-------------------------------------------
|
||||
-- New column for bitstream order DS-749 --
|
||||
-------------------------------------------
|
||||
@@ -27,3 +28,5 @@ ALTER TABLE bundle2bitstream ADD bitstream_order INTEGER;
|
||||
|
||||
--Place the sequence id's in the order
|
||||
UPDATE bundle2bitstream SET bitstream_order=(SELECT sequence_id FROM bitstream WHERE bitstream.bitstream_id=bundle2bitstream.bitstream_id);
|
||||
|
||||
END
|
||||
|
Reference in New Issue
Block a user