<commit_before>- set_title t("pages.admin")

= link_to members_control_panel_path do
  .samf-button.plain.mb-3
    = t("common.back")

%h1.mt-3.mb-2
  = t("pages.admin")

- if can? :new, Page
  = link_to new_page_path do
    .samf-button.green.mb-3
      = t("pages.new_page")

- if @pages.empty?
  = t("pages.no_editable_pages")
- else
  %table
    %thead
      %tr
        %th= t("pages.name")
        %th= t("pages.title")
        %th= t("pages.owner")
        %th= t("pages.updated_at")
        %th
        %th
    %tbody
      - @pages.each do |page|
        %tr
          %td= link_to page.name, page
          %td= page.title
          %td= page.role
          %td= link_to l(page.revisions.last.created_at), history_page_path(page)
          %td
            = link_to edit_page_path(page) do
              .samf-button.small.blue
                = t("crud.edit")
          %td
            - if can? :destroy, page
              = link_to page, data: { confirm: t("pages.confirm_delete") }, method: :delete do
                .samf-button.small
                  = t("crud.destroy")<commit_msg>899 - fixed problem with localhost<commit_after>- set_title t("pages.admin")

= link_to members_control_panel_path do
  .samf-button.plain.mb-3
    = t("common.back")

%h1.mt-3.mb-2
  = t("pages.admin")

- if can? :new, Page
  = link_to new_page_path do
    .samf-button.green.mb-3
      = t("pages.new_page")

- if @pages.empty?
  = t("pages.no_editable_pages")
- else
  %table
    %thead
      %tr
        %th= t("pages.name")
        %th= t("pages.title")
        %th= t("pages.owner")
        %th= t("pages.updated_at")
        %th
        %th
    %tbody
      - @pages.each do |page|
        %tr
          %td= link_to page.name, page
          %td= page.title
          %td= page.role
          - if page.revisions.last.exists?
            %td= link_to l(page.revisions.last.created_at), history_page_path(page)
          %td
            = link_to edit_page_path(page) do
              .samf-button.small.blue
                = t("crud.edit")
          %td
            - if can? :destroy, page
              = link_to page, data: { confirm: t("pages.confirm_delete") }, method: :delete do
                .samf-button.small
                  = t("crud.destroy")
{'fraction_non_alphanumeric': 0.14462081128747795, 'fraction_numerical': 0.005731922398589065, 'mean_word_length': 1.7271634615384615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2466377', 'n_tokens_mistral': 815, 'n_tokens_neox': 799, 'n_words': 153}