<commit_before>-extends "base.haml"
-load mptt_tags
-load section_tags

-block javascript
  %link{href: "{{ STATIC_URL }}css/theme.bootstrap.css", rel: "stylesheet"}
  %script{src: "{{ STATIC_URL }}js/jquery.tablesorter.js"}
  %script{src: "{{ STATIC_URL }}js/jquery.tablesorter.widgets.js"}
  :javascript
    $(function() {
      $.tablesorter.themes.bootstrap = {
        table        : 'table table-bordered table-striped',
        caption      : 'caption',
        // header class names
        header       : 'bootstrap-header', // give the header a gradient background (theme.bootstrap_2.css)
        sortNone     : '',
        sortAsc      : '',
        sortDesc     : '',
        active       : '', // applied when column is sorted
        hover        : '', // custom css required - a defined bootstrap style may not override other classes
        // icon class names
        icons        : 'icon-white', // add "icon-white" to make them white; this icon class is added to the <i> in the header
        iconSortNone : 'bootstrap-icon-unsorted', // class name added to icon when column is not sorted
        iconSortAsc  : 'icon-chevron-up glyphicon glyphicon-chevron-up', // class name added to icon when column has ascending sort
        iconSortDesc : 'icon-chevron-down glyphicon glyphicon-chevron-down', // class name added to icon when column has descending sort
        filterRow    : '', // filter row class
        footerRow    : '',
        footerCells  : '',
        even         : '', // even row zebra striping
        odd          : ''  // odd row zebra striping
      };

      $("table").tablesorter({
        theme: "bootstrap",
        widthFixed: false,
        headerTemplate : '{content} {icon}',
        widgets : [ "uitheme", "filter", "zebra" ],

        widgetOptions : {
          zebra : ["even", "odd"],
          filter_reset : ".reset"
        }
      });

      // beeeeeeeeeeeh
      $(".tablesorter-filter").addClass("form-control");
      $(".tablesorter-filter").slice(2).parents("td").addClass("hidden-xs");
      $(".tablesorter-filter").slice(3).parents("td").addClass("hidden-sm");
    });


-block content
  %table.tablesorter
    %thead
      %tr
        %th
          Nom
        %th.filter-select.filter-select-nosort{data-placeholder: "Choisissez une section"}
          Section
        %th.hidden-xs
          Durée
        %th.hidden-sm.hidden-xs
          Résolution
        %th.hidden-sm.hidden-xs
          taille
        %th.hidden-sm.hidden-xs
          Fps

    %tfoot
      %tr
        %th
          Nom
        %th
          Section
        %th.hidden-xs
          Durée
        %th.hidden-sm.hidden-xs
          Résolution
        %th.hidden-sm.hidden-xs
          taille
        %th.hidden-sm.hidden-xs
          Fps

    %tbody
      -for video in video_list
        %tr
          %td
            %a{href: "{% url 'administration_video_detail' video.pk %}"}
              =video.title
            \-
            %a{href: "{{ MEDIA_URL }}videos/{{ video.file_name }}"}
              Télécharger
          %td
          %td.hidden-xs
            =video.duration
          %td.hidden-sm.hidden-xs
            =video.width_x_height
          %td.hidden-sm.hidden-xs
            =video.file_size
          %td.hidden-sm.hidden-xs
            =video.fps|floatformat|cut:",0"
            fps
      -for section, structure in section_list|tree_info
        -for videosection in section.videosection_set.all
          -with video=videosection.video
            %tr
              %td
                %a{href: "{% url 'administration_video_detail' video.pk %}"}
                  =video.title
                  \-
                  %a{href: "{{ MEDIA_URL }}videos/{{ video.file_name }}"}
                    Télécharger
              %td
                =section.display_level_indicator
                =section.title
              %td.hidden-xs
                =video.duration
              %td.hidden-sm.hidden-xs
                =video.width_x_height
              %td.hidden-sm.hidden-xs
                =video.file_size
              %td.hidden-sm.hidden-xs
                =video.fps|floatformat|cut:",0"
                fps

  -if video_list
    %h3 Vidéos non classées
    %hr
    .row
      -for video in video_list
        .col-md-6
          -include "video/thumbnail.haml"

  -for section, structure in section_list|tree_info
    <h{% level_to_heading_number section.level %}>
    =section.title
    </h{% level_to_heading_number section.level %}>

    .row
      -for videosection in section.videosection_set.all
        .col-md-6
          -with video=videosection.video
            -include "video/thumbnail.haml"<commit_msg>[mod] swap table and list<commit_after>-extends "base.haml"
-load mptt_tags
-load section_tags

