show_assignment_controls

NAML documentation   Watch a video
   Usages of this macro
... in workgroup.naml
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
<macro name="show_assignment_controls" parameters="guessed_assignee" requires="node,servlet">
    <n.set_local_node
Macro
Parameters: node
.this_node
Binary
Namespace: NodeNamespace
Parameters: do
/>
    <n.block
Binary
Namespace: BasicNamespace
Parameters: do
.>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_submitted_form
Macro
Requires: servlet
>
            <then.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_node
Macro
Parameters: do
.is_assigned
Binary
Namespace: NodeNamespaceExt
>
                <then>
                    <n.assignment_field
Macro
Parameters: do
.set_value
Binary
Namespace: FieldNamespace
Parameters: value
 value="true" />
                    <n.assignment_priority_field
Macro
Parameters: do
.set_value
Binary
Namespace: FieldNamespace
Parameters: value
.local_node
Macro
Parameters: do
.priority
Binary
Namespace: NodeNamespaceExt
 />
                    <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
 name="currentAssignee" value="[n.local_node
Macro
Parameters: do
.assignee
Binary
Namespace: NodeNamespaceExt
Parameters: do
.id
Binary
Namespace: UserNamespace
/]" />
                    <n.assignment_assignee_field
Macro
Parameters: do
.set_value
Binary
Namespace: FieldNamespace
Parameters: value
.>
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.guessed_assignee>
                            <then.guessed_assignee/>
                            <else.local_node
Macro
Parameters: do
.assignee
Binary
Namespace: NodeNamespaceExt
Parameters: do
.id
Binary
Namespace: UserNamespace
/>
                        </n.if.not.is_null.guessed_assignee>
                    </n.assignment_assignee_field.set_value.>
                </then>
                <else>
                    <n.assignment_field
Macro
Parameters: do
.set_value
Binary
Namespace: FieldNamespace
Parameters: value
 value="false" />
                    <n.assignment_priority_field
Macro
Parameters: do
.set_value
Binary
Namespace: FieldNamespace
Parameters: 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
Macro
Parameters: do
.select
Macro
Requires: field
Parameters: options, onchange, style
. onchange="updateFields()">
                            <n.select_option
Macro
Parameters: text, selectedValue, value, class
. value="false" selectedValue="[n.assignment_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]"><t>Unassigned</t></n.select_option.>
                            <n.select_option
Macro
Parameters: text, selectedValue, value, class
. value="true" selectedValue="[n.assignment_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]"><t>Assign</t></n.select_option.>
                        </n.assignment_field.select.>
                    </td>
                    <td id="assignee-1">
                        <n.assignment_assignee_field
Macro
Parameters: do
.select
Macro
Requires: field
Parameters: options, onchange, style
.>
                            <n.local_node
Macro
Parameters: do
.assignee_list
Macro
Requires: node
Parameters: do
.>
                                <n.sort_by_name
Binary
Namespace: UserList
 />
                                <n.loop
Macro
Requires: sequence
Parameters: by, do
.>
                                    <n.assignment_option
Macro
Parameters: text, selectedValue, value, highlightValue
                                        value ="[n.current_user
Binary
Namespace: UserList
Parameters: do
.id
Binary
Namespace: UserNamespace
/]"
                                        selectedValue ="[n.assignment_assignee_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]"
                                        highlightValue ="[n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='currentAssignee'/]"
                                        text ="[n.current_user
Binary
Namespace: UserList
Parameters: do
.name
Binary
Namespace: UserNamespace
Parameters: truncate
/]"
                                    />
                                </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
Macro
Parameters: do
.select
Macro
Requires: field
Parameters: options, onchange, style
.>
                                <n.assignment_priority_option
Macro
Parameters: text, selectedValue, value
. value="1" selectedValue="[n.assignment_priority_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]">1. <t>Highest</t></n.assignment_priority_option.>
                                <n.assignment_priority_option
Macro
Parameters: text, selectedValue, value
. value="2" selectedValue="[n.assignment_priority_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]">2. <t>High</t></n.assignment_priority_option.>
                                <n.assignment_priority_option
Macro
Parameters: text, selectedValue, value
. value="3" selectedValue="[n.assignment_priority_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]">3. <t>Normal</t></n.assignment_priority_option.>
                                <n.assignment_priority_option
Macro
Parameters: text, selectedValue, value
. value="4" selectedValue="[n.assignment_priority_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]">4. <t>Low</t></n.assignment_priority_option.>
                                <n.assignment_priority_option
Macro
Parameters: text, selectedValue, value
. value="5" selectedValue="[n.assignment_priority_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]">5. <t>Lowest</t></n.assignment_priority_option.>
                            </n.assignment_priority_field.select.>
                        </span>
                    </td>
                </tr>
            </table>
        </div>
    </n.block.>
</macro>