Customize search result view

Hello,

is it possible to customize the search result view?

I would like to remove certain information from the view as it has no added value for us.

For Example, we do not need the categorie ChatSession. Or in the table view we do not need the groups, but the issue state would be interessting.

Maybe I can customize this over the console?

Thank you for your answer and have a nice day

Anne

There is currently no customisation via the console for this (as far as I know), but as a work around for the table view you could edit the /opt/zammad/app/assets/javascripts/app/controllers/search.coffee file and edit the available columns here:

Must I restart the service after the editing?

You could probably also hide the unwanted columns via css since they have their own classes:

To hide the chat sessions you could use this:
.detail-search-header .tab.js-tabChatSession { display: none; }*
The spacing is important: https://www.w3schools.com/cssref/css_selectors.asp

At least that way should™ be update-proof. It only visually hides the tab though. @Stubenhocker’s approach is a lot cleaner since only the relevant data is being pulled.

As always:
I’m not a web dev or anything at all and i didn’t try that first. This should hide ALL elements that are classified as tab and js-tabChatSession which are also a descendant of a detail-search-header object. So if anything else uses this combination, that’s probably gone too.

There’s most likely a better way to achieve this but i don’t know it :>.

cheers

*updated thanks to Martin-Bonn’s hint

1 Like

You need to compile the changes first using zammad run rake assets:precompile --trace, then restart the zammad-web service.

The CSS selector is not quite right. Searchfield and the tabs are siblings.

I use this:

.detail-search-header .tab[data-tab-content="ChatSession"]
2 Likes

You’re right, thanks for the hint!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.