workgroup.naml

<override_macro name="view_app_canonical_url" requires="http_request">
	<n.get_node_from_parameter.url
		template="[n.get_parameter name='macro'/]"
		priority="[n.get_parameter name='priority'/]"
		assignee="[n.get_parameter name='assignee'/]"
		index_record="[n.get_parameter name='index_record'/]"
		date="[n.get_parameter name='date'/]"
	/>
</override_macro>

<override_macro name="url" parameters="template,priority,assignee,index_record,date" requires="node">
	<n.remove_spaces.>
		<n.base_url/>
		<n.path
			template="[n.template/]"
			priority="[n.priority/]"
			assignee="[n.assignee/]"
			index_record="[n.index_record/]"
			date="[n.date/]"
		/>
	</n.remove_spaces.>
</override_macro>

<override_macro name="app_url" parameters="template,priority,assignee,index_record,date" requires="node">
	<n.base_url/><n.app_path
		template="[n.template/]"
		priority="[n.priority/]"
		assignee="[n.assignee/]"
		index_record="[n.index_record/]"
		date="[n.date/]"
	/>
</override_macro>

<override_macro name="path" parameters="template,priority,assignee,index_record,date" requires="node">
	<n.if.is_app>
		<then>
			<n.app_path
				template="[n.template/]"
				priority="[n.priority/]"
				assignee="[n.assignee/]"
				index_record="[n.index_record/]"
				date="[n.date/]"
			/>
		</then>
		<else>
			<n.post_path />
		</else>
	</n.if.is_app>
</override_macro>

<override_macro name="app_paged_url" requires="paging_page,node_page,servlet">
	<n.page_node.url
		template="[n.app_template/]"
		priority="[n.app_priority/]"
		assignee="[n.app_assignee/]"
		date="[n.app_date/]"
		index_record="[n.page_row/]"
	/>
</override_macro>

<override_macro name="app_path" parameters="template,priority,assignee,index_record,date" requires="node">
	<n.encode_url.remove_spaces.>
		<n.set_var. name="index_record">
			<n.to_null_if. equals="0">
				<n.index_record/>
			</n.to_null_if.>
		</n.set_var.>
		<n.set_var. name="template">
			<n.to_null_if. equals="[n.app_default_template/]">
				<n.template/>
			</n.to_null_if.>
		</n.set_var.>
		<n.if.not.is_null.var name="template">
			<then>
				<n.if.not.starts_with prefix="view_" text="[n.var name='template'/]">
					<then>
						<n.throw_runtime_exception.>
							template = <n.var name='template'/>
						</n.throw_runtime_exception.>
					</then>
				</n.if.not.starts_with>
				<n.set_var. name="template">
					<n.substring text="[n.var name='template'/]" begin="5" />
				</n.set_var.>
			</then>
		</n.if.not.is_null.var>
		/
		<n.if>
			<condition>
				<n.not.all_true.>
					<n.is_root/>
					<n.is_null.var name='template'/>
					<n.is_null.date/>
					<n.is_null.priority/>
					<n.is_null.assignee/>
					<n.is_null.var name='index_record'/>
				</n.not.all_true.>
			</condition>
			<then>
				<n.url_encoded_subject/>
				-f<n.id/>
				<n.hide_null.prepend. prefix="p"><n.priority/></n.hide_null.prepend.>
				<n.hide_null.prepend. prefix="a"><n.assignee/></n.hide_null.prepend.>
				<n.hide_null.prepend. prefix="i"><n.var name="index_record"/></n.hide_null.prepend.>
				<n.hide_null.prepend. prefix="d"><n.date/></n.hide_null.prepend.>
				<n.hide_null.prepend. prefix="."><n.var name="template"/></n.hide_null.prepend.>
				.html
			</then>
		</n.if>
	</n.encode_url.remove_spaces.>
</override_macro>

<override_macro name="app_path_by_date" parameters="date" requires="node">
	<n.app_path
		template="[n.app_template/]"
		index_record="[n.app_index_record/]"
		priority="[n.app_priority/]"
		assignee="[n.app_assignee/]"
		date="[n.date/]"
	/>
</override_macro>

<macro name="app_priority" requires="servlet">
	<n.get_parameter name="priority"/>
</macro>

<macro name="app_assignee" requires="servlet">
	<n.get_parameter name="assignee"/>
</macro>

