<commit_before>- @portal_id = @portal_id || @page_id

- @portal_name = @portal_name || @page_title

- @portal_object = "" << @portal_id << "portal"

- $pagefilter = (defined? pagefilter)? " | filter: " << pagefilter : (defined? filterbar) && filterbar == "page"? " | filter: pageFilterText": ""

- @portal_prefix = @module[@portal_id]

- @portal = data["" << @module[@portal_id] << "-" << @portal_id]

-#- puts $pagefilter

- $listdataKey = (defined? listdataKey)? listdataKey : "listFields";

/ PORTLET {"ng": {"show": "!!#{@page_id}.id"}}
.portlet.light.bordered
  .portlet-title
    .caption.font-dark
      %i.fa.fa-beer.font-dark
      %span.caption-subject.bold.uppercase= @portal_name
    .actions
      - if defined? yield
        =yield

      - else
        = partial :'layouts/buttons/insert', :locals => {:click => "#{@portal_id}portal.insert()"}
        = partial :'layouts/buttons/removes', :locals => {:click => "#{@portal_id}portal.removes()", :disabled => "#{@portal_id}portal.isRemoves"}

  .portlet-body

    - if (!defined? filterbar) || filterbar == 'normal'
      .table-toolbar
        %form{:name=>"searchform", :role => "form"}
          .row
            .col-md-8
              = partial :'layouts/widget/filter'

    - elsif filterbar == 'page'
      .table-toolbar
        %form{:name=>"searchform", :role => "form"}
          .row
            .col-md-8
              = partial :'layouts/widget/filter_withpage'

    -#嵌套模块
    %table.table.table-striped.table-hover.table-bordered
      %thead
        %tr
          %th
            %input.group-checkable{:type => "checkbox", 'ng': {'model':"#{@portal_id}portal.selectedall", 'change': "#{@portal_id}portal.selectAll()"}}/
          - if (!defined? inline_toolbar ) || inline_toolbar != 'none'
            %th 操作
          - @portal[$listdataKey].each do |field|
            %th #{field.aliasName || field.fieldName}

      %tbody
        %tr.odd.gradeX{ "ng-repeat" => @portal_id + " in " + @portal_id + "s" + $pagefilter}
          %td
            %input.checkboxes{:type => "checkbox", 'ng': {'model': "#{@portal_id}portal.selection[#{@portal_id}.id]", 'change': "#{@portal_id}portal.selectChange()"} }/

          - if (!defined? inline_toolbar ) || inline_toolbar != 'none'
            %td
              // 修改按钮
              - if (!defined? inline_toolbar) || ( inline_toolbar.include? "update" )
                = partial :'layouts/buttons/update', :locals => {:click => @portal_id + 'portal.update(' + @portal_id + '.id)'}

              // 删除按钮
              - if (!defined? inline_toolbar) || ( inline_toolbar.include? "remove" )
                = partial :'layouts/buttons/remove', :locals => {:click => @portal_id + 'portal.remove(' + @portal_id + '.id)'}

              // 选择按钮
              - if (defined? inline_toolbar) && ( inline_toolbar.include? "selected" )
                = partial :'layouts/buttons/btn_info', :locals => {:click => @portal_id + 'portal.checked(' + @portal_id + '.id)' , :label => '选择', :icon => "fa-check"}

              // 选择按钮
              - if (defined? inline_toolbar) && ( inline_toolbar.include? "checked" )
                = partial :'layouts/buttons/btn', :locals => {:label => "选择", :icon => "fa-circle-o", :click => @portal_id + 'portal.update(' + @portal_id + '.id)'}

              // 审核按钮
              - if (defined? inline_toolbar) && ( inline_toolbar.include? "auditing" )
                = partial :'layouts/buttons/btn', :locals => {:label => "审核", :icon => "fa-gavel", :click => @portal_id + 'portal.auditing(' + @portal_id + '.id)'}

          - @portal[$listdataKey].each do |column|
            %td
              - if column.filter?
                = bindFilter @portal_id, (column.fieldKey || @portal.fields[column.fieldName] || 'error'), column.filter

              - if column.input?<commit_msg>修改删除逻辑, 传入ID改为传入对象<commit_after>- @portal_id = @portal_id || @page_id

- @portal_name = @portal_name || @page_title

- @portal_object = "" << @portal_id << "portal"

