:: Rules Slave Select
 
<<nobr>>
<<set $nextButton to "Continue">>
<<set $nextLink to "Rules Assistant">>

<<if ndef $currentRule.selectedSlaves>>
	<<set $currentRule.selectedSlaves to []>>
<</if ndef>>

<<if ((ndef $currentRule.selectedSlaves) || ($currentRule.selectedSlaves.length < 1)) && ((ndef $currentRule.excludedSlaves) || ($currentRule.excludedSlaves.length < 1))>>
	Rule $r currently applied to all slaves.
	<br><br>
	<<set $Flag to 0>>
	Apply rule $r to selected slaves:
	<<include "Slave Summary">>
<<elseif ($currentRule.selectedSlaves.length < 1) && ($currentRule.excludedSlaves.length > 0)>>
	Rule $r currently applied to all slaves except excluded slaves.
	<br><br>
	<<set $Flag to 0>>
	Apply rule $r to selected slaves:
	<<include "Slave Summary">>
<<else>>
	Rule $r currently applied to: 
	<<set $Flag to 1>>
	<<include "Slave Summary">>
	<br><br>
	Apply rule $r to selected slaves: 
	<<set $Flag to 0>>
	<<include "Slave Summary">>

	<br>[[Apply to all slaves|Rules Slave Select][$currentRule.selectedSlaves to []]]
<</if>>
<</nobr>>
