views

   Usages of this macro
... in utilities.naml
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
<macro name="views" requires="node" parameters="show_text">
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.equal
Binary
Namespace: BasicNamespace
Parameters: value2, value1
 value1="[n.show_text/]" value2="true">
        <then>
            <span id="v[n.id
Binary
Namespace: NodeNamespace
/]" style="display:none">1 <t>view</t>|%1 <t>views</t></span>
        </then>
        <else>
            <span id="v[n.id
Binary
Namespace: NodeNamespace
/]" style="display:none"></span>
        </else>
    </n.if.equal>
    <n.put_in_head
Binary
Namespace: HtmlNamespace
Parameters: in_head
.>
        <script type="text/javascript">
            Nabble.nViews = function(id, views) {
                var $v = $('#v'+id);
                var pos = views=='1'?0:1;
                var t = $v.html()? $v.html().split('|')[pos]:'';
                $v.html(t == ''? views : t.replace(/%1/g,views)).show();
            };
        </script>
    </n.put_in_head.>
    <n.call_later
Binary
Namespace: NabbleNamespace
Parameters: param, value
 value="[n.id
Binary
Namespace: NodeNamespace
/]" param="views"/>
</macro>