Adding a hyperlink to schedule_show UI macro

EthanVanDoorne
Giga Contributor

I have a business need to add a simple hyperlink to the bottom of the calendar view for On-Call Scheduling, to make it appear as a Form Link would. My jelly ninja is flimsy at best.

 

Is this as easy as it seems like it should be?

1 ACCEPTED SOLUTION

This isn't that straight forward,



There is a UI Macro called show_schedule but this is just the 'decoration' that adds an icon to the form next to the field. When you click the icon it opens show_schedule.do which is a page defined in a .xml file on the file system.



To override this page you would have to obtain a copy of its XML, modify it and then save it as a new UI Page with the same name to override.



This would also be pretty bad practice.



Instead you should create a new Schedule Page that allows you to define customer JavaScript, Jelly and Sever-side script. There are many OOTB example of this and the Wiki has good info on it. Once you have your schedule page you should then define a NEW macro/decoration that opens your new page


View solution in original post

5 REPLIES 5

EthanVanDoorne
Giga Contributor

The macro is called schedule_show


Anurag Tripathi
Mega Patron
Mega Patron

Hi Ethan,



It should not be difficult.


just add this at the right place


<a href='URL' target='_blank'>LINK NAME</a>



If you want a more modular approach:-


a ui macro can be called inside another ui macro, (i quickly ran a small test).



I created 2 ui macros, both having a hyperlink each and using a formatter I pulled one of them on a form. So far everything is usual.


Then i invoked another ui macro inside the first macro..


<g:macro_invoke macro="<your hyperlink macro name>" />


-Anurag

Perhaps I'm trying to modify the wrong macro. I still can't get it to show up on below the calendar.


This isn't that straight forward,



There is a UI Macro called show_schedule but this is just the 'decoration' that adds an icon to the form next to the field. When you click the icon it opens show_schedule.do which is a page defined in a .xml file on the file system.



To override this page you would have to obtain a copy of its XML, modify it and then save it as a new UI Page with the same name to override.



This would also be pretty bad practice.



Instead you should create a new Schedule Page that allows you to define customer JavaScript, Jelly and Sever-side script. There are many OOTB example of this and the Wiki has good info on it. Once you have your schedule page you should then define a NEW macro/decoration that opens your new page