<% content_for :page_title do %> <%= Spree.t('admin.oauth_applications.list') %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t('admin.oauth_applications.new'), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_role_link' %> <% end if can? :create, Spree::OauthApplication %> <% if @oauth_applications.any? %>
<% @oauth_applications.each do |application| %> <% end %>
<%= Spree.t(:name) %> <%= Spree.t('admin.oauth_applications.uid') %> <%= Spree.t('admin.oauth_applications.scopes') %>
<%= application.name %>
<%= password_field_tag :password, application.uid, class: 'form-control unhide text-muted border-0 bg-transparent', data: { password_toggle_target: 'unhide' }, readonly: true %>
<%= button_tag class: 'btn btn-link', data: { action: 'click->password-toggle#password' } do %> <%= svg_icon name: "view.svg", width: '18', height: '18' %> <% end %>
<%= application.scopes %> <%= link_to_edit(application, no_text: true) if can? :edit, application %> <%= link_to_delete(application, no_text: true) if can? :destroy, application %>
<% else %>
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::OauthApplication)) %>, <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::OauthApplication %>!
<% end %>