<commit_before><%#
Copyright 2011-2020, The Trustees of Indiana University and Northwestern
  University.  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
  specific language governing permissions and limitations under the License.
---  END LICENSE_HEADER BLOCK  ---
%>
<%# Override of samvera-persona view partial to update table display %>
<%= render partial: 'index_title' %>

<div class="panel panel-default users-invite">
  <div class="panel-heading">
      <%= t('.invite_users') %>
  </div>

  <div class="panel-body">
    <% @user ||= User.new %>
    <%= form_for(:user, url: main_app.user_invitation_path, html: { method: :post , class: 'simple-form form-inline pull-left'}) do |f| %>
      <%= render "devise/shared/error_messages", resource: @user %>

      <% @user.class.invite_key_fields.each do |field| -%>
        <div class="form-group">
          <%= f.label field, t('.invite_users'), for: field, class: 'control-label required' %>
          <%= f.text_field field, class: 'form-control required' %>
        </div>
      <% end -%>

      <%= f.submit t('.add'), class: 'btn btn-primary' %>
    <% end %>
  </div>
</div>


<div class="users-listing">
  <table id="users-table" class="table table-striped datatable">
    <thead>
      <tr>
        <th><%= t('.id_label') %></th>
        <th><%= t('.email_label') %></th>
        <th><%= t('.role_label') %></th>
        <th><%= t('.access_label') %></th>
        <th><%= t('.status_label') %></th>
        <% if User.column_names.include? 'provider' %>
          <th><%= t('.auth_label') %></th>
        <% end %>
        <th class="text-right" data-orderable="false"><%= t('.action_label') %></th>
      </tr>
    </thead>
    <tbody>
      <% @presenter.users.each do |user| %>
        <tr>
          <td><%= link_to user.username, main_app.edit_persona_user_path(user) %></td>
          <td><%= link_to user.email, main_app.edit_persona_user_path(user) %></td>
          <td><% roles = @presenter.user_roles(user) %>
              <ul><% roles.each do |role| %>
                <li><%= role %></li>
                <% end %>
              </ul>
          </td>
          <td>
            <%# in the case that a user is created who never signs in, this is necessary %>
            <relative-time datetime="<%= @presenter.last_accessed(user).getutc.iso8601 %>" title="<%= @presenter.last_accessed(user).to_formatted_s(:standard) %>">
              <%= @presenter.last_accessed(user).to_formatted_s(:long_ordinal) %>
            </relative-time>
          </td>
          <td><%= user.accepted_or_not_invited? ? t('.status.active') : t('.status.pending') %></td>
          <% if user.has_attribute?(:provider) %>
            <td>
              <%= user.provider %>
            </td>
          <% end %><commit_msg>Left align column label<commit_after><%#
Copyright 2011-2020, The Trustees of Indiana University and Northwestern
  University.  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
  specific language governing permissions and limitations under the License.
---  END LICENSE_HEADER BLOCK  ---
%>
<%# Override of samvera-persona view partial to update table display %>
<%= render partial: 'index_title' %>

<div class="panel panel-default users-invite">
  <div class="panel-heading">
      <%= t('.invite_users') %>
  </div>

  <div class="panel-body">
    <% @user ||= User.new %>
    <%= form_for(:user, url: main_app.user_invitation_path, html: { method: :post , class: 'simple-form form-inline pull-left'}) do |f| %>
      <%= render "devise/shared/error_messages", resource: @user %>

      <% @user.class.invite_key_fields.each do |field| -%>
        <div class="form-group">
          <%= f.label field, t('.invite_users'), for: field, class: 'control-label required' %>
          <%= f.text_field field, class: 'form-control required' %>
        </div>
      <% end -%>

      <%= f.submit t('.add'), class: 'btn btn-primary' %>
    <% end %>
  </div>
</div>


<div class="users-listing">
  <table id="users-table" class="table table-striped datatable">
    <thead>
      <tr>
        <th><%= t('.id_label') %></th>
        <th><%= t('.email_label') %></th>
        <th><%= t('.role_label') %></th>
        <th><%= t('.access_label') %></th>
        <th><%= t('.status_label') %></th>
        <% if User.column_names.include? 'provider' %>
          <th><%= t('.auth_label') %></th>
        <% end %>
        <th data-orderable="false"><%= t('.action_label') %></th>
      </tr>
    </thead>
    <tbody>
      <% @presenter.users.each do |user| %>
        <tr>
          <td><%= link_to user.username, main_app.edit_persona_user_path(user) %></td>
          <td><%= link_to user.email, main_app.edit_persona_user_path(user) %></td>
          <td><% roles = @presenter.user_roles(user) %>
              <ul><% roles.each do |role| %>
                <li><%= role %></li>
                <% end %>
              </ul>
          </td>
          <td>
            <%# in the case that a user is created who never signs in, this is necessary %>
            <relative-time datetime="<%= @presenter.last_accessed(user).getutc.iso8601 %>" title="<%= @presenter.last_accessed(user).to_formatted_s(:standard) %>">
              <%= @presenter.last_accessed(user).to_formatted_s(:long_ordinal) %>
            </relative-time>
          </td>
          <td><%= user.accepted_or_not_invited? ? t('.status.active') : t('.status.pending') %></td>
          <% if user.has_attribute?(:provider) %>
            <td>
              <%= user.provider %>
            </td>
          <% end %>
{'fraction_non_alphanumeric': 0.1757032846141757, 'fraction_numerical': 0.005029074336005029, 'mean_word_length': 2.6036240090600224, 'pattern_counts': {'":': 0, '<': 173, '<?xml version=': 0, '>': 173, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3392139', 'n_tokens_mistral': 2139, 'n_tokens_neox': 1987, 'n_words': 524}