<commit_before><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im"%>

<!-- historyBagView.jsp -->
<script type="text/javascript">
<!--//<![CDATA[
  function selectColumnCheckbox(form, type) {
    var columnCheckBox = 'selected_' + type;
    var checked = document.getElementById(columnCheckBox).checked;
    with(form) {
      for(i=0;i < elements.length;i++) {
        thiselm = elements[i];
        var testString = columnCheckBox + '_';
        if(thiselm.id.indexOf(testString) != -1)
          thiselm.checked = checked;
      }
    }
  }
  function noenter() {
    return !(window.event && window.event.keyCode == 13); 
  }
//]]>-->
</script>              

<html:xhtml/>

<h2>My bags</h2>
  <p>
    <fmt:message key="history.savedbags.help"/>
  </p>

  <c:choose>
    <c:when test="${empty PROFILE.savedBags}">
      <div class="altmessage">
        None
      </div>
    </c:when>
    <c:otherwise>

      <html:form action="/modifyBag">
        
        <table class="results history" cellspacing="0">
          <tr>
            <th>
              <input type="checkbox" id="selected_bag"
                     onclick="selectColumnCheckbox(this.form, 'bag')">
            </th>
            <th align="left" colspan="2" nowrap>
              <fmt:message key="query.savedbags.namecolumnheader"/>
            </th>
            <th align="right" nowrap>
              <fmt:message key="query.savedbags.countcolumnheader"/>
            </th>
          </tr>
          <c:forEach items="${PROFILE.savedBags}" var="savedBag" varStatus="status">
            <tr>
              <td>
                <html:multibox property="selectedBags" styleId="selected_bag_${status.index}">
                  <c:out value="${savedBag.key}" escapeXml="false"/>
                </html:multibox>
              </td>

              <tiles:insert name="renamableElement.jsp ">
                <tiles:put name="name" value="${savedBag.key}"/>
                <tiles:put name="type" value="bag"/>
                <tiles:put name="index" value="${status.index}"/>
              </tiles:insert>
              
              <td align="right"><commit_msg>Fixed white space problem with renamableElement<commit_after><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im"%>

<!-- historyBagView.jsp -->
<script type="text/javascript">
<!--//<![CDATA[
  function selectColumnCheckbox(form, type) {
    var columnCheckBox = 'selected_' + type;
    var checked = document.getElementById(columnCheckBox).checked;
    with(form) {
      for(i=0;i < elements.length;i++) {
        thiselm = elements[i];
        var testString = columnCheckBox + '_';
        if(thiselm.id.indexOf(testString) != -1)
          thiselm.checked = checked;
      }
    }
  }
  function noenter() {
    return !(window.event && window.event.keyCode == 13); 
  }
//]]>-->
</script>              

<html:xhtml/>

<h2>My bags</h2>
  <p>
    <fmt:message key="history.savedbags.help"/>
  </p>

  <c:choose>
    <c:when test="${empty PROFILE.savedBags}">
      <div class="altmessage">
        None
      </div>
    </c:when>
    <c:otherwise>

      <html:form action="/modifyBag">
        
        <table class="results history" cellspacing="0">
          <tr>
            <th>
              <input type="checkbox" id="selected_bag"
                     onclick="selectColumnCheckbox(this.form, 'bag')">
            </th>
            <th align="left" colspan="2" nowrap>
              <fmt:message key="query.savedbags.namecolumnheader"/>
            </th>
            <th align="right" nowrap>
              <fmt:message key="query.savedbags.countcolumnheader"/>
            </th>
          </tr>
          <c:forEach items="${PROFILE.savedBags}" var="savedBag" varStatus="status">
            <tr>
              <td>
                <html:multibox property="selectedBags" styleId="selected_bag_${status.index}">
                  <c:out value="${savedBag.key}" escapeXml="false"/>
                </html:multibox>
              </td>

              <tiles:insert name="renamableElement.jsp">
                <tiles:put name="name" value="${savedBag.key}"/>
                <tiles:put name="type" value="bag"/>
                <tiles:put name="index" value="${status.index}"/>
              </tiles:insert>
              
              <td align="right">
{'fraction_non_alphanumeric': 0.18089636990468466, 'fraction_numerical': 0.0032447779355100387, 'mean_word_length': 2.1881060116354236, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 101, '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': '820220', 'n_tokens_mistral': 1631, 'n_tokens_neox': 1563, 'n_words': 254}