<commit_before>extends ../layouts/admin
block vars
  - var activeView='list'
block content
  .container-fluid#admin-list
    table.table
      thead
        tr
          th.slug
            div Slug
          th.url
            div Full Url
          th
            div Type
          th
      tbody(data-bind="foreach: shorties")
       tr(data-bind="css: { selected: isCurrent(), notSelected: !isCurrent() }")
          td
            label(data-bind="attr: { for: 'shortie_slug_'+$index() }") Slug
            input.form-control(type='text', placeholder='rly shrt', data-bind="attr: { id: 'shortie_slug_'+$index() }, value: slug, event: { focus: $parent.select.bind($parent), blur: $parent.deselect.bind($parent) }")
          td
            label(data-bind="attr: { for: 'shortie_url_'+$index() }") URL
            input.form-control(type='text', placeholder='really long', data-bind="attr: { id: 'shortie_url_'+$index() }, value: url, event: { focus: $parent.select.bind($parent), blur: $parent.deselect.bind($parent) }")
          td
            label Type
            div.form-control(data-bind='text: type')
          td
            .btn-group
              button.btn.btn-primary.btn-xs(data-bind='click: $parent.save.bind($parent)')
                span.glyphicon.glyphicon-save
                span.small save
              button.btn.btn-danger.btn-xs(data-toggle='modal', data-target='#deleteModal', data-bind='click: $parent.markShortieForDeletion.bind($parent)')
                span.glyphicon.glyphicon-remove
                span.small &nbsp;delete
              a.btn.btn-default.btn-xs(data-bind='attr: { href: slug }')
                span.glyphicon.glyphicon-share-alt
                span.small goto

  #deleteModal.modal(data-backdrop='false')
    .modal-dialog
      .modal-content
        .modal-header
          button.close(data-dismiss='modal')
            &times
          h4.modal-title Delete shortie
        .modal-body
          button.btn.btn-danger.btn-xl(data-dismiss='modal', data-bind='click: remove')
            span.glyphicon.glyphicon-remove
            &nbsp;delete forever

block scripts
  script(src="/js/admin-list.js")<commit_msg>Fixed delete modal indent which broke KO binding<commit_after>extends ../layouts/admin
block vars
  - var activeView='list'
block content
  .container-fluid#admin-list
    table.table
      thead
        tr
          th.slug
            div Slug
          th.url
            div Full Url
          th
            div Type
          th
      tbody(data-bind="foreach: shorties")
       tr(data-bind="css: { selected: isCurrent(), notSelected: !isCurrent() }")
          td
            label(data-bind="attr: { for: 'shortie_slug_'+$index() }") Slug
            input.form-control(type='text', placeholder='rly shrt', data-bind="attr: { id: 'shortie_slug_'+$index() }, value: slug, event: { focus: $parent.select.bind($parent), blur: $parent.deselect.bind($parent) }")
          td
            label(data-bind="attr: { for: 'shortie_url_'+$index() }") URL
            input.form-control(type='text', placeholder='really long', data-bind="attr: { id: 'shortie_url_'+$index() }, value: url, event: { focus: $parent.select.bind($parent), blur: $parent.deselect.bind($parent) }")
          td
            label Type
            div.form-control(data-bind='text: type')
          td
            .btn-group
              button.btn.btn-primary.btn-xs(data-bind='click: $parent.save.bind($parent)')
                span.glyphicon.glyphicon-save
                span.small save
              button.btn.btn-danger.btn-xs(data-toggle='modal', data-target='#deleteModal', data-bind='click: $parent.markShortieForDeletion.bind($parent)')
                span.glyphicon.glyphicon-remove
                span.small &nbsp;delete
              a.btn.btn-default.btn-xs(data-bind='attr: { href: slug }')
                span.glyphicon.glyphicon-share-alt
                span.small goto

    #deleteModal.modal(data-backdrop='false')
      .modal-dialog
        .modal-content
          .modal-header
            button.close(data-dismiss='modal')
              &times
            h4.modal-title Delete shortie
          .modal-body
            button.btn.btn-danger.btn-xl(data-dismiss='modal', data-bind='click: remove')
              span.glyphicon.glyphicon-remove
              &nbsp;delete forever

block scripts
  script(src="/js/admin-list.js")
{'fraction_non_alphanumeric': 0.1419179324416232, 'fraction_numerical': 0.0004534119247336205, 'mean_word_length': 2.1026722925457104, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1328778', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1297, 'n_words': 226}