<override_macro name="app_title_ending" requires="node">
	<n.overridden/>
	<n.if.not.is_null.app_priority>
		<then>| <t>Filter: priority <t.priority.app_priority/></t></then>
	</n.if.not.is_null.app_priority>
	<n.if.not.is_null.app_assignee>
		<then>| <t>Filter: assignee <t.author.app_assignee/></t></then>
	</n.if.not.is_null.app_assignee>
</override_macro>

<override_macro name="compile_all">
	<n.overridden />
	<n.compile macro="can_be_assigned_to" namespaces="[n.standard_classes/],[n.user_namespace_class/]" />
</override_macro>

<override_macro name="save_post" requires="node_editor,servlet">
	<n.overridden />
	<n.save_assignment />
</override_macro>

<override_macro name="edit_post_form">
	<n.overridden />
	<n.page_node.assignment_controls/>
</override_macro>

<override_macro name="reply_form">
	<n.overridden />
	<n.page_node.>
		<n.assignment_controls>
			<guessed_assignee>
				<n.if>
					<condition.both>
						<condition1.not.page_node.is_app/>
						<condition2.visitor.equals.page_node.topic_node.assignee/>
					</condition.both>
					<then.page_node.owner.id/>
					<else.null/>
				</n.if>
			</guessed_assignee>
		</n.assignment_controls>
	</n.page_node.>
</override_macro>

<override_macro name="instant_emails" requires="instant_mail,node_page">
	<n.if.page_node.has_topic_node>
		<then.if.page_node.topic_node.is_assigned>
			<then>
				<n.remove_from_instant_mail.page_node.topic_assignee/>
				<n.if.page_node.topic_assignee.should_get_instant_mail>
					<then.send_assign_email/>
				</n.if.page_node.topic_assignee.should_get_instant_mail>
			</then>
		</then.if.page_node.topic_node.is_assigned>
	</n.if.page_node.has_topic_node>
	<n.overridden />
</override_macro>

<override_macro name="all_permissions_list">
	<n.overridden />
	<n.assignment_permission/>,
</override_macro>

<override_macro name="permission_rows">
	<n.overridden />
	<n.permission_row
		permission = "[n.assignment_permission/]"
		description="[t]Who can be assigned topics (in workgroups only)[/t]"
		anyone_cell = ""
		authors_cell = ""
	/>
</override_macro>

<override_macro name="children_list" parameters="start,length,filter,sort" dot_parameter="do" requires="node">
	<n.if.equal value1="[n.sort/]" value2="priority">
		<then.children_list_by_priority start="[n.start/]" length="[n.length/]" filter="[n.filter/]" do="[n.do/]" />
		<else.overridden start="[n.start/]" length="[n.length/]" filter="[n.filter/]" sort="[n.sort/]" do="[n.do/]" />
	</n.if.equal>
</override_macro>

<override_macro name="topics_list" parameters="start,length,filter,sort" dot_parameter="do" requires="node">
	<n.if.equal value1="[n.sort/]" value2="priority">
		<then.topics_list_by_priority start="[n.start/]" length="[n.length/]" filter="[n.filter/]" do="[n.do/]" />
		<else.overridden start="[n.start/]" length="[n.length/]" filter="[n.filter/]" sort="[n.sort/]" do="[n.do/]" />
	</n.if.equal>
</override_macro>

<override_macro name="calc_app_topic_filter" requires="node_page,servlet">
	<n.if.app_is_by_priority>
		<then>
			<n.compress.>
				<n.separate>
					<text1>
						<n.page_node.assignment_filter assignee="[n.app_assignee/]" priority="[n.app_priority/]" />
					</text1>
					<separator>
						and
					</separator>
					<text2>
						<n.hide_null.overridden />
					</text2>
				</n.separate>
			</n.compress.>
		</then>
		<else.overridden />
	</n.if.app_is_by_priority>
</override_macro>


<override_macro name="call_view_mixed">
	<n.if.get_node_from_parameter.is_workgroup>
		<then.view_mixed_workgroup />
		<else.overridden />
	</n.if.get_node_from_parameter.is_workgroup>
</override_macro>

<subroutine name="view_mixed_workgroup" requires="basic,nabble,servlet">
	<n.apply_workgroup_app_namespace.view_mixed_page />
</subroutine>

<macro name="mixed_table_columns" requires="workgroup_app_namespace">
	<n.pin_column/>
	<n.mixed_topics_column/>
	<n.replies_column/>
	<n.last_post_column white_space="nowrap"/>
	<n.priority_column clickable="false"/>
	<n.assignee_column clickable="false"/>
