<commit_before>:css
  .tab-pane .list-group-item:first-child {border-top-right-radius: 0px; border-top-left-radius: 0px; border-top: 0px}
  .tab-pane .list-group-item:last-child {border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;}
  .btn+.btn {margin-left: 10px;}
  .taggable {margin-right: 2px;}
  .fa-flag {margin-right: 2px;}
  .tab-content {padding: 0px;}

:ruby
  my_tasks = @open_tasks.where('assigned_to_user_id = ?', current_user.id)
  others_tasks = @open_tasks.where('assigned_to_user_id <> ? AND assigned_to_user_id IS NOT NULL', current_user.id)
  unassigned_tasks = @open_tasks.where('assigned_to_user_id IS NULL')
  my_completed_tasks = @closed_tasks.where('assigned_to_user_id = ? AND state = ?', current_user.id, 'completed')
  my_cancelled_tasks = @closed_tasks.where('assigned_to_user_id = ? AND state = ?', current_user.id, 'cancelled')

.col-xs-12.col-sm-8.col-sm-offset-2
  .page-header
    %h2 My Tasks
  .row
    .col-xs-12

      = link_to user_tasks_path(current_user), :class => "btn btn-default", :role => 'button' do
        %i.fa.fa-refresh
        = " Refresh"

      = link_to new_user_task_path(current_user), :class => "btn btn-info", :role => 'button' do
        %i.fa.fa-calendar
        = " New Task"

  .row{:style => 'margin-top: 15px'}
    .col-xs-12
      %ul.nav.nav-tabs
        %li
          %a{:href => "#my_open", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= my_tasks.count
            %i.fa.fa-user
            = " My Open Tasks"

        %li
          %a{:href => "#my_completed", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= my_completed_tasks.count
            %i.fa.fa-check-square-o
            = " My Completed Tasks"

        %li
          %a{:href => "#others", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= others_tasks.count
            %i.fa.fa-users
            = " Tasks Assigned to Others"

        %li
          %a{:href => "#unass", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= unassigned_tasks.count
            %i.fa.fa-calendar
            = " Unassigned Tasks"

        %li
          %a{:href => "#cancelled", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= my_cancelled_tasks.count
            %i.fa.fa-times-circle
            = " Cancelled Tasks"

      .tab-content
        .tab-pane.fade.in#my_open
          .list-group
            - if my_tasks.empty?
              %p You have no tasks waiting
            - else
              - my_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#my_completed
          .list-group
            - if my_completed_tasks.empty?
              %p You have no completed tasks
            - else
              - my_completed_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#others
          .list-group
            - if others_tasks.empty?
              %p No tasks found
            - else
              - others_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#unass
          .list-group
            - if unassigned_tasks.empty?
              %p No tasks unassigned
            - else
              - unassigned_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#cancelled
          .list-group
            - if my_cancelled_tasks.empty?
              %p No tasks unassigned
            - else
              - my_cancelled_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

:javascript

  var tab_var = 'tasks_index_tab';

  $(document).ready(function() {

    // Manage the tabs
    $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
      // save the latest tab
      var this_tab = $(this).attr('href');
      transam.set_ui_key_value(tab_var, this_tab);
    });
  });

  $(function() {
    var last_tab = transam.get_ui_key_value(tab_var);
    if (last_tab) {
      $('a[href='+last_tab+']').tab('show');
    } else {
      // Default to the first tab if no tab is stored
      $('a[data-toggle="tab"]:first').tab('show');
    }
  });<commit_msg>fix message in task index<commit_after>:css
  .tab-pane .list-group-item:first-child {border-top-right-radius: 0px; border-top-left-radius: 0px; border-top: 0px}
  .tab-pane .list-group-item:last-child {border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;}
  .btn+.btn {margin-left: 10px;}
  .taggable {margin-right: 2px;}
  .fa-flag {margin-right: 2px;}
  .tab-content {padding: 0px;}

:ruby
  my_tasks = @open_tasks.where('assigned_to_user_id = ?', current_user.id)
  others_tasks = @open_tasks.where('assigned_to_user_id <> ? AND assigned_to_user_id IS NOT NULL', current_user.id)
  unassigned_tasks = @open_tasks.where('assigned_to_user_id IS NULL')
  my_completed_tasks = @closed_tasks.where('assigned_to_user_id = ? AND state = ?', current_user.id, 'completed')
  my_cancelled_tasks = @closed_tasks.where('assigned_to_user_id = ? AND state = ?', current_user.id, 'cancelled')

.col-xs-12.col-sm-8.col-sm-offset-2
  .page-header
    %h2 My Tasks
  .row
    .col-xs-12

      = link_to user_tasks_path(current_user), :class => "btn btn-default", :role => 'button' do
        %i.fa.fa-refresh
        = " Refresh"

      = link_to new_user_task_path(current_user), :class => "btn btn-info", :role => 'button' do
        %i.fa.fa-calendar
        = " New Task"

  .row{:style => 'margin-top: 15px'}
    .col-xs-12
      %ul.nav.nav-tabs
        %li
          %a{:href => "#my_open", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= my_tasks.count
            %i.fa.fa-user
            = " My Open Tasks"

        %li
          %a{:href => "#my_completed", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= my_completed_tasks.count
            %i.fa.fa-check-square-o
            = " My Completed Tasks"

        %li
          %a{:href => "#others", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= others_tasks.count
            %i.fa.fa-users
            = " Tasks Assigned to Others"

        %li
          %a{:href => "#unass", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= unassigned_tasks.count
            %i.fa.fa-calendar
            = " Unassigned Tasks"

        %li
          %a{:href => "#cancelled", :data =>{:toggle => 'tab'}}
            %span.badge.pull-right= my_cancelled_tasks.count
            %i.fa.fa-times-circle
            = " Cancelled Tasks"

      .tab-content
        .tab-pane.fade.in#my_open
          .list-group
            - if my_tasks.empty?
              %p You have no tasks waiting
            - else
              - my_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#my_completed
          .list-group
            - if my_completed_tasks.empty?
              %p You have no completed tasks
            - else
              - my_completed_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#others
          .list-group
            - if others_tasks.empty?
              %p No tasks found
            - else
              - others_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#unass
          .list-group
            - if unassigned_tasks.empty?
              %p No tasks unassigned
            - else
              - unassigned_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

        .tab-pane.fade.in#cancelled
          .list-group
            - if my_cancelled_tasks.empty?
              %p No tasks cancelled
            - else
              - my_cancelled_tasks.each do |task|
                = render :partial => 'task_detail', :locals => {:task => task}

:javascript

  var tab_var = 'tasks_index_tab';

  $(document).ready(function() {

    // Manage the tabs
    $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
      // save the latest tab
      var this_tab = $(this).attr('href');
      transam.set_ui_key_value(tab_var, this_tab);
    });
  });

  $(function() {
    var last_tab = transam.get_ui_key_value(tab_var);
    if (last_tab) {
      $('a[href='+last_tab+']').tab('show');
    } else {
      // Default to the first tab if no tab is stored
      $('a[data-toggle="tab"]:first').tab('show');
    }
  });
{'fraction_non_alphanumeric': 0.15237215745122937, 'fraction_numerical': 0.004848205009811844, 'mean_word_length': 1.9742533470648815, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 75, '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': '7533935', 'n_tokens_mistral': 3041, 'n_tokens_neox': 2924, 'n_words': 562}