-block javascript
  %link{href: "{{ STATIC_URL }}css/theme.bootstrap.css", rel: "stylesheet"}
  %script{src: "{{ STATIC_URL }}js/jquery.tablesorter.js"}
  %script{src: "{{ STATIC_URL }}js/jquery.tablesorter.widgets.js"}
  :javascript
    $(function() {
      $.tablesorter.themes.bootstrap = {
        table        : 'table table-bordered table-striped',
        caption      : 'caption',
        // header class names
        header       : 'bootstrap-header', // give the header a gradient background (theme.bootstrap_2.css)
        sortNone     : '',
        sortAsc      : '',
        sortDesc     : '',
        active       : '', // applied when column is sorted
        hover        : '', // custom css required - a defined bootstrap style may not override other classes
        // icon class names
        icons        : 'icon-white', // add "icon-white" to make them white; this icon class is added to the <i> in the header
        iconSortNone : 'bootstrap-icon-unsorted', // class name added to icon when column is not sorted
        iconSortAsc  : 'icon-chevron-up glyphicon glyphicon-chevron-up', // class name added to icon when column has ascending sort
        iconSortDesc : 'icon-chevron-down glyphicon glyphicon-chevron-down', // class name added to icon when column has descending sort
        filterRow    : '', // filter row class
        footerRow    : '',
        footerCells  : '',
        even         : '', // even row zebra striping
        odd          : ''  // odd row zebra striping
      };

      $("table").tablesorter({
        theme: "bootstrap",
        widthFixed: false,
        headerTemplate : '{content} {icon}',
        widgets : [ "uitheme", "filter", "zebra" ],

        widgetOptions : {
          zebra : ["even", "odd"],
          filter_reset : ".reset"
        }
      });

      // beeeeeeeeeeeh
      $(".tablesorter-filter").addClass("form-control");
      $(".tablesorter-filter").slice(2).parents("td").addClass("hidden-xs");
      $(".tablesorter-filter").slice(3).parents("td").addClass("hidden-sm");
    });


-block content
  -if video_list
    %h3 Vidéos non classées
    %hr
    .row
      -for video in video_list
        .col-md-6
          -include "video/thumbnail.haml"

  -for section, structure in section_list|tree_info
    <h{% level_to_heading_number section.level %}>
    =section.title
    </h{% level_to_heading_number section.level %}>

    .row
      -for videosection in section.videosection_set.all
        .col-md-6
          -with video=videosection.video
            -include "video/thumbnail.haml"


  %table.tablesorter
    %thead
      %tr
        %th
          Nom
        %th.filter-select.filter-select-nosort{data-placeholder: "Choisissez une section"}
          Section
        %th.hidden-xs
          Durée
        %th.hidden-sm.hidden-xs
          Résolution
        %th.hidden-sm.hidden-xs
          taille
        %th.hidden-sm.hidden-xs
          Fps

    %tfoot
      %tr
        %th
          Nom
        %th
          Section
        %th.hidden-xs
          Durée
        %th.hidden-sm.hidden-xs
          Résolution
        %th.hidden-sm.hidden-xs
          taille
        %th.hidden-sm.hidden-xs
          Fps

    %tbody
      -for video in video_list
        %tr
          %td
            %a{href: "{% url 'administration_video_detail' video.pk %}"}
              =video.title
            \-
            %a{href: "{{ MEDIA_URL }}videos/{{ video.file_name }}"}
              Télécharger
          %td
          %td.hidden-xs
            =video.duration
          %td.hidden-sm.hidden-xs
            =video.width_x_height
          %td.hidden-sm.hidden-xs
            =video.file_size
          %td.hidden-sm.hidden-xs
            =video.fps|floatformat|cut:",0"
            fps
      -for section, structure in section_list|tree_info
        -for videosection in section.videosection_set.all
          -with video=videosection.video
            %tr
              %td
                %a{href: "{% url 'administration_video_detail' video.pk %}"}
                  =video.title
                  \-
                  %a{href: "{{ MEDIA_URL }}videos/{{ video.file_name }}"}
                    Télécharger
              %td
                =section.display_level_indicator
                =section.title
              %td.hidden-xs
                =video.duration
              %td.hidden-sm.hidden-xs
                =video.width_x_height
              %td.hidden-sm.hidden-xs
                =video.file_size
              %td.hidden-sm.hidden-xs
                =video.fps|floatformat|cut:",0"
                fps

{'fraction_non_alphanumeric': 0.11869814932992981, 'fraction_numerical': 0.0017017655817911082, 'mean_word_length': 1.621410649567884, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1080780', 'n_tokens_mistral': 2855, 'n_tokens_neox': 2718, 'n_words': 593}