<commit_before><?php
if(!defined('ROOT')) exit('No direct script access allowed');

if(!isset($topbar)) {
  $topbar=[];
}
$topbar=array_merge([
          "settings"=>false,
          "XtraHtmlToolButton"=>"",
        ],$topbar);
//$reportConfig['template']

$templateViews=["grid"];

if(isset($reportConfig['kanban'])) {
  $templateViews[]="kanban";
}
if(isset($reportConfig['cards']) || isset($reportConfig['kanban'])) {
  $templateViews[]="cards";
}
if(isset($reportConfig['calendar'])) {
  $templateViews[]="calendar";
}
if(isset($reportConfig['gmap'])) {
  $templateViews[]="gmap";
}
if(isset($reportConfig['drilldown'])) {
  $templateViews[]="drilldown";
}
//printArray($reportConfig);
?>
<div class="control-primebar">
<!--       	<div class="col-lg-6 col-xs-6 pull-left">
    <h1 class='reportTitle'><?=$reportConfig['title']?></h1>
  </div> -->
  <div class="col-lg-6 col-xs-6 pull-left control-toolbar">
    <?php
      if(isset($reportConfig['actions']) && is_array($reportConfig['actions']) && count($reportConfig['actions'])>0) {
    ?>
      <?php
        foreach ($reportConfig['actions'] as $key => $button) {
          if(isset($button['policy']) && strlen($button['policy'])>0) {
            $allow=checkUserPolicy($button['policy']);
            if(!$allow) continue;
          }
//           printArray($button);printArray();checkUserRoles($reportConfig['srckey'],);
          if(isset($button['label'])) $button['label']=_ling($button['label']);
          else $button['label']=_ling($key);
          
          if(isset($button['title'])) $button['title']=_ling($button['title']);
          else $button['title']="";

          if(!isset($button['class'])) $button['class']="btn btn-primary";
          echo "<a class='{$button['class']}' cmd='{$key}' title='{$button['title']}' >";
          if(isset($button['icon']) && strlen($button['icon'])>0) {
            if(strpos($button['icon'],"<")!==false) {
              echo $button['icon'];
            } else {
              echo "<i class='{$button['icon']}'></i> ";
            }<commit_msg>Each buttons will have refid<commit_after><?php
if(!defined('ROOT')) exit('No direct script access allowed');

if(!isset($topbar)) {
  $topbar=[];
}
$topbar=array_merge([
          "settings"=>false,
          "XtraHtmlToolButton"=>"",
        ],$topbar);
//$reportConfig['template']

$templateViews=["grid"];

if(isset($reportConfig['kanban'])) {
  $templateViews[]="kanban";
}
if(isset($reportConfig['cards']) || isset($reportConfig['kanban'])) {
  $templateViews[]="cards";
}
if(isset($reportConfig['calendar'])) {
  $templateViews[]="calendar";
}
if(isset($reportConfig['gmap'])) {
  $templateViews[]="gmap";
}
if(isset($reportConfig['drilldown'])) {
  $templateViews[]="drilldown";
}
//printArray($reportConfig);
?>
<div class="control-primebar">
<!--       	<div class="col-lg-6 col-xs-6 pull-left">
    <h1 class='reportTitle'><?=$reportConfig['title']?></h1>
  </div> -->
  <div class="col-lg-6 col-xs-6 pull-left control-toolbar">
    <?php
      if(isset($reportConfig['actions']) && is_array($reportConfig['actions']) && count($reportConfig['actions'])>0) {
    ?>
      <?php
        foreach ($reportConfig['actions'] as $key => $button) {
          if(isset($button['policy']) && strlen($button['policy'])>0) {
            $allow=checkUserPolicy($button['policy']);
            if(!$allow) continue;
          }
//           printArray($button);printArray();checkUserRoles($reportConfig['srckey'],);
          if(isset($button['label'])) $button['label']=_ling($button['label']);
          else $button['label']=_ling($key);
          
          if(isset($button['title'])) $button['title']=_ling($button['title']);
          else $button['title']="";

          if(!isset($button['class'])) $button['class']="btn btn-primary";
          echo "<a class='{$button['class']}' cmd='{$key}' title='{$button['title']}' data-refid='"._replace("#refid#")."' >";
          if(isset($button['icon']) && strlen($button['icon'])>0) {
            if(strpos($button['icon'],"<")!==false) {
              echo $button['icon'];
            } else {
              echo "<i class='{$button['icon']}'></i> ";
            }
{'fraction_non_alphanumeric': 0.24629363940698232, 'fraction_numerical': 0.00430416068866571, 'mean_word_length': 3.847045191193511, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 41, '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': '5186893', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1311, 'n_words': 169}