Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/weko-gridlayout/weko_gridlayout/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
FilesException, UnexpectedFileSizeError
from invenio_files_rest.models import Bucket, Location, ObjectVersion
from invenio_search import RecordsSearch
from invenio_search.utils import build_alias_name
from simplekv.memory.redisstore import RedisStore
from sqlalchemy import asc
from sqlalchemy.orm.exc import MultipleResultsFound
Expand Down Expand Up @@ -783,7 +784,7 @@ def get_elasticsearch_result_by_date(start_date, end_date, query_with_publish_st
records_search = RecordsSearch()
records_search = records_search.with_preference_param().params(
version=False)
records_search._index[0] = current_app.config['SEARCH_UI_SEARCH_INDEX']
records_search._index[0] = build_alias_name(current_app.config['SEARCH_UI_SEARCH_INDEX'])
result = None
try:
search_instance, _qs_kwargs = item_search_factory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ const PageBodyGrid = function () {
}
let innerHTML = '<div class= "rss text-right">' + rssHtml + '</div>'
+ '<div>';
for (let data in result) {
innerHTML += '<div class="no-li-style no-padding-col"><li><a class="a-new-arrivals arrival-scale" href="' + result[data].url + '">' + result[data].name + '</a></li></div>';
for (let data of result) {
innerHTML += '<div class="no-li-style no-padding-col"><li><a class="a-new-arrivals arrival-scale" href="' + data.url + '">' + data.name + '</a></li></div>';
}
innerHTML += '</div>';
$("#" + id).append(innerHTML);
Expand All @@ -340,12 +340,12 @@ const PageBodyGrid = function () {
let mainLayoutTitle = "";
let childNavBar = "";
let navbarHeader = "";
for (let i in endpoints) { // Create links
for (let point of endpoints) { // Create links
let liClass = '';
let communityArgs = (repoID === DEFAULT_REPOSITORY) ? '' : '?community=' + repoID;
let title = endpoints[i].title;
let endpointsURL = endpoints[i].url;
if (endpoints[i].is_main_layout) {
let title = point.title;
let endpointsURL = point.url;
if (point.is_main_layout) {
mainLayoutTitle = title;
} else {
if (window.location.pathname === endpointsURL) {
Expand Down