<commit_before>{{#can permission='manage_widget' roleNames=req.userRoleNames}}
  <div aria-hidden="true" class="modal" id="updateWidgetFormModal"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h4 class="modal-title">{{t 'widget.update'}}</h4></div><div class="modal-body"></div></div></div></div>
  {{!-- add widget form modal --}}
  <div aria-hidden="true" class="modal" id="AddWidgetFormModal">
  <form>
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h4 class="modal-title">{{t 'widget.add'}}</h4>
        </div>
        <div class="modal-body">
          <div class="steps-body">
            <div class="step1">
              <div class="form-group">
                <label>{{t 'layout.select.widget.type'}}</label>
                <select id="AddWidgetFormModal-select-type" name="type" class="form-control">
                  <option value=""></option>
                </select>
              </div>
              <div class="clearfix"></div><hr>
              <div class="form-group">
                <button type="button" class="btn btn-primary" onclick="we.structure.goToStep2();"><i class="glyphicon glyphicon-step-forward"></i> {{t 'Next'}}</button>
              </div>
            </div>
            <div class="step2"></div>
          </div>
        </div>
      </div>
    </div>
  </form>
  </div>

  <div class="we-layout-edit-btn">
    <button id="we-layout-start-edit-btn" onclick="we.structure.showLayoutEditor();" type="button" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit text-info"></i> {{t 'layout.edit.btn'}}</button>
    <button id="we-layout-stop-edit-btn" style="display:none;" onclick="we.structure.hideLayoutEditor();" type="button" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-check text-success"></i> {{t 'layout.edit.hide.btn'}}</button>
  </div>
{{/can}}<commit_msg>add permission check in widget components<commit_after>{{#can permission='manage_widget' roleNames=req.userRoleNames}}
<div aria-hidden="true" class="modal" id="updateWidgetFormModal"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h4 class="modal-title">{{t 'widget.update'}}</h4></div><div class="modal-body"></div></div></div></div>
{{!-- add widget form modal --}}
<div aria-hidden="true" class="modal" id="AddWidgetFormModal">
<form>
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h4 class="modal-title">{{t 'widget.add'}}</h4>
      </div>
      <div class="modal-body">
        <div class="steps-body">
          <div class="step1">
            <div class="form-group">
              <label>{{t 'layout.select.widget.type'}}</label>
              <select id="AddWidgetFormModal-select-type" name="type" class="form-control">
                <option value=""></option>
              </select>
            </div>
            <div class="clearfix"></div><hr>
            <div class="form-group">
              <button type="button" class="btn btn-primary" onclick="we.structure.goToStep2();"><i class="glyphicon glyphicon-step-forward"></i> {{t 'Next'}}</button>
            </div>
          </div>
          <div class="step2"></div>
        </div>
      </div>
    </div>
  </div>
</form>
</div>
<div class="we-layout-edit-btn">
  <button id="we-layout-start-edit-btn" onclick="we.structure.showLayoutEditor();" type="button" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit text-info"></i> {{t 'layout.edit.btn'}}</button>
  <button id="we-layout-stop-edit-btn" style="display:none;" onclick="we.structure.hideLayoutEditor();" type="button" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-check text-success"></i> {{t 'layout.edit.hide.btn'}}</button>
</div>
{{/can}}
{'fraction_non_alphanumeric': 0.2116527942925089, 'fraction_numerical': 0.0033293697978596906, 'mean_word_length': 3.4227129337539433, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, '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': '4994854', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1285, 'n_words': 228}