<commit_before>function viewCollections() {

  var select_collections = '<section class="fl-panel fl-panel--collections fl-panel--collections__not-selected">' +
    '<h1>Select a collection</h1>' +
    '<div class="fl-collections-holder"></div>' +
    '<button class="fl-button fl-button--big fl-button--center fl-create-collection-button">Create a collection</button>' +
    '</section>';

  $.ajax({
    url: "/zebedee/collections",
    type: "get",
    crossDomain: true,
    headers:{ "X-Florence-Token":accessToken() },
    success: function (data) {
      populateCollectionTable(data);
    },
    error: function (jqxhr) {
      handleApiError(jqxhr);
    }
  });

  function populateCollectionTable(data) {
      var page = $('.fl-collections-holder')
      var collection_table =
        '<table class="fl-collections-table">' +
          '<tbody>' +
            '<tr>' +
              '<th>Collection name</th>' +
              '<th>Publish time and date</th>' +
              '<th>Manage collection</th>'+
            '</tr>';

      $(page).html(collection_table);

      $.each(data, function(i, collection) {

        //var stringDate = collection.publishDate.toString();
        //var date = Date.parse(stringDate);

        var date = new Date(collection.publishDate);
        var minutes = (date.getMinutes()<10?'0':'') + date.getMinutes()

        $('tbody',page).append(
            '<tr class="fl-collections-table-row" data-id="' + collection.id + '">' +
              '<td class= "collection-name">' + collection.name + '</td>' +
              '<td>' + $.datepicker.formatDate('dd/mm/yy', date) + ' ' + date.getHours() + ':' + minutes + '</td>' +
              '<td><button class="view-collection-button" id="fl-collection-view-button-' + collection.id +'"> View Collection</button></td>'+
            '</tr>'
          )

        makeCollectionView(collection.id,data);

      });

      page.append(
          '</tbody>' +
        '</table>')


      $('.fl-collections-table-row').click(function() {

        console.log('Collection row clicked for id: ' + $(this).attr('data-id'));
        var collectionId = $(this).attr('data-id');

        if(collectionId) {

          $('.fl-panel--collections').removeClass('fl-panel--collections__not-selected');
          $('.fl-panel--collection-details').show();
          $('.fl-create-collection-button').hide();

          $(this).addClass('fl-panel--collections__selected');

          viewCollectionDetails(collectionId);
        }
      });
    }


  var selected_collection =
    '<section class="fl-panel fl-panel--collection-details">' +
    '<div class="fl-panel--collection-details-container"></div>' +
    '<button class="fl-button fl-work-on-collection-button">Work on this collection</button>' +
    '<button class="fl-button fl-button--secondary fl-finish-collection-button">Finish this collection/button>' +
    '<button class="fl-button fl-button--cancel">Cancel</button>' +
    '</section>';

	var create_collection =
	'<section class="fl-panel fl-panel--create-collection">' +
	'<h1>Create a collection</h1>' +
	'<input type="text" class="fl-collection-name-input">' +
	'<select class="fl-collection-team-access">' +
		'<option value="1">Labour Market Statistics Team</option>' +
	'</select>' +
	'<select class="fl-collection-publish-day">' +
		'<option value="1">1</option>' +
		'<option value="2">2</option>' +
		'<option value="3">3</option>' +
		'<option value="4">4</option>' +<commit_msg>Fixed broken HTML tag.<commit_after>function viewCollections() {

  var select_collections = '<section class="fl-panel fl-panel--collections fl-panel--collections__not-selected">' +
    '<h1>Select a collection</h1>' +
    '<div class="fl-collections-holder"></div>' +
    '<button class="fl-button fl-button--big fl-button--center fl-create-collection-button">Create a collection</button>' +
    '</section>';

  $.ajax({
    url: "/zebedee/collections",
    type: "get",
    crossDomain: true,
    headers:{ "X-Florence-Token":accessToken() },
    success: function (data) {
      populateCollectionTable(data);
    },
    error: function (jqxhr) {
      handleApiError(jqxhr);
    }
  });

  function populateCollectionTable(data) {
      var page = $('.fl-collections-holder')
      var collection_table =
        '<table class="fl-collections-table">' +
          '<tbody>' +
            '<tr>' +
              '<th>Collection name</th>' +
              '<th>Publish time and date</th>' +
              '<th>Manage collection</th>'+
            '</tr>';

      $(page).html(collection_table);

      $.each(data, function(i, collection) {

        //var stringDate = collection.publishDate.toString();
        //var date = Date.parse(stringDate);

        var date = new Date(collection.publishDate);
        var minutes = (date.getMinutes()<10?'0':'') + date.getMinutes()

        $('tbody',page).append(
            '<tr class="fl-collections-table-row" data-id="' + collection.id + '">' +
              '<td class= "collection-name">' + collection.name + '</td>' +
              '<td>' + $.datepicker.formatDate('dd/mm/yy', date) + ' ' + date.getHours() + ':' + minutes + '</td>' +
              '<td><button class="view-collection-button" id="fl-collection-view-button-' + collection.id +'"> View Collection</button></td>'+
            '</tr>'
          )

        makeCollectionView(collection.id,data);

      });

      page.append(
          '</tbody>' +
        '</table>')


      $('.fl-collections-table-row').click(function() {

        console.log('Collection row clicked for id: ' + $(this).attr('data-id'));
        var collectionId = $(this).attr('data-id');

        if(collectionId) {

          $('.fl-panel--collections').removeClass('fl-panel--collections__not-selected');
          $('.fl-panel--collection-details').show();
          $('.fl-create-collection-button').hide();

          $(this).addClass('fl-panel--collections__selected');

          viewCollectionDetails(collectionId);
        }
      });
    }


  var selected_collection =
    '<section class="fl-panel fl-panel--collection-details">' +
    '<div class="fl-panel--collection-details-container"></div>' +
    '<button class="fl-button fl-work-on-collection-button">Work on this collection</button>' +
    '<button class="fl-button fl-button--secondary fl-finish-collection-button">Finish this collection</button>' +
    '<button class="fl-button fl-button--cancel">Cancel</button>' +
    '</section>';

	var create_collection =
	'<section class="fl-panel fl-panel--create-collection">' +
	'<h1>Create a collection</h1>' +
	'<input type="text" class="fl-collection-name-input">' +
	'<select class="fl-collection-team-access">' +
		'<option value="1">Labour Market Statistics Team</option>' +
	'</select>' +
	'<select class="fl-collection-publish-day">' +
		'<option value="1">1</option>' +
		'<option value="2">2</option>' +
		'<option value="3">3</option>' +
		'<option value="4">4</option>' +
{'fraction_non_alphanumeric': 0.1964439346142816, 'fraction_numerical': 0.004588471465443074, 'mean_word_length': 2.859988931931378, 'pattern_counts': {'":': 2, '<': 118, '<?xml version=': 0, '>': 117, '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': '132704', 'n_tokens_mistral': 2148, 'n_tokens_neox': 2119, 'n_words': 345}