Sha256: 5582cb4702e7ce23bec052aac61e31be5748e7c361a5c174a6744f229606132d

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

<% oauth_applications_ds = rodauth.scope.instance_variable_get(:@oauth_applications) %>
<% apps_count = oauth_applications_ds.count %>
<div class="btn-group" role="group" aria-label="Buttons">
  <%= link_to rodauth.new_oauth_application_page_title, "#{rodauth.oauth_applications_path}/new", class: "btn btn-secondary" %>
</div>
<% if apps_count.zero? %>
  <p><%= rodauth.oauth_no_applications_text %></p>
<% else %>
  <table class="table">
    <thead>
      <tr>
        <th scope="col"><%= rodauth.oauth_applications_client_id_label %> (<%= apps_count %>)</th>
        <th scope="col"><%= rodauth.oauth_applications_name_label %></th>
        <th scope="col"><%= rodauth.oauth_applications_homepage_url_label %></th>
        <th scope="col"></th>
      </tr>
    </thead>
    <tbody>
      <% oauth_applications_ds.each do |application| %>
        <tr>
          <td><%= application[rodauth.oauth_applications_client_id_column] %></td>
          <td><%= application[rodauth.oauth_applications_name_column] %></td>
          <td><%= application[rodauth.oauth_applications_homepage_url_column] %></td>
          <td><%= link_to "Show", rodauth.oauth_application_path(application[rodauth.oauth_applications_id_column]) %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <%= rodauth.oauth_management_pagination_links(oauth_applications_ds) %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rodauth-oauth-1.6.0 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_applications.html.erb
rodauth-oauth-1.5.0 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_applications.html.erb
rodauth-oauth-1.4.0 lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_applications.html.erb