</macro>

<macro name="mixed_table_columns" requires="workgroup_narrow_app_namespace">
	<n.pin_column/>
	<n.mixed_topics_column/>
	<n.replies_column/>
	<n.last_post_column white_space="nowrap"/>
	<n.priority_column clickable="false"/>
	<n.assignee_column clickable="false"/>
</macro>


<override_macro name="call_view_standard">
	<n.if.get_node_from_parameter.is_workgroup>
		<then.view_standard_workgroup />
		<else.overridden />
	</n.if.get_node_from_parameter.is_workgroup>
</override_macro>

<subroutine name="view_standard_workgroup" requires="basic,nabble,servlet">
	<n.apply_workgroup_app_namespace.view_standard_page />
</subroutine>

<macro name="standard_table_columns" requires="workgroup_app_namespace">
	<n.pin_column/>
	<n.topics_column title="[n.standard_topics_column_title/]" count="[n.page_node.child_count/]"/>
	<n.replies_column/>
	<n.last_post_column white_space="nowrap"/>
	<n.priority_column/>
	<n.assignee_column/>
</macro>

<macro name="standard_table_columns" requires="workgroup_narrow_app_namespace">
	<n.pin_column/>
	<n.topics_summary_column title="[n.standard_topics_column_title/]" count="[n.page_node.child_count/]" width="50%"/>
	<n.last_post_column white_space="nowrap" width="50%"/>
	<n.priority_column/>
	<n.assignee_column/>
</macro>


<override_subroutine name="view_topics" requires="basic,nabble,servlet">
	<n.if.get_node_from_parameter.is_workgroup>
		<then.view_topics_workgroup />
		<else.overridden />
	</n.if.get_node_from_parameter.is_workgroup>
</override_subroutine>

<subroutine name="view_topics_workgroup" requires="basic,nabble,servlet">
	<n.apply_workgroup_app_namespace.view_topics_page />
</subroutine>

<macro name="topics_table_columns" requires="workgroup_app_namespace">
	<n.pin_column/>
	<n.topics_column count="[n.app_topic_count/]"/>
	<n.replies_column/>
	<n.last_post_column white_space="nowrap"/>
	<n.priority_column/>
	<n.assignee_column/>
	<n.subapp_column/>
</macro>

<macro name="topics_table_columns" requires="workgroup_narrow_app_namespace">
	<n.pin_column/>
	<n.topics_summary_column count="[n.app_topic_count/]" width="40%"/>
	<n.last_post_column white_space="nowrap" width="40%"/>
	<n.priority_column/>
	<n.assignee_column/>
</macro>

<override_macro name="topics_table_sort">
	<n.if.app_is_by_priority>
		<then>priority</then>
		<else.overridden />
	</n.if.app_is_by_priority>
</override_macro>




<macro name="app_is_by_priority" requires="node_page,servlet">
	<n.cache. var="app_is_by_priority">
		<n.either>
			<condition1>
				<n.not.is_null.app_priority/>
			</condition1>
			<condition2>
				<n.both>
					<condition1>
						<n.not.is_null.app_assignee/>
					</condition1>
					<condition2>
						<n.if.not.equal value1="[n.app_assignee/]" value2="0" >
							<then>
								<n.check_user.app_assignee/>
								<n.true/>
							</then>
							<else>
								<n.false/>
							</else>
						</n.if.not.equal>
					</condition2>
				</n.both>
			</condition2>
		</n.either>
	</n.cache.>
</macro>

<override_macro name="topic_controls_left" requires="forum_topic_namespace">
	<n.overridden/>
	<n.workgroup_assignment_status />
</override_macro>

<macro name="workgroup_assignment_status">
	<n.if.both condition1="[n.page_node.app_or_root.is_workgroup/]" condition2="[n.page_node.is_assigned/]">
		<then>
			<div class="weak-color light-bg-color rounded" style="padding:.5em;margin:.5em 0">
				Assigned to <n.page_node.assignee.user_link/> at priority
				<div class="priority-[n.page_node.priority/] priority">&nbsp;<n.page_node.priority/>&nbsp;</div> (<n.page_node.priority_name/>)
			</div>
		</then>
	</n.if.both>
</macro>

