diff --git a/server/config/default.yaml b/server/config/default.yaml index 9610b39..0662837 100644 --- a/server/config/default.yaml +++ b/server/config/default.yaml @@ -43,7 +43,8 @@ search: resultPerPage: 100 # Show slug column in search result showSlug: false - + # Show the label column in the search result + showLabel: true ## Configure the GUI html: css: diff --git a/server/views/search.pug b/server/views/search.pug index b3587ac..0d5e7e2 100644 --- a/server/views/search.pug +++ b/server/views/search.pug @@ -112,7 +112,8 @@ block content table.table.is-striped.is-fullwidth tr th #{getText('search.result.urlscriptname')} - th #{getText('search.result.label')} + if nconf.get('search:showLabel') === true + th #{getText('search.result.label')} if nconf.get('search:showSlug') === true th #{getText('search.result.slug')} th #{getText('search.result.rundate')} @@ -134,9 +135,10 @@ block content a(role='button' onclick=urlOnClick) span.icon.is-small img(src='/img/icons/content-copy.svg' alt='Go to URL') - td - - let labelOnClick = `addToSearch('label:${test.label}')`; - a(role='button' onclick=labelOnClick) #{test.label} + if nconf.get('search:showLabel') === true + 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}')`;