- $pagefilter = (defined? pagefilter)? " | filter: " << pagefilter : (defined? filterbar) && filterbar == "page"? " | filter: pageFilterText": ""

- @portal_prefix = @module[@portal_id]

- @portal = data["" << @module[@portal_id] << "-" << @portal_id]

-#- puts $pagefilter

- $listdataKey = (defined? listdataKey)? listdataKey : "listFields";

/ PORTLET {"ng": {"show": "!!#{@page_id}.id"}}
.portlet.light.bordered
  .portlet-title
    .caption.font-dark
      %i.fa.fa-beer.font-dark
      %span.caption-subject.bold.uppercase= @portal_name
    .actions
      - if defined? yield
        =yield

      - else
        = partial :'layouts/buttons/insert', :locals => {:click => "#{@portal_id}portal.insert()"}
        = partial :'layouts/buttons/removes', :locals => {:click => "#{@portal_id}portal.removes()", :disabled => "#{@portal_id}portal.isRemoves"}

  .portlet-body

    - if (!defined? filterbar) || filterbar == 'normal'
      .table-toolbar
        %form{:name=>"searchform", :role => "form"}
          .row
            .col-md-8
              = partial :'layouts/widget/filter'

    - elsif filterbar == 'page'
      .table-toolbar
        %form{:name=>"searchform", :role => "form"}
          .row
            .col-md-8
              = partial :'layouts/widget/filter_withpage'

    -#嵌套模块
    %table.table.table-striped.table-hover.table-bordered
      %thead
        %tr
          %th
            %input.group-checkable{:type => "checkbox", 'ng': {'model':"#{@portal_id}portal.selectedall", 'change': "#{@portal_id}portal.selectAll()"}}/
          - if (!defined? inline_toolbar ) || inline_toolbar != 'none'
            %th 操作
          - @portal[$listdataKey].each do |field|
            %th #{field.aliasName || field.fieldName}

      %tbody
        %tr.odd.gradeX{ "ng-repeat" => @portal_id + " in " + @portal_id + "s" + $pagefilter}
          %td
            %input.checkboxes{:type => "checkbox", 'ng': {'model': "#{@portal_id}portal.selection[#{@portal_id}.id]", 'change': "#{@portal_id}portal.selectChange()"} }/

          - if (!defined? inline_toolbar ) || inline_toolbar != 'none'
            %td
              // 修改按钮
              - if (!defined? inline_toolbar) || ( inline_toolbar.include? "update" )
                = partial :'layouts/buttons/update', :locals => {:click => @portal_id + 'portal.update(' + @portal_id + '.id)'}

              // 删除按钮
              - if (!defined? inline_toolbar) || ( inline_toolbar.include? "remove" )
                = partial :'layouts/buttons/remove', :locals => {:click => @portal_id + 'portal.remove(' + @portal_id + ')'}

              // 选择按钮
              - if (defined? inline_toolbar) && ( inline_toolbar.include? "selected" )
                = partial :'layouts/buttons/btn_info', :locals => {:click => @portal_id + 'portal.checked(' + @portal_id + '.id)' , :label => '选择', :icon => "fa-check"}

              // 选择按钮
              - if (defined? inline_toolbar) && ( inline_toolbar.include? "checked" )
                = partial :'layouts/buttons/btn', :locals => {:label => "选择", :icon => "fa-circle-o", :click => @portal_id + 'portal.update(' + @portal_id + '.id)'}

              // 审核按钮
              - if (defined? inline_toolbar) && ( inline_toolbar.include? "auditing" )
                = partial :'layouts/buttons/btn', :locals => {:label => "审核", :icon => "fa-gavel", :click => @portal_id + 'portal.auditing(' + @portal_id + '.id)'}

          - @portal[$listdataKey].each do |column|
            %td
              - if column.filter?
                = bindFilter @portal_id, (column.fieldKey || @portal.fields[column.fieldName] || 'error'), column.filter

              - if column.input?
{'fraction_non_alphanumeric': 0.18912591050988553, 'fraction_numerical': 0.0005202913631633715, 'mean_word_length': 2.400707651481645, 'pattern_counts': {'":': 6, '<': 27, '<?xml version=': 0, '>': 59, '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': '4992366', 'n_tokens_mistral': 2553, 'n_tokens_neox': 2662, 'n_words': 457}