<override_macro name="save_post_by_email" requires="post_by_email" unindent="true">
	<n.overridden />
	<n.if.posted_node.topic_or_app.is_assigned>
		<then.if.posted_node.topic_node.assignee.equals.posted_node.owner>
			<then.if.replied_to_node.owner.can_be_assigned_to.posted_node.topic_node>
				<then.posted_node.topic_node.assign assignee="[n.replied_to_node.owner/]" priority="[n.posted_node.topic_node.priority/]" />
			</then.if.replied_to_node.owner.can_be_assigned_to.posted_node.topic_node>
		</then.if.posted_node.topic_node.assignee.equals.posted_node.owner>
	</n.if.posted_node.topic_or_app.is_assigned>
</override_macro>


// from permissions

<macro name="assignment_permission">
	Assignment
</macro>

<macro name="can_be_assigned_to" requires="user" dot_parameter="node_attr">
	<n.set_local_user.this_user />
	<n.set_local_node.node_attr/>
	<n.both>
		<condition1.not.local_user.is_anonymous/>
		<condition2.local_user.has_permission node="[n.local_node/]" permission_node="[n.local_node.app_or_root/]" permission="[n.assignment_permission/]" />
	</n.both>
</macro>

<macro name="assignee_list" requires="node" dot_parameter="do">
	<n.app_or_root.users_with_permission. permission="[n.assignment_permission/]">
		<n.sort_by_name/>
		<n.do/>
	</n.app_or_root.users_with_permission.>
</macro>

<macro name="is_workgroup" requires="node">
	<n.has_groups_with_permission.assignment_permission/>
</macro>


<macro name="priority_column" parameters="clickable">
	<n.table_column>
		<head>
			<td class="medium-border-color priority-column nowrap">
				<n.if.equal value1="[n.default. to='true'][n.clickable/][/n.default.]" value2="true">
					<then><n.priority_dropdown/></then>
					<else><t>Priority</t></else>
				</n.if.equal>
			</td>
		</head>
		<body>
			<td class="medium-border-color" align="center"><n.current_node.show_priority/></td>
		</body>
	</n.table_column>
</macro>

<macro name="assignee_column" parameters="width,title,clickable">
	<n.table_column>
		<head>
			<td class="medium-border-color assignee-column nowrap" style="[n.width_style.width/]">
				<n.if.equal value1="[n.default. to='true'][n.clickable/][/n.default.]" value2="true">
					<then><n.assignee_dropdown/></then>
					<else><t>Assignee</t></else>
				</n.if.equal>
			</td>
		</head>
		<body>
			<td class="medium-border-color nowrap"><n.current_node.show_assignee/></td>
		</body>
	</n.table_column>
</macro>

<macro name="priority_dropdown">
	<n.if.not.is_null.app_priority>
		<then><img src="/images/check.png" width="11" height="11"/></then>
	</n.if.not.is_null.app_priority>
	<n.dropdown. id="prioritydropdown" text="[t]Priority[/t]" title="[t]Click to filter[/t]">
		<n.no_priority_filter_option/>
		<n.menu_separator/>
		<n.priority_option priority="1" label="[t]Highest[/t]"/>
		<n.priority_option priority="2" label="[t]High[/t]"/>
		<n.priority_option priority="3" label="[t]Normal[/t]"/>
		<n.priority_option priority="4" label="[t]Low[/t]"/>
		<n.priority_option priority="5" label="[t]Lowest[/t]"/>
	</n.dropdown.>
</macro>

<macro name="assignee_dropdown">
	<n.if.not.is_null.app_assignee>
		<then><img src="/images/check.png" width="11" height="11"/></then>
	</n.if.not.is_null.app_assignee>
	<n.dropdown. id="assigneedropdown" text="[t]Assignee[/t]" title="[t]Click to filter[/t]">
		<n.no_assignee_filter_option/>
		<n.menu_separator/>
		<n.page_node.assignee_list.loop.>
			<n.assignee_option assignee="[n.current_user.id/]" label="[n.current_user.name/]"/>
		</n.page_node.assignee_list.loop.>
	</n.dropdown.>
</macro>

<macro name="priority_option" parameters="priority,label">
	<n.set_var. name="p-url"><n.app_url_by_priority priority="[n.priority/]"/></n.set_var.>
	<n.set_var. name="style">
		<n.compress.>
			padding-left:14px;
			padding-right:11px;
			<n.if.equal value1="[n.priority/]" value2="[n.app_priority/]">
				<then>
					font-weight:bold;
					background-image:url(/images/check.png);
					background-repeat:no-repeat;
					background-position:left center;
				</then>
				<else>font-weight:normal</else>
			</n.if.equal>
		</n.compress.>
	</n.set_var.>
	var text = '<a href="[n.var name='p-url'/]" style="[n.hide_null.var name='style'/]"><div class="priority-[n.priority/] priority">&nbsp;<n.priority/>&nbsp;</div> <n.javascript_string_encode.label/></a>';
	dropdown.add('priority-<n.priority/>', text);
