diff --git a/server/config/default.yaml b/server/config/default.yaml index d5d1fbc..9610b39 100644 --- a/server/config/default.yaml +++ b/server/config/default.yaml @@ -41,6 +41,8 @@ disableSearchGUI: false # How many max entries do you want per page? search: resultPerPage: 100 + # Show slug column in search result + showSlug: false ## Configure the GUI html: diff --git a/server/locales/en.json b/server/locales/en.json index 998cd14..18218a5 100644 --- a/server/locales/en.json +++ b/server/locales/en.json @@ -74,6 +74,7 @@ "search.result.compare": "Compare", "search.result.nomatch": "No tests found matching the search criteria.", "search.result.showing": "Showing %s - %s of %s", + "search.result.slug": "Slug", "search.result.of": "of", "search.pagetitle": "Search for tests", "search.pagedescription": "Here you can search for finished tests.", diff --git a/server/views/search.pug b/server/views/search.pug index e74b6a3..63f01cd 100644 --- a/server/views/search.pug +++ b/server/views/search.pug @@ -113,6 +113,8 @@ block content tr th #{getText('search.result.urlscriptname')} th #{getText('search.result.label')} + if nconf.get('search:showSlug') === true + th #{getText('search.result.slug')} th #{getText('search.result.rundate')} th #{getText('search.result.location')} th #{getText('search.result.type')} @@ -135,6 +137,10 @@ block content td - let labelOnClick = `addToSearch('label:${test.label}')`; a(role='button' onclick=labelOnClick) #{test.label} + if nconf.get('search:showSlug') === true + td + - let slugOnClick = `addToSearch('slug:${test.slug}')`; + a(role='button' onclick=slugOnClick) #{test.slug} td #{test.run_date ? dayjs(test.run_date).format(nconf.get('dateformat')): ''} td - let locationOnClick = 'addToSearch(\'location:' + test.location + '\')';