How to remove Change Request Tab on page

Hi!

I am using the change request application in XWiki and I would like to ask how to remove the Change Requests tab at the bottom of the page. Disabling/Hiding the annotations, history, attachments and information tabs are easy but I do not know how to hide the change requests tab. I also checked the Other → Change Request but there’s no option there to hide it.

image

Thanks!

Hi,

you can use the following velocity variable to hide it in a specific page / set of page if you’re using a sheet:
#set ($showChangeRequestTab = false), it controls whether the tab should be displayed or not.

Also if I’m correct the tab shouldn’t be displayed if change request is disabled on the current page: you can disable it by using the rights. If you forbid users the Change request right the tab should also be hidden. If it’s not the case then I invite you to open a ticket on Loading...

Hi, thanks for your reply!

Can you elaborate more on the velocity variable you mentioned? I am not very familiar with it.

Regarding the rights, I disabled the application from unregistered users in the Change Request Application (page and extension rights) and did the same to a page for testing but the tab is still present, it just does not provide a list of change requests anymore.

ok so that’s a bug, I wasn’t sure when looking at the code.

Basically if you have a page with a sheet that contains something like:

{{velocity}}
#set ($showChangeRequestTab = false)
{{/velocity}}

The tab won’t be displayed but I can imagine it’s not very handy. Can you tell me how you disabled it for other tabs?

For the other tabs, I just set No to the following in Administration → Look & Feel → Presentation:

  • Show Page Annotation
  • Show Page Comments
  • Show Page Attachments
  • Show Page History
  • Show Page Information

I was hoping if it could be set like this in Other → Change Request but there’s no field/option like that there.

I will research more on this sheet thing because tbh I am not touching any scripting in XWiki yet.

Thank you!

Ok thanks I wasn’t sure where the option was located. I think we need some improvments to be able to have same abilities for new tabs introduced by UIX. I’ll make a proposal in that direction.

As a first solution it would be good too to have it. I created Loading... for it.

Actually I’m wrong on this: you could have the right set for a group of users to allow them to create a change request, and then another group wouldn’t have right to create those, but they’d be allowed to see the CR created. In which case the tab should still be visible for them. So the tab should not be tied to that right. I won’t create a ticket for that.

Hi, but the thing is I can still see the change request tab even as an unregistered user (I opened the sub-wiki in incognito without logging in), which is what I want to hide. I restricted the rights for unregistered users (both local rights and extension rights) but still it is visible.

Yes so right now this is expected as the tab is not controlled by any right whatsoever. And as I said above, for now I’m not planning to change it as other users of the extension might want to have this tab shown for users who are not allowed to edit with change requests.
That being said I will provide the option for entirely hiding the tab from the administration.

Now do you have a specific reason for wanting to hide it for unregistered users specifically?

Got it thanks! This is because we want a public sub-wiki for our audience and we don’t really want them to see anything else on the page other than the content of the pages. :slight_smile:

1 Like

To remove the Change Requests tab at the bottom of the page in XWiki, you can add the following CSS code to your XWiki skin or custom stylesheet:

cssCopy code

#tabchangerequest {
    display: none !important;
}

This will hide the Change Requests tab. Make sure to adjust the CSS code according to your specific XWiki setup.