</macro>

<macro name="assignee_option" parameters="assignee,label">
	<n.set_var. name="a-url"><n.app_url_by_assignee assignee="[n.assignee/]"/></n.set_var.>
	<n.set_var. name="style">
		<n.compress.>
			padding-left:14px;
			padding-right:11px;
			<n.if.equal value1="[n.assignee/]" value2="[n.app_assignee/]">
				<then>
					background-image:url(/images/check.png);
					background-repeat:no-repeat;
					background-position:left center;
				</then>
				<else>font-weight:normal</else>
			</n.if.equal>
		</n.compress.>
	</n.set_var.>
	var text = '<a href="[n.var name='a-url'/]" style="[n.hide_null.var name='style'/]"><n.javascript_string_encode.label/></a>';
	dropdown.add('assignee-<n.assignee/>', text);
</macro>

<macro name="no_priority_filter_option">
	<n.set_var. name="p-url"><n.app_url_by_priority/></n.set_var.>
	var text = '<a href="[n.var name='p-url'/]" style="padding:.3em 14px;font-weight:normal"><t>No Filter</t></a>';
	dropdown.add('no-priority-filter', text);
</macro>

<macro name="no_assignee_filter_option">
	<n.set_var. name="a-url"><n.app_url_by_assignee/></n.set_var.>
	var text = '<a href="[n.var name='a-url'/]" style="padding:.3em 14px;font-weight:normal"><t>No Filter</t></a>';
	dropdown.add('no-assignee-filter', text);
</macro>

<macro name="app_url_by_priority" parameters="priority">
	<n.page_node.url
		template="[n.app_template/]"
		priority="[n.priority/]"
		assignee="[n.app_assignee/]"
		date="[n.app_date/]"
		index_record="0"
	/>
</macro>

<macro name="app_url_by_assignee" parameters="assignee">
	<n.page_node.url
		template="[n.app_template/]"
		priority="[n.app_priority/]"
		assignee="[n.assignee/]"
		date="[n.app_date/]"
		index_record="0"
	/>
</macro>

<macro name="show_priority" requires="node">
	<n.if.is_assigned>
		<then>
			<div class="priority-[n.priority/] priority">&nbsp;<n.priority/>&nbsp;</div>
		</then>
	</n.if.is_assigned>
</macro>

<macro name="show_assignee" requires="node">
	<n.if.is_assigned>
		<then.assignee.name />
	</n.if.is_assigned>
</macro>

<macro name="assignment_controls" parameters="guessed_assignee" requires="node,servlet">
	<n.set_local_node.topic_or_app/>
	<n.block.>
		<n.if.visitor.can_be_assigned_to.local_node>
			<then.local_node.show_assignment_controls guessed_assignee="[n.guessed_assignee/]" />
		</n.if.visitor.can_be_assigned_to.local_node>
	</n.block.>
</macro>

