<commit_before>{% extends 'base.html' %}

{% block content %}
<section id="shared-forms">
  <div class="page-header">
    <h1>Form Gallery <small>Shared Forms</small></h1>
  </div>
    <div id="mfeedback">&nbsp;</div>
  <script type="text/javascript" language="javascript" src="/static/js/jquery.dataTables.js"></script>
  <script type="text/javascript" language="javascript" src="/static/js/jquery.dataTables.pagination.js"></script>
  {% if loggedin_user %}
    <script type="text/javascript" language="javascript" src="/static/js/form_actions.js"></script>
  {% endif %}
  <script type="text/javascript" charset="utf-8">

        $.extend( $.fn.dataTableExt.oStdClasses, {
          "sSortAsc": "header headerSortDown",
          "sSortDesc": "header headerSortUp",
          "sSortable": "header",
          "sWrapper": "dataTables_wrapper form-inline"
        } );

	$(document).ready(function() {
	  $('#forms-table').dataTable({
                  "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
	          "bPaginate" : true,
                  "sPaginationType": "bootstrap",// "iDisplayLength": 4, 
                  "bSort": true, 
                  "oLanguage": {"sSearch": "Search:"},
                  "oSearch": {"sSearch": ""},
                  "fnDrawCallback": function() {
                    {% if loggedin_user %}
                      // add click event to all public (x)forms
                      $('a.clonexls').click(function(){
                        el = $(this);
                        clone_xlsform(el.data('url'), el.data('username'), el.data('id'));
                        return false;
                      });
                   {% endif %}
                  }
      });
      $('#forms-table_filter').addClass('row');
      
      $('#mfeedback').hide();
      
	} );
  </script>

  <table id="forms-table" class="table table-bordered table-striped">
    <thead>
      <tr>
        <th></th>
        <th>User</th>
        <th>Name</th>
        <th>Description</th>
        <th>XLSForm</th>
      </tr>
    </thead>
    <tbody>
      {% for data_dictionary in shared_forms %}
      <tr>
        <td>
          <img src='{{ data_dictionary.user.profile.gravatar }}' alt='' width='20' height='20' />
        </td>
        <td>
          <a href="/{{ data_dictionary.user.username }}">{{ data_dictionary.user.username }}</a>
        </td>
        <td><a href="{% url main.views.show data_dictionary.user.username data_dictionary.id_string %}">{{ data_dictionary.title }}</a></td>
        <td>{{ data_dictionary.description }}</td>
        <td>
          {% if data_dictionary.xls %}
            <a href="{% url download_xlsform data_dictionary.user.username data_dictionary.id_string %}"><button class="btn small success">Excel</button></a>
            {% if loggedin_user and data_dictionary.xls|length > 0 %}
            <a href="" data-url="{% url main.views.clone_xlsform data_dictionary.user.username %}" data-username="{{ data_dictionary.user.username }}" data-id="{{ data_dictionary.id_string }}" class="clonexls"><button class="btn small">Clone</button></a>
            {% endif %}
          {% endif %}
        </td>
      </tr>
      {% endfor %}
    </tbody>
  </table>

</section>
{% endblock %}
<commit_msg>combine gravatar and username in same col<commit_after>{% extends 'base.html' %}

{% block content %}
<section id="shared-forms">
  <div class="page-header">
    <h1>Form Gallery <small>Shared Forms</small></h1>
  </div>
    <div id="mfeedback">&nbsp;</div>
  <script type="text/javascript" language="javascript" src="/static/js/jquery.dataTables.js"></script>
  <script type="text/javascript" language="javascript" src="/static/js/jquery.dataTables.pagination.js"></script>
  {% if loggedin_user %}
    <script type="text/javascript" language="javascript" src="/static/js/form_actions.js"></script>
  {% endif %}
  <script type="text/javascript" charset="utf-8">

        $.extend( $.fn.dataTableExt.oStdClasses, {
          "sSortAsc": "header headerSortDown",
          "sSortDesc": "header headerSortUp",
          "sSortable": "header",
          "sWrapper": "dataTables_wrapper form-inline"
        } );

	$(document).ready(function() {
	  $('#forms-table').dataTable({
                  "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
	          "bPaginate" : true,
                  "sPaginationType": "bootstrap",// "iDisplayLength": 4, 
                  "bSort": true, 
                  "oLanguage": {"sSearch": "Search:"},
                  "oSearch": {"sSearch": ""},
                  "fnDrawCallback": function() {
                    {% if loggedin_user %}
                      // add click event to all public (x)forms
                      $('a.clonexls').click(function(){
                        el = $(this);
                        clone_xlsform(el.data('url'), el.data('username'), el.data('id'));
                        return false;
                      });
                   {% endif %}
                  }
      });
      $('#forms-table_filter').addClass('row');
      
      $('#mfeedback').hide();
      
	} );
  </script>

  <table id="forms-table" class="table table-bordered table-striped">
    <thead>
      <tr>
        <th>User</th>
        <th>Name</th>
        <th>Description</th>
        <th>XLSForm</th>
      </tr>
    </thead>
    <tbody>
      {% for data_dictionary in shared_forms %}
      <tr>
        <td>
          <img src='{{ data_dictionary.user.profile.gravatar }}' alt='' width='20' height='20' />&nbsp;<a href="/{{ data_dictionary.user.username }}">{{ data_dictionary.user.username }}</a>
        </td>
        <td><a href="{% url main.views.show data_dictionary.user.username data_dictionary.id_string %}">{{ data_dictionary.title }}</a></td>
        <td>{{ data_dictionary.description }}</td>
        <td>
          {% if data_dictionary.xls %}
            <a href="{% url download_xlsform data_dictionary.user.username data_dictionary.id_string %}"><button class="btn small success">Excel</button></a>
            {% if loggedin_user and data_dictionary.xls|length > 0 %}
            <a href="" data-url="{% url main.views.clone_xlsform data_dictionary.user.username %}" data-username="{{ data_dictionary.user.username }}" data-id="{{ data_dictionary.id_string }}" class="clonexls"><button class="btn small">Clone</button></a>
            {% endif %}
          {% endif %}
        </td>
      </tr>
      {% endfor %}
    </tbody>
  </table>

</section>
{% endblock %}

{'fraction_non_alphanumeric': 0.18479926448053938, 'fraction_numerical': 0.00398406374501992, 'mean_word_length': 2.261869065467266, 'pattern_counts': {'":': 26, '<': 133, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2341476', 'n_tokens_mistral': 2099, 'n_tokens_neox': 1947, 'n_words': 349}