diff --git a/.github/workflows/push-to-docker-hub.yml b/.github/workflows/push-to-docker-hub.yml index ac250ef6..be7e49cc 100644 --- a/.github/workflows/push-to-docker-hub.yml +++ b/.github/workflows/push-to-docker-hub.yml @@ -7,7 +7,6 @@ on: branches: - master - dev - jobs: push_to_docker_hub: name: Push Docker image to Docker Hub diff --git a/src/main/java/com/marsspiders/ukwa/controllers/CollectionController.java b/src/main/java/com/marsspiders/ukwa/controllers/CollectionController.java index 6fb00166..d45b5c3d 100644 --- a/src/main/java/com/marsspiders/ukwa/controllers/CollectionController.java +++ b/src/main/java/com/marsspiders/ukwa/controllers/CollectionController.java @@ -1,7 +1,9 @@ package com.marsspiders.ukwa.controllers; +import static com.marsspiders.ukwa.solr.AccessToEnum.VIEWABLE_ONLY_ON_LIBRARY; import static com.marsspiders.ukwa.solr.CollectionDocumentType.TYPE_COLLECTION; import static com.marsspiders.ukwa.solr.CollectionDocumentType.TYPE_TARGET; +import static com.marsspiders.ukwa.solr.SearchByEnum.FULL_TEXT; import static com.marsspiders.ukwa.util.UrlUtil.getLocale; import static com.marsspiders.ukwa.util.UrlUtil.getRootPathWithLang; import static java.util.Collections.singletonList; @@ -22,6 +24,8 @@ import javax.servlet.http.HttpServletRequest; +import com.marsspiders.ukwa.solr.SortByEnum; +import com.marsspiders.ukwa.solr.data.ContentInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -109,9 +113,13 @@ public ModelAndView collectionOverviewPage(@PathVariable("collectionId") String List targetWebsites = generateTargetWebsitesDTOs(targetWebsitesDocuments, rootPathWithLang, userIpFromBl); List subCollections = generateSubCollectionDTOs(collectionId, locale); CollectionDTO currentCollection = generatePlainCollectionDTO(collectionId, locale, targetWebsitesSearchResult); - Map breadcrumbPath = buildCollectionBreadcrumbPath(currentCollection); + if (currentCollection == null) + return new ModelAndView("errorCollNotFound"); + + Map breadcrumbPath = buildCollectionBreadcrumbPath(currentCollection); ModelAndView mav = new ModelAndView("coll"); + mav.addObject("checkCount", searchAnyFullTextIndex(currentCollection.getName())); mav.addObject("userIpFromBl", userIpFromBl); mav.addObject("breadcrumbPath", breadcrumbPath); mav.addObject("targetWebsites", targetWebsites); @@ -125,7 +133,6 @@ public ModelAndView collectionOverviewPage(@PathVariable("collectionId") String if (targetPageNumber > totalPages) targetPageNumber = totalPages; mav.addObject("targetPageNumber", targetPageNumber); - return mav; } @@ -139,16 +146,13 @@ private Map buildCollectionBreadcrumbPath(CollectionDTO currentC .fetchCollectionById(parentCollectionId) .getResponseBody().getDocuments() .get(0); - //Create a new map to get reversed map in result Map oldPath = new LinkedHashMap<>(path); path.clear(); path.put(parentCollection.getId(), parentCollection.getName()); path.putAll(oldPath); - parentCollectionId = parentCollection.getParentId(); } - return path; } @@ -178,17 +182,13 @@ private List generateRootCollectionDTOs(Locale locale) { .stream() .forEach(subCollection -> { String parentId = subCollection.getParentId(); - CollectionDTO parentCollectionDto = rootCollections.get(parentId); if (parentCollectionDto.getSubCollections() == null) { parentCollectionDto.setSubCollections(new ArrayList<>()); } - CollectionDTO subCollectionDTO = toCollectionDTO(subCollection, true, locale); parentCollectionDto.getSubCollections().add(subCollectionDTO); - }); - ArrayList sortedCollectionDTOs = new ArrayList<>(rootCollections.values()); Collections.sort(sortedCollectionDTOs, (c1, c2) -> c1.getName().compareTo(c2.getName())); @@ -198,15 +198,17 @@ private List generateRootCollectionDTOs(Locale locale) { private CollectionDTO generatePlainCollectionDTO(String collectionId, Locale locale, SolrSearchResult targetWebsitesSearchResult) { - CollectionInfo currentCollectionInformation = searchService - .fetchCollectionById(collectionId) - .getResponseBody().getDocuments() - .get(0); - - CollectionDTO collectionDTO = toCollectionDTO(currentCollectionInformation, false, locale); - collectionDTO.setWebsitesNum(targetWebsitesSearchResult.getResponseBody().getNumFound()); - - return collectionDTO; + SolrSearchResult solrSearchResult = searchService + .fetchCollectionById(collectionId); + if (solrSearchResult.getResponseBody().getDocuments().size() > 0) { + CollectionDTO collectionDTO = toCollectionDTO(solrSearchResult + .getResponseBody().getDocuments() + .get(0), false, locale); + collectionDTO.setWebsitesNum(targetWebsitesSearchResult.getResponseBody().getNumFound()); + return collectionDTO; + } + else + return null; } private List generateTargetWebsitesDTOs(List websites, @@ -280,4 +282,32 @@ private static boolean readRoomOnlyAccess(CollectionInfo websiteInfo) { return websiteInfo.getLicenses() == null || websiteInfo.getLicenses().size() == 0; } + + /** + * Check if specific Collection has Any-Full-Text-Index (possibly will be updated later) + * @param collectionName + * @return + */ + public Long searchAnyFullTextIndex(String collectionName) { + List originalCollections = new ArrayList<>(); + originalCollections.add(collectionName); + //originalCollections = collections != null ? asList(collections) : emptyList(); + SolrSearchResult archivedSites = searchService.searchContent( + FULL_TEXT, + collectionName!=null?originalCollections.get(0):"", + 0, + SortByEnum.NEWEST_TO_OLDEST, + VIEWABLE_ONLY_ON_LIBRARY, + 0, + null, + null, + null, + null, null, + null, + originalCollections, + false); + + return archivedSites.getResponseBody().getNumFound(); + } + } diff --git a/src/main/java/com/marsspiders/ukwa/controllers/SearchController.java b/src/main/java/com/marsspiders/ukwa/controllers/SearchController.java index d019fae3..c15955f6 100644 --- a/src/main/java/com/marsspiders/ukwa/controllers/SearchController.java +++ b/src/main/java/com/marsspiders/ukwa/controllers/SearchController.java @@ -174,7 +174,7 @@ public ModelAndView searchPage(@RequestParam(value = "search_location", required int startRowToSend = startFromRow <= solrSearchResultsLimit ? startFromRow : 1; SolrSearchResult archivedSites = searchService.searchContent(searchBy, text, rowsPerPage, sortBy, accessTo, startRowToSend, originalContentTypes, originalPublicSuffixes, originalDomains, - fromDate, toDate, originalRangeDates, originalCollections); + fromDate, toDate, originalRangeDates, originalCollections, true); searchResultDTOs.addAll(toSearchResults(archivedSites, request, searchBy, userIpFromBl)); @@ -339,4 +339,5 @@ private static String toOriginalDomain(String url) { return domain; } + } diff --git a/src/main/java/com/marsspiders/ukwa/solr/SolrSearchService.java b/src/main/java/com/marsspiders/ukwa/solr/SolrSearchService.java index cb751002..68e63be6 100644 --- a/src/main/java/com/marsspiders/ukwa/solr/SolrSearchService.java +++ b/src/main/java/com/marsspiders/ukwa/solr/SolrSearchService.java @@ -141,33 +141,55 @@ public SolrSearchResult searchContent(SearchByEnum searchLocation, Date fromDatePicked, Date toDatePicked, List rangeDates, - List collections) { + List collections, + boolean preProcessQueryString) { + log.debug("Searching content for '" + queryString + "' by " + searchLocation); - SortClause sort = sortBy == null ? null : (sortBy.getWebRequestOrderValue()=="relevant" ? new SortClause("score", sortBy.getSolrOrderValue()) : new SortClause(FIELD_CRAWL_DATE, sortBy.getSolrOrderValue())); - String dateQuery = generateDateQuery(fromDatePicked, toDatePicked, rangeDates); - String accessToQuery = generateAccessToQuery(accessTo); - String contentTypeQuery = generateMultipleConditionsQuery(contentTypes, FIELD_TYPE); - String collectionsQuery = generateMultipleConditionsQuery(collections, FIELD_COLLECTION); - String publicSuffixesQuery = generateMultipleConditionsQuery(publicSuffixes, FIELD_PUBLIC_SUFFIX); - String domainsQuery = generateMultipleConditionsQuery(originalDomains, FIELD_DOMAIN); - - List filters = new ArrayList<>(); - filters.add(dateQuery); - filters.add(accessToQuery); - filters.add(contentTypeQuery); - filters.add(publicSuffixesQuery); - filters.add(domainsQuery); - filters.add(collectionsQuery); - - String[] facets = { FIELD_PUBLIC_SUFFIX, FIELD_TYPE, FIELD_DOMAIN, - FIELD_COLLECTION, FIELD_ACCESS_TERMS }; - - //Remove: - // - URL prefixes - // - symbols: + - & | ! ( ) { } [ ] ^ " ~ * ? : \ / - Pattern p = Pattern.compile("(http[s]?://www\\.|http[s]?://|www\\.|[&|*()?:!,~{}^/]+)"); - - return sendRequest(p.matcher(queryString).replaceAll(""), sort, filters, FIELD_CONTENT, ContentInfo.class, start, rows, facets); + if (preProcessQueryString){ + SortClause sort = sortBy == null ? null : (sortBy.getWebRequestOrderValue()=="relevant" ? new SortClause("score", sortBy.getSolrOrderValue()) : new SortClause(FIELD_CRAWL_DATE, sortBy.getSolrOrderValue())); + String dateQuery = generateDateQuery(fromDatePicked, toDatePicked, rangeDates); + String accessToQuery = generateAccessToQuery(accessTo); + String contentTypeQuery = generateMultipleConditionsQuery(contentTypes, FIELD_TYPE); + String collectionsQuery = generateMultipleConditionsQuery(collections, FIELD_COLLECTION); + String publicSuffixesQuery = generateMultipleConditionsQuery(publicSuffixes, FIELD_PUBLIC_SUFFIX); + String domainsQuery = generateMultipleConditionsQuery(originalDomains, FIELD_DOMAIN); + + List filters = new ArrayList<>(); + filters.add(dateQuery); + filters.add(accessToQuery); + filters.add(contentTypeQuery); + filters.add(publicSuffixesQuery); + filters.add(domainsQuery); + filters.add(collectionsQuery); + + String[] facets = { FIELD_PUBLIC_SUFFIX, FIELD_TYPE, FIELD_DOMAIN, + FIELD_COLLECTION, FIELD_ACCESS_TERMS }; + + + //Remove: + // - URL prefixes + // - symbols: + - & | ! ( ) { } [ ] ^ " ~ * ? : \ / + Pattern p = Pattern.compile("(http[s]?://www\\.|http[s]?://|www\\.|[&|*()?:!,~{}^/]+)"); + return sendRequest(p.matcher(queryString).replaceAll(""), sort, filters, FIELD_CONTENT, ContentInfo.class, start, rows, facets); + } + else + //return sendRequestEmpty(queryString, sort, filters, FIELD_CONTENT, ContentInfo.class, start, rows, facets); + return sendRequestCheckCollection(ContentInfo.class, queryString); + } + + /** + * Check if there is anything in full-text-index for specific collection + * @param bodyDocsType + * @param collectionName + * @param + * @return + */ + private SolrSearchResult sendRequestCheckCollection(Class bodyDocsType, String collectionName) { + SolrQuery query = new SolrQuery(); + query.setQuery("*:*"); //main query + query.setParam("fq", "collection: " + "\"" + collectionName + "\""); //vs "collections" ? + //query.setParam("fl", "useDocValuesAsStored:true"); + return communicator.sendRequest(bodyDocsType, query); } private SolrSearchResult sendRequest(String queryString, @@ -232,7 +254,6 @@ private SolrSearchResult sendRequest(String queryStr } } } - return communicator.sendRequest(bodyDocsType, query); } } diff --git a/src/main/java/com/marsspiders/ukwa/util/SolrSearchUtil.java b/src/main/java/com/marsspiders/ukwa/util/SolrSearchUtil.java index b4b8d817..89927af4 100644 --- a/src/main/java/com/marsspiders/ukwa/util/SolrSearchUtil.java +++ b/src/main/java/com/marsspiders/ukwa/util/SolrSearchUtil.java @@ -26,17 +26,17 @@ public static String generateDateQuery(Date fromDatePicked, Date toDatePicked, L if(fromDatePicked != null || toDatePicked != null){ return SolrSearchService.FIELD_CRAWL_DATE + ":[" + fromDateText + " TO " + toDateText + "]"; } - String dateQuery = ""; - for (String originalRangeDate : rangeDates) { - dateQuery += dateQuery.length() > 0 ? OR_JOINER : EXCLUDE_MARKER_SECOND_LAYER_TAG; + if (rangeDates != null) + for (String originalRangeDate : rangeDates) { + dateQuery += dateQuery.length() > 0 ? OR_JOINER : EXCLUDE_MARKER_SECOND_LAYER_TAG; - int yearWhenArchived = Integer.parseInt(originalRangeDate); - String fromDate = yearWhenArchived + DATE_PART_AFTER_YEAR; - String toDate = (yearWhenArchived + 1) + DATE_PART_AFTER_YEAR; + int yearWhenArchived = Integer.parseInt(originalRangeDate); + String fromDate = yearWhenArchived + DATE_PART_AFTER_YEAR; + String toDate = (yearWhenArchived + 1) + DATE_PART_AFTER_YEAR; - dateQuery += SolrSearchService.FIELD_CRAWL_DATE + ":[" + fromDate + " TO " + toDate + "]"; - } + dateQuery += SolrSearchService.FIELD_CRAWL_DATE + ":[" + fromDate + " TO " + toDate + "]"; + } return dateQuery; } @@ -45,29 +45,23 @@ public static String generateAccessToQuery(AccessToEnum accessTo) { if(accessTo == null){ accessTo = VIEWABLE_ANYWHERE; } - String[] accessToFilters = accessTo.getSolrRequestAccessRestriction().split(","); - // If we're not filtering by one value, given there's only two possible // values, do no filtering at all: if (accessToFilters.length > 1) { return ""; } - String multipleConditionQuery = toMultipleConditionsQuery( Arrays.asList(accessToFilters), FIELD_ACCESS_TERMS); - return EXCLUDE_MARKER_FIRST_LAYER_TAG + multipleConditionQuery; } public static String generateMultipleConditionsQuery(List conditions, String fieldName) { String multipleConditionQueryWithExclude = ""; - - if(conditions.size() > 0){ + if(conditions != null && conditions.size() > 0){ String multipleConditionsQuery = toMultipleConditionsQuery(conditions, fieldName); multipleConditionQueryWithExclude = multipleConditionsQuery; } - return multipleConditionQueryWithExclude; } @@ -89,11 +83,9 @@ private static String toMultipleConditionsQuery(List values, String fiel } sb.append(fieldName).append(":").append("\"").append(valueToInclude).append("\""); } - if(sb.length() != 0){ sb.append(")"); } - return sb.toString(); } @@ -108,12 +100,10 @@ private static String toMultipleConditionsQueryWithPreCondition(List val } sb.append(fieldName).append(":").append(valueToInclude); } - if(sb.length() != 0){ sb.append(")"); sb.insert(0, AND_JOINER); } - return sb.toString(); } } diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index 5b33f4eb..4fcf94da 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -328,6 +328,8 @@ cookies.main.heading = Cookie Policy cookies.text =

What are cookies?

Cookies are small text files that websites save to your computer. They often include a randomly generated number which is stored on your device. Cookies are commonly used to improve browsing experience, measure website performance and support the delivery of services. Unless you have adjusted your browser settings to refuse cookies, our systems will issue cookies as soon you visit our website.

How do we use cookies?

Our website uses cookies to make the website easier for you to use and improve your overall experience when accessing the UK Web Archive.

The UK Web Archive currently creates 4 cookies:

JSESSIONID - this is created at the start of every session, when you open your browser and navigate to our website. Session cookies enables the website to keep track of your movement from page to page so you don't get asked for the same information you've already given to the site. These cookies allow you to be recognized within the website so any page changes or item or data selection you do is remembered from page to page. Your web browser will normally delete session cookies as it is closed down.

collections_display - this cookie allows our website to rememember how you want the Special collections to be displayed - as thumbnails or as a list. It is created the first time you navigate to Topics and Themes page.

cookies_accepted - this is used to identify if you viewed and accepted the cookie acknowledgement message. It is created once you confirmed you saw the message by clicking the "OK" button. The cookie acknowledgement message is displayed only once for each user.

survey_viewed - this indicates that you viewed a user survey that we have temporarily put onto the website.

Measuring website performance: our website must demonstrate value for money in the delivery of information. Monitoring the use of our website via cookies helps our team to work out which pages are most useful to our users, and to improve pages that they aren't finding useful. We also use cookies in order to monitor visitor numbers. No personal information other than your IP address is collected as part of this process.

To measure website performance we use Google Analytics. This service will create cookies the usage of which is explained here: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage

Where can I find more about cookies and how to turn-off or delete them?

Find out more about cookies at www.aboutcookies.org including information on how to control and delete them in all major web browsers.

You can block cookies by activating the setting on your browser that allows you to refuse all or some cookies. However, if you use your browser settings to block all cookies (including essential cookies) you may not be able to access parts of our sites, or you may experience reduced functionality when accessing certain Services. Unless you have adjusted your browser setting so that it will refuse cookies, our system will issue cookies as soon you visit our website.

For information about deleting cookies from the browser on your mobile phone, refer to your handset manual.

error.404.title = UKWA 404 error - Page not found error.404.back.button = Go back +error.CollNotFound.heading = Error - Collection cannot be found +error.CollNotFound.text = Please check the Collection ID error.404.heading = 404 error - Page cannot be found error.404.text = Please check the URL error.404.note = Please contact us with the details if you are unable to find what you are looking for. diff --git a/src/main/resources/i18n/messages_cy.properties b/src/main/resources/i18n/messages_cy.properties index 1f417c16..b5b40b17 100644 --- a/src/main/resources/i18n/messages_cy.properties +++ b/src/main/resources/i18n/messages_cy.properties @@ -328,6 +328,8 @@ cookies.main.heading = Polisi Cwcis cookies.text =
What are cookies?Cookies are small text files that websites save to your computer. They often include a randomly generated number which is stored on your device. Cookies are commonly used to improve browsing experience, measure website performance and support the delivery of services. Unless you have adjusted your browser settings to refuse cookies, our systems will issue cookies as soon you visit our website.
How do we use cookies?Our website uses cookies to make the website easier for you to use and improve your overall experience when accessing the UK Web Archive.The UK Web Archive currently creates 4 cookies:JSESSIONID - this is created at the start of every session, when you open your browser and navigate to our website. Session cookies enables the website to keep track of your movement from page to page so you don't get asked for the same information you've already given to the site. These cookies allow you to be recognized within the website so any page changes or item or data selection you do is remembered from page to page. Your web browser will normally delete session cookies as it is closed down.collections_display - this cookie allows our website to remember how you want the Special collections to be displayed - as thumbnails or as a list. It is created the first time you navigate to Topics and Themes page.cookies_accepted - this is used to identify if you viewed and accepted the cookie acknowledgement message. It is created once you confirmed you saw the message by clicking the "OK" button. The cookie acknowledgement message is displayed only once for each user.survey_viewed - this indicates that you viewed a user survey that we have temporarily put onto the website.Measuring website performance: our website must demonstrate value for money in the delivery of information. Monitoring the use of our website via cookies helps our team to work out which pages are most useful to our users, and to improve pages that they aren't finding useful. We also use cookies in order to monitor visitor numbers. No personal information other than your IP address is collected as part of this process.To measure website performance we use Google Analytics. This service will create cookies the usage of which is explained here: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage
Where can I find more about cookies and how to turn-off or delete them?Find out more about cookies at www.aboutcookies.org including information on how to control and delete them in all major web browsers.You can block cookies by activating the setting on your browser that allows you to refuse all or some cookies. However, if you use your browser settings to block all cookies (including essential cookies) you may not be able to access parts of our sites, or you may experience reduced functionality when accessing certain Services. Unless you have adjusted your browser setting so that it will refuse cookies, our system will issue cookies as soon you visit our website.For information about deleting cookies from the browser on your mobile phone, refer to your handset manual.
error.404.title = Gwall 404 UKWA - Heb ddod o hyd i'r dudalen error.404.back.button = Yn ôl +error.CollNotFound.heading = Error - Collection cannot be found +error.CollNotFound.text = Please check the Collection ID error.404.heading = Gwall 404 - Heb ddod o hyd i'r dudalen error.404.text = Gwiriwch yr URL error.404.note = Os gwelwch yn dda cysylltwch â ni gyda'r manylion os na ddewch o hyd i'r hyn sydd ei angen arnoch. diff --git a/src/main/resources/i18n/messages_gd.properties b/src/main/resources/i18n/messages_gd.properties index d8908348..e5eadc4e 100644 --- a/src/main/resources/i18n/messages_gd.properties +++ b/src/main/resources/i18n/messages_gd.properties @@ -328,6 +328,8 @@ cookies.main.heading = Poileasaidh Chriomagan cookies.text =

Dè th’ ann an criomagan

’S e a th’ ann an criomagan ach faidhlichean teacsa a bhios làraichean-lìn a’ sàbhaladh air a’ choimpiutair agad. Gu tric, tha àireamh air thuaiream mar phàirt den chriomaig agus thèid seo a stòradh air a’ choimpiutair agad. Tha criomagan air an cleachdadh gu tric gus am brabhsadh a dhèanamh nas fheàrr dhut, gus coileanadh nan làraichean-lìn a mheasadh agus gus taic a chumail ri lìbhrigeadh sheirbheisean. Mur eil thu air na roghainnean sa bhrabhsair agad atharrachadh gus criomagan a dhiùltadh, foillsichidh na siostaman againn criomagan nuair a thadhlas tu air an làraich-lìn againn.

Ciamar a bhios sinn a’ cleachdadh chriomagan?

Bidh an làrach-lìn againn a’ cleachdadh chriomagan gus am bi an làrach-lìn againn nas fhasa a chleachdadh agus gus am bi turas nas fheàrr agad gu Tasglann-lìn na RA.

Bidh tasglann-lìn na RA a’ cruthachadh ceithir criomagan aig an àm seo:

JSESSIONID - thèid seo a chruthachadh aig toiseach gach seisein, nuair a dh’fhosglas tu am brabhsair agad agus nuair a thèid thu dhan làraich-lìn againn. Le criomagan seisein, is urrainn dhan làraich-lìn sùil a chumail air mar a ghluaiseas tu bho dhuilleag gu duilleag, gus nach tèid iarraidh ort fiosrachadh a chur ann a tha thu air toirt dhan làraich mar-thà. Leis na criomagan seo, gabhaidh d’ aithneachadh taobh a-staigh na làraich-lìn agus thèid atharrachadh sam bith air duilleag no dàta no nì sam bith a thaghas tu a chuimhneachadh bho dhuilleag gu duilleag. Mar as trice, thèid na criomagan seisein a sguabadh às leis a’ bhrabhsair-lìn agad nuair a thèid a dhùnadh.

collections_display - leis a’ chriomaig seo, is urrainn dhan làraich-lìn againn cuimhneachadh air mar a tha thu airson’s gun tèid na cruinneachaidhean Sònraichte againn a thaisbeanadh - mar dhealbhagan no mar liosta. Thèid a chruthachadh a’ chiad turas a thèid thu gu duilleag nan Cuspairean is Tèaman

.cookies_accepted - thèid seo a chleachdadh gus sealltainn gum faca agus gun do ghabh thu ris an teachdaireachd mu bhith a’ gabhail ri criomagan. Thèid a chruthachadh an uair is gun daingnich thu gum faca tu an teachdaireachd le bhith a’ briogadh air a’ phutan "OK". Cha tèid an teachdaireachd mu bhith a’ gabhail ri criomagan a shealltainn ach aon turas a-mhàin airson gach cleachdaiche.

survey_viewed - tha seo a’ comharrachadh gum faca tu suirbhidh do chleachdaichean a tha sinn air cur air an làraich-lìn againn rè ùine.

A’ measadh coileanadh na làraich-lìn: feumaidh an làrach-lìn againn dearbhadh gu bheil e a’ lìbhrigeadh luach an airgid ann a bhith a’ lìbhrigeadh fiosrachaidh. Le bhith a’ cumail sùil air cleachdadh na làraich-lìn againn tro chriomagan, tha seo a’ cuideachadh an sgioba againn gus obrachadh a-mach dè na duilleagan as fheumaile do na cleachdaichean againn, agus gus duilleagan nach eil a cheart cho feumail dhaibh a dhèanamh nas fheàrr. Cleachdaidh sinn criomagan cuideachd gus sùil a chumail air àireamh an luchd-tadhail. Cha tèid fiosrachadh pearsanta sam bith ach a-mhàin an seòladh IP agad a chruinneachadh mar phàirt den phròiseas seo.

Gus dèanadas na làraich-lìn a mheasadh, cleachdaidh sinn Google Analytics. Cruthaichidh an t-seirbheis seo criomagan. Thèid an cleachdadh anns na dòighean a tha air am mìneachadh an seo: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage

Càite am faigh mi barrachd fiosrachaidh mu chriomagan is mu bhith gan cur dheth no gan sguabadh às?

Faigh a-mach barrachd mu chriomagan aig www.aboutcookies.org, a’ gabhail a-steach fiosrachadh mu bhith a’ cumail smachd orra is mu bhith gan sguabadh às airson nam brabhsairean-lìn mòra uile.

Faodaidh tu criomagan a bhacadh le bhith a’ cur air an roghainn air a’ choimpiutair agad a tha a’ leigeil leat cuid de na criomagan, no na criomagan uile, a dhiùltadh. Ach mas is e is gun cleachd thu am brabhsair agad gus bacadh a chur air na criomagan air fad (a’ gabhail a-steach criomagan a tha riatanach) dh’fhaodte nach bi cothrom agad air pàirtean de na làraichean againn, no faodaidh nach obraich a h-uile rud nuair a chleachdas sibh cuid de na Seirbheisean. Mur eil thu air am brabhsair agad atharrachadh gus criomagan a dhiùltadh, foillsichidh an siostam againn criomagan nuair a thadhlas tu air an làraich-lìn againn.

Airson fiosrachadh mu bhith a’ sguabadh às chriomagan bhon bhrabhsair air an fhòn-làimhe agad, faic leabhar-làimhe an fhòn-làimhe agad.

error.404.title = UKWA mearachd 404 - cha deach an duilleag a lorg error.404.back.button = Air ais +error.CollNotFound.heading = Error - Collection cannot be found +error.CollNotFound.text = Please check the Collection ID error.404.heading = Mearachd 404 - cha ghabh an duilleag a lorg error.404.text = Dèan cinnteach gu bheil an URL ceart error.404.note = Cuir fios thugainn le fiosrachadh mur a tèid agad air na rudan a tha thu ag iarraidh a lorg. diff --git a/src/main/webapp/WEB-INF/jsp/coll.jsp b/src/main/webapp/WEB-INF/jsp/coll.jsp index 7013367e..f043ee17 100644 --- a/src/main/webapp/WEB-INF/jsp/coll.jsp +++ b/src/main/webapp/WEB-INF/jsp/coll.jsp @@ -18,6 +18,8 @@ ${pageContext.response.locale} + + @@ -74,6 +76,8 @@ ${pageContext.response.locale} + +
@@ -99,6 +103,8 @@ ${pageContext.response.locale}
+
+
<%--Do something if subCollections not empty--%> diff --git a/src/main/webapp/WEB-INF/jsp/errorCollNotFound.jsp b/src/main/webapp/WEB-INF/jsp/errorCollNotFound.jsp new file mode 100644 index 00000000..25d043ba --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/errorCollNotFound.jsp @@ -0,0 +1,52 @@ + + +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> + + + + ${req.requestURL} + + + ${pageContext.response.locale} + + + + + + + + Collection not found. + <%@include file="head.jsp" %> + + + +<%@include file="nav.jsp" %> +
+
+ <%@include file="header.jsp" %> +
+ + + <%@include file="title.jsp" %> + +
+ +
+
+ +
+
 
+
+ +
+
+
+ +
+ +