Hi radu,
I have developed this button through framework "
https://blog.oxygenxml.com/topics/custo ... etion.html".
Here is the attachment:
query1.png
(Here the tags enclosed in green box is the 1st generation and blue box is 2nd generation).
The Generate button is the button that i have generated.
The button that I have generated when clicked it generates the tags like change-item, change-completed and change-summary tags and when clicked again it displays the same, but my requirement is that it should keep the latest update generation on top. (Taking above image as reference it should have blue box with tags on top and green box with tags below it).
And coming onto the actions part, here is the attachment:
Action.png
(In the activation part I have updated the activation path code specified by you
Code: Select all
ancestor-or-self::topic[prolog[changehistory]]
).
And regarding the operation 1 I have kept the fargment as :
Code: Select all
<prolog><change-historylist><change-item><change-person>${system(user.name)}</change-person><change-completed>${date(yyyy-MM-dd h:mm)}</change-completed><change-summary ></change-summary></change-item></change-historylist></prolog>
(Which is the standard XML Format specified by client).
Insertocation:
Code: Select all
ancestor-or-self::*[contains(@class, ' topic/prolog ')]
(This basically checks for hierarchy of template and if found then inserts the tags in it).
Insert Position as: Insert as first child.
For operation 2, here is the attachment:
Action2.png
(this basically includes the tags from change-item).
Here is the code:
Code: Select all
<change-item><change-person>${system(user.name)}</change-person><change-completed>${date(yyyy-MM-dd h:mm)}</change-completed><change-summary ></change-summary></change-item>
.
Insert position as: After
Thanks & regards,
Aditya