<macro name="show_assignment_controls" parameters="guessed_assignee" requires="node,servlet">
	<n.set_local_node.this_node/>
	<n.block.>
		<n.if.not.is_submitted_form>
			<then.if.local_node.is_assigned>
				<then>
					<n.assignment_field.set_value value="true" />
					<n.assignment_priority_field.set_value.local_node.priority />
					<n.set_var name="currentAssignee" value="[n.local_node.assignee.id/]" />
					<n.assignment_assignee_field.set_value.>
						<n.if.not.is_null.guessed_assignee>
							<then.guessed_assignee/>
							<else.local_node.assignee.id/>
						</n.if.not.is_null.guessed_assignee>
					</n.assignment_assignee_field.set_value.>
				</then>
				<else>
					<n.assignment_field.set_value value="false" />
					<n.assignment_priority_field.set_value value="3" />
				</else>
			</then.if.local_node.is_assigned>
		</n.if.not.is_submitted_form>
		<script type="text/javascript">
			function updateFields() {
				var $controls = $('#assignee-1,#assignee-2, #assignee-3');
				if ($('#assignment').val() == 'true')
					$controls.show();
				else
					$controls.hide();
			};

			$(document).ready(updateFields);
		</script>
		<div class="field-box light-border-color">
			<div class="second-font field-title"><t>Assignment</t></div>
			<table style="border-collapse:collapse">
				<tr>
					<td class="nowrap">
						<n.assignment_field.select. onchange="updateFields()">
							<n.select_option. value="false" selectedValue="[n.assignment_field.value/]"><t>Unassigned</t></n.select_option.>
							<n.select_option. value="true" selectedValue="[n.assignment_field.value/]"><t>Assign</t></n.select_option.>
						</n.assignment_field.select.>
					</td>
					<td id="assignee-1">
						<n.assignment_assignee_field.select.>
							<n.local_node.assignee_list.>
								<n.sort_by_name />
								<n.loop.>
									<n.assignment_option
										value = "[n.current_user.id/]"
										selectedValue = "[n.assignment_assignee_field.value/]"
										highlightValue = "[n.var name='currentAssignee'/]"
										text = "[n.current_user.name/]"
									/>
								</n.loop.>
							</n.local_node.assignee_list.>
						</n.assignment_assignee_field.select.>
					</td>
					<td class="nowrap">
						<span id="assignee-3" style="display:none">
							<t>at priority</t>
							<n.assignment_priority_field.select.>
								<n.assignment_priority_option. value="1" selectedValue="[n.assignment_priority_field.value/]">1. <t>Highest</t></n.assignment_priority_option.>
								<n.assignment_priority_option. value="2" selectedValue="[n.assignment_priority_field.value/]">2. <t>High</t></n.assignment_priority_option.>
								<n.assignment_priority_option. value="3" selectedValue="[n.assignment_priority_field.value/]">3. <t>Normal</t></n.assignment_priority_option.>
								<n.assignment_priority_option. value="4" selectedValue="[n.assignment_priority_field.value/]">4. <t>Low</t></n.assignment_priority_option.>
								<n.assignment_priority_option. value="5" selectedValue="[n.assignment_priority_field.value/]">5. <t>Lowest</t></n.assignment_priority_option.>
							</n.assignment_priority_field.select.>
						</span>
					</td>
				</tr>
			</table>
		</div>
	</n.block.>
</macro>

<macro name="assignment_priority_option" parameters="value,selectedValue" dot_parameter="text">
	<n.assignment_option value="[n.value/]" selectedValue="[n.selectedValue/]" highlightValue="[n.selectedValue/]" text="[n.text/]" />
</macro>

<macro name="assignment_option" parameters="value,selectedValue,highlightValue" dot_parameter="text">
	<n.select_option value="[n.value/]" selectedValue="[n.selectedValue/]" text="[n.text/]">
		<class>
			<n.if.equal value1="[n.value/]" value2="[n.highlightValue/]">
				<then>highlight</then>
				<else.null/>
			</n.if.equal>
		</class>
	</n.select_option>
</macro>

<macro name="assignment_field" dot_parameter="do">
	<n.field. name="assignment"><n.do/></n.field.>
</macro>

<macro name="assignment_priority_field" dot_parameter="do">
	<n.field. name="priority"><n.do/></n.field.>
</macro>

<macro name="assignment_assignee_field" dot_parameter="do">
	<n.field. name="assignee"><n.do/></n.field.>
</macro>

<macro name="save_assignment" requires="node_editor,servlet">
	<n.set_local_node.edited_node.topic_or_app/>
	<n.if.visitor.can_be_assigned_to.local_node>
		<then.if.assignment_field.value>
			<then.local_node.>
				<n.assign>
					<assignee><n.get_user_from_id user_id="[n.assignment_assignee_field.value/]" /></assignee>
					<priority><n.assignment_priority_field.value/></priority>
				</n.assign>
			</then.local_node.>
			<else.local_node.unassign/>
		</then.if.assignment_field.value>
	</n.if.visitor.can_be_assigned_to.local_node>
</macro>

<macro name="priority_name" requires="node">
	<n.if.is_assigned>
		<then.switch. value="[n.priority/]">
			<n.case value="1" do="[t]Highest[/t]" />
			<n.case value="2" do="[t]High[/t]" />
			<n.case value="3" do="[t]Normal[/t]" />
			<n.case value="4" do="[t]Low[/t]" />
			<n.case value="5" do="[t]Lowest[/t]" />
		</then.switch.>
	</n.if.is_assigned>
</macro>