<ul class="list-group ${'sortable' if sortable and user['can_edit'] else ''}">
    % for each in nodes:
        <div mod-meta='{
                "tpl": "util/render_node.mako",
                "uri": "${each["api_url"]}get_summary/",
                "view_kwargs": {
                    "rescale_ratio" : ${rescale_ratio},
                    "uid" : "${user_id}"
                },
                "replace": true
            }'></div>
    % endfor

</ul>

% if sortable and user['can_edit']:

    <script>
        $(function(){
            $('.sortable').sortable({
                containment: "#containment",
                tolerance: "pointer",
                items: "> li",
                stop: function(event, ui){
                    var sort_list_elm = this;
                    var id_list = $(sort_list_elm).sortable("toArray", {
                       attribute: "node_id"
                    });
                    checkListChange(id_list, sort_list_elm);
                }
            });
        });
        function checkListChange(id_list, item){
            var data_to_send = {};
            data_to_send['new_list'] = JSON.stringify(id_list);
            $.post('${node["api_url"]}reorder_components/', data_to_send, function(response){
                if(response['success']=='false'){
                    $(item).sortable("cancel");
                }
            });
        };
    </script>

% endif

<ul class="list-group ${'sortable' if sortable and user['can_edit'] else ''}">
    % for each in nodes:
        <div mod-meta='{
                "tpl": "util/render_node.mako",
                "uri": "${each["api_url"]}get_summary/",
                "view_kwargs": {
                    "rescale_ratio" : ${rescale_ratio},
                    "uid" : "${user_id}"
                },
                "replace": true
            }'></div>
    % endfor
## TODO: make sure these templates are only included once on a page.
<%include file="log_templates.mako"/>
</ul>

% if sortable and user['can_edit']:

    <script>
        $(function(){
            $('.sortable').sortable({
                containment: "#containment",
                tolerance: "pointer",
                items: "> li",
                stop: function(event, ui){
                    var sort_list_elm = this;
                    var id_list = $(sort_list_elm).sortable("toArray", {
                       attribute: "node_id"
                    });
                    checkListChange(id_list, sort_list_elm);
                }
            });
        });
        function checkListChange(id_list, item){
            var data_to_send = {};
            data_to_send['new_list'] = JSON.stringify(id_list);
            $.post('${node["api_url"]}reorder_components/', data_to_send, function(response){
                if(response['success']=='false'){
                    $(item).sortable("cancel");
                }
            });
        };
    </script>
% endif

Fix log display on registrations page (node lists)
Fix log display on registrations page (node lists)
