<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://greggsmith.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Display_Buttons_for_Group_members_only</id>
		<title>Display Buttons for Group members only - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://greggsmith.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Display_Buttons_for_Group_members_only"/>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Display_Buttons_for_Group_members_only&amp;action=history"/>
		<updated>2026-09-23T08:40:15Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.1</generator>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Display_Buttons_for_Group_members_only&amp;diff=3995&amp;oldid=prev</id>
		<title>Kowy: New page: __NOTOC__ Category:Customizations Category:r11 Category:r12 {{Global Header}} {{Global Announcement}}  == Overview == This article describe in example how to simply show a butt...</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Display_Buttons_for_Group_members_only&amp;diff=3995&amp;oldid=prev"/>
				<updated>2009-12-02T11:03:31Z</updated>
		
		<summary type="html">&lt;p&gt;New page: __NOTOC__ &lt;a href=&quot;/wiki/index.php?title=Category:Customizations&quot; title=&quot;Category:Customizations&quot;&gt;Category:Customizations&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:R11&quot; title=&quot;Category:R11&quot;&gt;Category:r11&lt;/a&gt; &lt;a href=&quot;/wiki/index.php?title=Category:R12&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:R12 (page does not exist)&quot;&gt;Category:r12&lt;/a&gt; {{Global Header}} {{Global Announcement}}  == Overview == This article describe in example how to simply show a butt...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:Customizations]]&lt;br /&gt;
[[Category:r11]]&lt;br /&gt;
[[Category:r12]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
This article describe in example how to simply show a button (or anything else, button code of course can be easily changed) on page only for members of group filled in ticket.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
We need to show button Take, which change status from Assigned to Work in progress and set Assignee to logged in user, but this button must be shown only for members of a group filled in ticket. Here is a solution for Incident object, but for change object is the solution very similar:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PDM_IF &amp;quot;$cst.group_list.length&amp;quot; \&amp;gt; &amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
	// check if logged user is in ticket's group&lt;br /&gt;
	if (false	// to prevent || operator as a first literal in command, add this &amp;quot;non-sense&amp;quot; literal (false) to if condition&lt;br /&gt;
	&amp;lt;PDM_LIST PREFIX=&amp;quot;list&amp;quot; FACTORY=&amp;quot;grpmem&amp;quot; WHERE=&amp;quot;member = U'$cst.id'&amp;quot;&amp;gt;&lt;br /&gt;
		|| '$list.group' == '$args.group'&lt;br /&gt;
	&amp;lt;/PDM_LIST&amp;gt;&lt;br /&gt;
	) {&lt;br /&gt;
		// this is ticket on one of my groups and isn't mine, so draw Take/Control button&lt;br /&gt;
		popupURLtk = '$cgi?SID=$SESSION.SID+FID=' +  fid_generator() + &lt;br /&gt;
			'+FACTORY=cr+PERSID=$args.persistent_id+OP=UPDATE+ACTIVITY_LOG_TYPE=ST+HTMPL=xfer_take_cr.htmpl'; &lt;br /&gt;
		ImgBtnCreate('take', 'Take', &amp;quot;popupActivityWithURL(popupURLtk, 'status')&amp;quot;, true, 120);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/PDM_IF&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kowy</name></author>	</entry>

	</feed>