<commit_before><% 
  from framework import get_user
  is_contributor = node_to_use.is_contributor(user)
%>
<%inherit file="project.view.mako" />
<%namespace file="_print_logs.mako" import="print_logs"/>
<%namespace file="_node_list.mako" import="node_list"/>
<%namespace file="_file_tree.mako" import="file_tree"/>
<link rel="stylesheet" type="text/css" href="/static/css/jquery.tagsinput.css" />
<script src="/static/js/jquery.tagsinput.min.js"></script>
<script>
    $(function(){
        $('#node-tags').tagsInput({
            width: "100%",
            interactive:${'true' if is_contributor else 'false'},
            onAddTag:function(tag){
                $.ajax({
                    url:"${node_to_use.url()}" + "/addtag/" + tag,
                    type:"GET",
                });
            },
            onRemoveTag:function(tag){
                $.ajax({
                    url:"${node_to_use.url()}" + "/removetag/" + tag,
                    type:"GET",
                });
            },
        });
    });
</script>
  <div class="row"><commit_msg>don't allow tag deletion if not contributor<commit_after><% 
  from framework import get_user
  is_contributor = node_to_use.is_contributor(user)
%>
<%inherit file="project.view.mako" />
<%namespace file="_print_logs.mako" import="print_logs"/>
<%namespace file="_node_list.mako" import="node_list"/>
<%namespace file="_file_tree.mako" import="file_tree"/>
<link rel="stylesheet" type="text/css" href="/static/css/jquery.tagsinput.css" />
<script src="/static/js/jquery.tagsinput.min.js"></script>
<script>
    $(function(){
        $('#node-tags').tagsInput({
            width: "100%",
            interactive:${'true' if is_contributor else 'false'},
            onAddTag:function(tag){
                $.ajax({
                    url:"${node_to_use.url()}" + "/addtag/" + tag,
                    type:"GET",
                });
            },
            onRemoveTag:function(tag){
                $.ajax({
                    url:"${node_to_use.url()}" + "/removetag/" + tag,
                    type:"GET",
                });
            },
        });
        // Remove delete UI if not contributor
        % if not is_contributor:
            $('a[title="Removing tag"]').remove();
            $('span.tag span').each(function(idx, elm) {
                $(elm).text($(elm).text().replace(/\s*$/, ''))
            });
        % endif
    });
</script>
  <div class="row">
{'fraction_non_alphanumeric': 0.1835985312117503, 'fraction_numerical': 0.0024479804161566705, 'mean_word_length': 2.0497512437810945, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5450632', 'n_tokens_mistral': 761, 'n_tokens_neox': 723, 'n_words': 119}