diff --git a/build.gradle b/build.gradle index 6629587d24..961ea7dc4c 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,7 @@ configurations { editors { transitive = false } + } @@ -47,6 +48,8 @@ dependencies { editors group: "cz.incad.kramerius", name: "editor", version: "5.1.0", ext: "war" // rightseditor dependency editors group: "cz.incad.kramerius", name: "rightseditor", version: "5.1.0", ext: "war" + + } @@ -64,7 +67,7 @@ allprojects { /** * Inject to all subprojects */ -subprojects { +allprojects { apply plugin:'java' apply plugin: 'eclipse' @@ -74,21 +77,25 @@ subprojects { ext.guiceversion ='3.0' - ext.postgresversion = '8.4-702.jdbc4' + ext.postgresversion = '42.1.4' ext.slf4jversion='1.6.0' ext.jerseyversion = '1.17.1' ext.generatedSources = "generated-sources" - sourceCompatibility = 1.8 targetCompatibility= 1.8 + configurations { + database + } + dependencies { // postgresql to all subprojects - compile "postgresql:postgresql:${postgresversion}" + compile "org.postgresql:postgresql:${postgresversion}" + database "org.postgresql:postgresql:${postgresversion}" // guice to all subprojects compile "com.google.inject:guice:${guiceversion}" @@ -224,13 +231,15 @@ task distZip(type:Zip, dependsOn: 'zipInstallDir') { group "Distribution" from {'client/build/libs'} from {'search/build/libs'} - from {'security-core/build/libs'} + from {'security/security-core/build/libs'} from configurations.editors + from configurations.database from {'build/installation'} - from 'build/distributions/kramerius-javadoc.zip' - eachFile { - it.path = it.path.replace('-5.1.0.war', '.war') - } + eachFile { + it.path = it.path.replace('-5.1.0.war', '.war') + } + + //from 'build/distributions/kramerius-javadoc.zip' } /** * Patch distribution task diff --git a/search/src/java/cz/incad/Kramerius/security/strenderers/TitlesForObjects.java b/search/src/java/cz/incad/Kramerius/security/strenderers/TitlesForObjects.java index eacb080f70..a3ad53ba97 100644 --- a/search/src/java/cz/incad/Kramerius/security/strenderers/TitlesForObjects.java +++ b/search/src/java/cz/incad/Kramerius/security/strenderers/TitlesForObjects.java @@ -26,6 +26,7 @@ import java.util.Locale; import java.util.ResourceBundle; +import cz.incad.kramerius.utils.FedoraUtils; import org.antlr.stringtemplate.StringTemplate; import cz.incad.kramerius.FedoraAccess; @@ -55,7 +56,10 @@ public static HashMap createModelsForPaths(FedoraAccess fedoraAc if (SpecialObjects.findSpecialObject(currentPid) != null) { modelsMap.put(currentPid, SpecialObjects.findSpecialObject(displayedPid).name()+modelPostfix); } else { - String kramModel = fedoraAccess.getKrameriusModelName(displayedPid); + String kramModel = "none"; + if (fedoraAccess.isStreamAvailable(displayedPid, FedoraUtils.RELS_EXT_STREAM)) { + kramModel =fedoraAccess.getKrameriusModelName(displayedPid); + } String localizedModel = bundleService.getResourceBundle("labels", locale).getString("document.type."+kramModel); modelsMap.put(currentPid, localizedModel+modelPostfix); } @@ -78,7 +82,10 @@ public static HashMap createTitlesForPaths(FedoraAccess fedoraAc if (SpecialObjects.findSpecialObject(currentPid) != null) { dctitlesMap.put(currentPid, SpecialObjects.findSpecialObject(pidForTitle).name()+titlePostfix); } else { - String titleFromDC = DCUtils.titleFromDC(fedoraAccess.getDC(pidForTitle)); + String titleFromDC = "none"; + if (fedoraAccess.isStreamAvailable(pidForTitle, FedoraUtils.DC_STREAM)) { + titleFromDC = DCUtils.titleFromDC(fedoraAccess.getDC(pidForTitle)); + } /* if (titleFromDC.length() > 10) { titleFromDC = titleFromDC.substring(0,10)+"..."; diff --git a/search/src/java/labels.properties b/search/src/java/labels.properties index 1bd4b138b4..9e6f61867a 100644 --- a/search/src/java/labels.properties +++ b/search/src/java/labels.properties @@ -1081,6 +1081,7 @@ search.results.select.invert=Invert selection document.type=Document types +document.type.none=Uknonwn document.type.collection=Collection diff --git a/search/src/java/labels_cs.properties b/search/src/java/labels_cs.properties index 31cfde7eb4..728d2bc039 100644 --- a/search/src/java/labels_cs.properties +++ b/search/src/java/labels_cs.properties @@ -1090,7 +1090,9 @@ search.results.select.invert=Obr\u00E1tit v\u00FDb\u011Br home.document.type=Digit\u00E1ln\u00ED knihovna obsahuje -document.type.collection=Sb�rka +document.type.none=Neznámý + +document.type.collection=Sbírka document.type=Typy dokument\u016F diff --git a/search/web/js/admin/rights/rights.js b/search/web/js/admin/rights/rights.js index a93ab7fc08..6945f169da 100644 --- a/search/web/js/admin/rights/rights.js +++ b/search/web/js/admin/rights/rights.js @@ -688,11 +688,11 @@ function GlobalActions() { // volano z hlavniho menu . GlobalActions.prototype.rigthsForAction=function(action,pid) { // affected rights secured actions - findObjectsDialog().securedActionTabs[action] = findObjectsDialog().createSecurityActionTab(action,"inc/admin/_display_rights_for_global_actions.jsp?pids={uuid\\:1}&securedaction="+action); + findObjectsDialog().securedActionTabs[action] = findObjectsDialog().createSecurityActionTab(action,"inc/admin/_display_rights_for_global_actions.jsp?pids="+encodeURIComponent("{uuid\\:1}")+"&securedaction="+action); findObjectsDialog().securedActionTabs[action].retrieve = findObjectsDialog().securedActionTabs[action].retrieveGlobalContent; var pids = (pid ? pid : "{uuid\\:1}"); - var url = "inc/admin/_display_rights_for_global_actions.jsp?pids="+pids+"&securedaction="+action; + var url = "inc/admin/_display_rights_for_global_actions.jsp?pids="+encodeURIComponent(pids)+"&securedaction="+action; $.get(url, bind(function(data) { if (this.actionDialog) { this.actionDialog.dialog('open');