mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 22:13: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);
|
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;
|
int i = 1;
|
||||||
String sindex = ConfigurationManager.getProperty("search.index." + i);
|
String sindex = ConfigurationManager.getProperty("search.index." + i);
|
||||||
while(sindex != null)
|
while(sindex != null)
|
||||||
{
|
{
|
||||||
String field = sindex.split(":")[0];
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sindex = ConfigurationManager.getProperty("search.index." + ++i);
|
||||||
|
|
||||||
// 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());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
--
|
--
|
||||||
-- database_schema_17-18.sql
|
-- database_schema_17-18.sql
|
||||||
--
|
--
|
||||||
-- Version: $Revision$
|
-- 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.
|
||||||
-- 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 --
|
-- 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
|
--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);
|
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