Skip to content

Commit

Permalink
Merge label/slug column (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jul 31, 2024
1 parent d2451a1 commit a9b736b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions server/config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ disableSearchGUI: false
# How many max entries do you want per page?
search:
resultPerPage: 100
# Show slug column in search result
# Show slug in search result
showSlug: false
# Show the label column in the search result
# Show the label in the search result
showLabel: true
## Configure the GUI
html:
Expand Down
18 changes: 9 additions & 9 deletions server/views/search.pug
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ block content
table.table.is-striped.is-fullwidth
tr
th #{getText('search.result.urlscriptname')}
if nconf.get('search:showLabel') === true
th #{getText('search.result.label')}
if nconf.get('search:showSlug') === true
th #{getText('search.result.slug')}
th
if nconf.get('search:showLabel') === true
#{getText('search.result.label')}
if nconf.get('search:showSlug') === true
#{getText('search.result.slug')}
th #{getText('search.result.rundate')}
th #{getText('search.result.location')}
th #{getText('search.result.type')}
Expand All @@ -135,14 +136,13 @@ block content
a(role='button' onclick=urlOnClick)
span.icon.is-small
img(src='/img/icons/content-copy.svg' alt='Go to URL')
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}')`;
a(role='button' onclick=slugOnClick) #{test.slug}
if nconf.get('search:showLabel') === true
a(role='button' onclick=labelOnClick) #{test.label}
if nconf.get('search:showSlug') === true
a(role='button' onclick=slugOnClick) #{test.slug}
td.run-date #{test.run_date ? dayjs(test.run_date).format(nconf.get('dateformat')): ''}
td
- let locationOnClick = 'addToSearch(\'location:' + test.location + '\')';
Expand Down

0 comments on commit a9b736b

Please sign in to comment.