Cancel
Showing results for 
Search instead for 
Did you mean: 

Stylesheets make visible/non visible

Phenom
Phenom

I want the ability to make the audit logs tab of the summary view visible or not visible.  I want the action to be as easy as possible for end users to do.

 

I could setup a role, put users in this role and control visiblity this way.

Or, I could use a preference.

 

Problem with using a role is users will forget to change back to their default role.

Problem with preference is they arent easy to get to: Edit; Options; Search; type name; edit; enter value; modify & then repeat to run it off!

 

How easy is it to have a button in the interface which I guess would set a preference value?

 

There are reports i could use, but I think the UI is better...

Rich

Richard Bennett
Prospect PLM
15 REPLIES 15

Re: Stylesheets make visible/non visible

Gears Phenom Gears Phenom
Gears Phenom

Good afternoon, what preference do you change? What value on what value?
If I have free time, I will try to help you with this question.

Re: Stylesheets make visible/non visible

Phenom
Phenom
I would just create a custom preference with 1 value. I'm off this afternoon, so won't be looking at it till next week. Thanks for your offer!
Richard Bennett
Prospect PLM

Re: Stylesheets make visible/non visible

Gears Phenom Gears Phenom
Gears Phenom

Oh, I thought that the Preference that allows you to do this already exists and you want so that you can change it not through the menu, but in a different way, for example through a button.
But such a preference does not exist?

Highlighted

Re: Stylesheets make visible/non visible

Gears Phenom Gears Phenom
Gears Phenom

Good afternoon, I looked at the Stylesheet for the Summary tab and realized that this could be any preference.

 

I made this button for you. I made a plugin for Teamcenter 11.2.3, but I think that there should be no problems when using the plugin on versions above.

 

Create a preference Visibility_AuditLogs_Tab, set type = integer, Location = Site, Protection Scope = User. Set the value to 1 or 0.

 

In Stylesheet I think you know what to do. Set the condition visibleWhen depending on the value
preference Visibility_AuditLogs_Tab:

 

<page titleKey="tc_xrt_AuditLogs" visibleWhen="{pref:Visibility_AuditLogs_Tab}==1">

 

Install plugin:

 

1) Copy JAR into the TC_ROOT\portal\plugins directory.

2) Run the TC_ROOT\portal\registry\genregxml file to register the plug-in with the rich client.

 

The button will be available in the My Teamcenter perspective:

Visibility AuditLogs Tab.png

 

If you want to change the icon of the button, then write about it, I will tell you how to do it.

 

Enjoy it! :-)

Re: Stylesheets make visible/non visible

Phenom
Phenom
You are an absolute star thank you very much!

Hopefully it will work on 11.2.2.1...

I really appreciate this.
Rich
Richard Bennett
Prospect PLM

Re: Stylesheets make visible/non visible

Gears Phenom Gears Phenom
Gears Phenom

Hi Richard, thank you for appreciating this.

 

I think this should work without problems for Teamcenter 11.2.x

 

Regards, Arthur.

Re: Stylesheets make visible/non visible

Phenom
Phenom

Brilliant, works just as I wanted!

You did mention it was possible to change the icon.  Would you be able to advise me how if its not too much trouble.. I appreciate the fact you have already helped me a lot already :-)

Rich

Richard Bennett
Prospect PLM

Re: Stylesheets make visible/non visible

Gears Phenom Gears Phenom
Gears Phenom

Good afternoon, good to hear that this works as you expected.

 

Yes, it is easy. Open the plugin in any archiver, for example 7z, and without unarchiving it, replace the icons\sample.gif icon with your icon, as far as I know, it should be 16x16 in size, and save the changes to the archive.

 

You can also rename com.mycom.addbutton_1.0.0.201907061932.jar to com.mycom.addbutton.jar
But do not forget to delete com.mycom.addbutton_1.0.0.201907061932.jar from the TC_ROOT\portal\plugins directory, so that you do not have two identical plugins with different names.

 

And just in case, run again TC_ROOT\portal\registry\genregxml file to register the plug-in with the rich client.

 

Regards, Arthur

Re: Stylesheets make visible/non visible

Phenom
Phenom

Works perfectly.

 

I found that having the Audit Logs tab displayed was affecting performance dramatically.  I knew this was an issue in earlier versions of TC, but I thought it had been fixed.  So, with @ArthurRMs help, I now have a button that users can click to turn on/off the visibility of this tab.

 

Many thanks @ArthurRM again!

Richard Bennett
Prospect PLM