<commit_before>﻿<section class="admin-posts">
  <div class="row">
    <div class="large-12 columns">
      <h1 class="float-left">Posts</h1>
      <div class="button-group float-right admin-button-group">
        <button class="button"
                (click)="save()">
          Save
        </button>
        <button class="button admin-add-button"
                (click)="postService.create()">
          Add
        </button>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="large-3 columns">
      <ul class="admin-collection-list">
        <li *ngFor="let post of postService.getAll()"
            [class.selected]="post.postId === postService.getCurrent().postId"
            (click)="postService.setCurrent(post.url)">
          <span>{{ post.title | truncate : 25 }}</span>
        </li>
      </ul>
    </div>
    <div class="large-9 columns">
      <label>
        Title
        <input type="text"
               [(ngModel)]="postService.getCurrent().title">
      </label>
      <label>
        Url
        <input type="text"
               [(ngModel)]="postService.getCurrent().url">
      </label>
      <label>
        Description
        <textarea [(ngModel)]="postService.getCurrent().description"
                  class="admin-post-description"></textarea>
      </label>
      <label>
        Large Image
        <input type="text"
               [(ngModel)]="postService.getCurrent().image">
      </label>
      <label>
        Small Image
        <input type="text"
               [(ngModel)]="postService.getCurrent().smallImage">
      </label>
      <label>
        Icon Image
        <input type="text"
               [(ngModel)]="postService.getCurrent().iconImage">
      </label>
      <label>
        Code Link
        <input type="text"
               [(ngModel)]="postService.getCurrent().link">
      </label>
      <div class="row">
        <div class="large-4 columns">
          <label>
            Created On
            <input type="text"
                   [ngModel]="postService.getCurrent().createdOn | date:'MM-dd-yyyy'"
                   disabled>
          </label>
        </div>
        <div class="large-4 columns">
          <label>
            Posted On
            <input type="text"
                   [ngModel]="postService.getCurrent().postedOn | date:'MM-dd-yyyy'"
                   disabled>
          </label>
        </div>
        <div class="large-4 columns">
          <label>
            Modified On
            <input type="text"
                   [ngModel]="postService.getCurrent().modifiedOn | date:'MM-dd-yyyy'"
                   disabled>
          </label>
        </div>
      </div>
      <div class="row">
        <div class="large-9 columns">
          <label>
            Meta
            <input type="text"
                   [(ngModel)]="postService.getCurrent().meta">
          </label>
        </div>
        <div class="large-3 columns">
          <input id="test" type="checkbox"
                 [checked]="postService.getCurrent().published"
                 (change)="postService.getCurrent().published = !postService.getCurrent().published"><label>Published</label>
        </div>
      </div>
      <label>
        Excerpt
        <textarea [(ngModel)]="postService.getCurrent().excerpt.content"
                  *ngIf="postService.getCurrent().excerpt"></textarea>
      </label>
      <label>
        Article
        <textarea [(ngModel)]="postService.getCurrent().article.content"
                  *ngIf="postService.getCurrent().article"></textarea>
      </label>
      <fieldset class="fieldset">
        <legend>Categories</legend>
        <span *ngFor="let category of categoryService.getAll()" class="admin-post-collection-item">
          <input id=""
                 type="checkbox"
                 [checked]="postService.getCurrent().category && postService.getCurrent().category.categoryId === category.categoryId">
          <label for="">{{ category.name | truncate : 20 }}</label>
        </span>
      </fieldset>
      <fieldset class="fieldset">
        <legend>Tags</legend>
        <span *ngFor="let tag of tagService.getAll()" class="admin-post-collection-item">
          <input id=""
                 type="checkbox"><label for="">{{ tag.name | truncate : 20 }}</label>
        </span>
      </fieldset>
      <button class="button alert float-right"
              (click)="deleteRecord(postService.getCurrent().url)">
        Delete
      </button>
    </div><commit_msg>removed option to delete a post in UI<commit_after>﻿<section class="admin-posts">
  <div class="row">
    <div class="large-12 columns">
      <h1 class="float-left">Posts</h1>
      <div class="button-group float-right admin-button-group">
        <button class="button"
                (click)="save()">
          Save
        </button>
        <button class="button admin-add-button"
                (click)="postService.create()">
          Add
        </button>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="large-3 columns">
      <ul class="admin-collection-list">
        <li *ngFor="let post of postService.getAll()"
            [class.selected]="post.postId === postService.getCurrent().postId"
            (click)="postService.setCurrent(post.url)">
          <span>{{ post.title | truncate : 25 }}</span>
        </li>
      </ul>
    </div>
    <div class="large-9 columns">
      <label>
        Title
        <input type="text"
               [(ngModel)]="postService.getCurrent().title">
      </label>
      <label>
        Url
        <input type="text"
               [(ngModel)]="postService.getCurrent().url">
      </label>
      <label>
        Description
        <textarea [(ngModel)]="postService.getCurrent().description"
                  class="admin-post-description"></textarea>
      </label>
      <label>
        Large Image
        <input type="text"
               [(ngModel)]="postService.getCurrent().image">
      </label>
      <label>
        Small Image
        <input type="text"
               [(ngModel)]="postService.getCurrent().smallImage">
      </label>
      <label>
        Icon Image
        <input type="text"
               [(ngModel)]="postService.getCurrent().iconImage">
      </label>
      <label>
        Code Link
        <input type="text"
               [(ngModel)]="postService.getCurrent().link">
      </label>
      <div class="row">
        <div class="large-4 columns">
          <label>
            Created On
            <input type="text"
                   [ngModel]="postService.getCurrent().createdOn | date:'MM-dd-yyyy'"
                   disabled>
          </label>
        </div>
        <div class="large-4 columns">
          <label>
            Posted On
            <input type="text"
                   [ngModel]="postService.getCurrent().postedOn | date:'MM-dd-yyyy'"
                   disabled>
          </label>
        </div>
        <div class="large-4 columns">
          <label>
            Modified On
            <input type="text"
                   [ngModel]="postService.getCurrent().modifiedOn | date:'MM-dd-yyyy'"
                   disabled>
          </label>
        </div>
      </div>
      <div class="row">
        <div class="large-9 columns">
          <label>
            Meta
            <input type="text"
                   [(ngModel)]="postService.getCurrent().meta">
          </label>
        </div>
        <div class="large-3 columns">
          <input id="test" type="checkbox"
                 [checked]="postService.getCurrent().published"
                 (change)="postService.getCurrent().published = !postService.getCurrent().published"><label>Published</label>
        </div>
      </div>
      <label>
        Excerpt
        <textarea [(ngModel)]="postService.getCurrent().excerpt.content"
                  *ngIf="postService.getCurrent().excerpt"></textarea>
      </label>
      <label>
        Article
        <textarea [(ngModel)]="postService.getCurrent().article.content"
                  *ngIf="postService.getCurrent().article"></textarea>
      </label>
      <fieldset class="fieldset">
        <legend>Categories</legend>
        <span *ngFor="let category of categoryService.getAll()" class="admin-post-collection-item">
          <input id=""
                 type="checkbox"
                 [checked]="postService.getCurrent().category && postService.getCurrent().category.categoryId === category.categoryId">
          <label for="">{{ category.name | truncate : 20 }}</label>
        </span>
      </fieldset>
      <fieldset class="fieldset">
        <legend>Tags</legend>
        <span *ngFor="let tag of tagService.getAll()" class="admin-post-collection-item">
          <input id=""
                 type="checkbox"><label for="">{{ tag.name | truncate : 20 }}</label>
        </span>
      </fieldset>
    </div>
{'fraction_non_alphanumeric': 0.15842696629213482, 'fraction_numerical': 0.003820224719101124, 'mean_word_length': 1.799937087134319, 'pattern_counts': {'":': 0, '<': 207, '<?xml version=': 0, '>': 207, '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': '1697680', 'n_tokens_mistral': 2498, 'n_tokens_neox': 2420, 'n_words': 451}