Hiding some elements, custom css?

Hello, I have been using zammad for some months, liking it a lot.
The search is really powerful.

Before creating this post I tried to find something to hide some buttons in the UI,
I think I need to create a custom css to achieve that, however I tried to inspect the elements I want to hide and didn’t find the ids or classes to hide them.

image

I want to hide the “Mark as public or mark as private button”, our clients won’t use the web interface and this causes some confusion for the agents.

Is there a way to do that?

Thanks in advance!

Hey,

I’m afraid there’s currently no way to get this away.
It’s coming from a generic code base ( https://github.com/zammad/zammad/blob/develop/app/assets/javascripts/app/views/ticket_zoom/article_view_actions.jst.eco ) which doesn’t allow you to hook into.

If you’d want to achieve what you’re trying to do, you’d have to adjust source code which in my opinion always should be your last resort. In fact it’s not update save which may be a reason you don’t want to do that.

Hello!

I was able to do that!

I created the custom.css file at:
/opt/zammad/app/assets/stylesheets/custom

put this content in
a[data-type=“internal”], a[data-type=“public”],{
display: none;
}

ran these commands
$ chown zammad:zammad custom.css
$ zammad run rake assets:precompile
$ systemctl restart zammad-web

Now those buttons are hidden

2 Likes

Is this approach upgrade safe ?

I’ve made exactly the same steps but nothing has changed. Even if i add «!important» to this line. Other custom css settings are working. Maybe you have ideas what I can i do?

no, you should add custom css after each zammad instance upgrade
[UPDATE: I’m not right, see below;)]

Which version are you using? I’m using 3.4.x

Also make sure to Ctrl+F5 to clear cache, maybe your browser still has the old css cached.

This is not true if you follow the procedure GiR posted. The custom.css file survives Zammad updates.

3 Likes

I’m using Zammad 3.4.x (deb package)
And cache is empty, i’m sure:(

Just to make sure,
the file is “custom.css” inside the “custom” folder

Correct:
/opt/zammad/app/assets/stylesheets/custom/custom.css

Wrong:
/opt/zammad/app/assets/stylesheets/custom.css

1 Like

Oh, sorry for panic, now everything works well (there was a little typo in my file). Thank you for attention.

1 Like