Skip to content

Commit

Permalink
Lint doorkeeper and remove more unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
20wildmanj committed Sep 12, 2023
1 parent b5743da commit bfebef9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 51 deletions.
2 changes: 1 addition & 1 deletion app/views/doorkeeper/applications/_delete_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%- submit_btn_css ||= 'btn btn-link' %>
<%= form_tag oauth_application_path(application) do %>
<input type="hidden" name="_method" value="delete">
<%= submit_tag t('doorkeeper.applications.buttons.destroy'), onclick: "return confirm('#{ t('doorkeeper.applications.confirmations.destroy') }')", class: submit_btn_css %>
<%= submit_tag t('doorkeeper.applications.buttons.destroy'), onclick: "return confirm('#{t('doorkeeper.applications.confirmations.destroy')}')", class: submit_btn_css %>
<% end %>
6 changes: 3 additions & 3 deletions app/views/doorkeeper/applications/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f| %>
<%= form_for application, url: doorkeeper_submit_path(application), html: { class: 'form-horizontal', role: 'form' } do |f| %>
<% if application.errors.any? %>
<div class="alert alert-danger" data-alert><p><%= t('doorkeeper.applications.form.error') %></p></div>
<% end %>
Expand All @@ -21,7 +21,7 @@
</span>
<% if Doorkeeper.configuration.native_redirect_uri %>
<span class="help-block">
<%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: "<code>#{ Doorkeeper.configuration.native_redirect_uri }</code>") %>
<%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: "<code>#{Doorkeeper.configuration.native_redirect_uri}</code>") %>
</span>
<% end %>
</div>
Expand All @@ -42,7 +42,7 @@
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<%= f.submit t('doorkeeper.applications.buttons.submit'), class: "btn btn-primary" %>
<%= link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, :class => "btn btn-default" %>
<%= link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, class: "btn btn-default" %>
</div>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/doorkeeper/applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<code><%= uri %></code>
</td>
<td>
<%= link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code', scope: @application.scopes), class: 'btn btn-success', target: '_blank' %>
<%= link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code', scope: @application.scopes), class: 'btn btn-success', target: '_blank', rel: 'noopener' %>
</td>
</tr>
<% end %>
Expand Down
3 changes: 1 addition & 2 deletions app/views/doorkeeper/authorizations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<h3>Authorization Required</h3>

<p class="h4">
<%= raw t('.prompt', client_name: "<strong class=\"text-info\">#{ h @pre_auth.client.name }</strong>") %>
<%= raw t('.prompt', client_name: "<strong class=\"text-info\">#{h @pre_auth.client.name}</strong>") %>
</p>

<% if @pre_auth.scopes.count > 0 %>
Expand Down Expand Up @@ -94,4 +94,3 @@
</tbody>
</table>
</div>

2 changes: 1 addition & 1 deletion app/views/doorkeeper/authorizations/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<header class="page-header">
<h1><%= t('.title') %>:</h1>
<h2><%= t('.title') %>:</h2>
</header>

<main role="main">
Expand Down
8 changes: 4 additions & 4 deletions app/views/doorkeeper/authorized_applications/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
</thead>
<tbody>
<% @applications.each do |application| %>
<% most_recent_grant = Doorkeeper::AccessGrant.where(:application_id => application.id,
:resource_owner_id => current_user)
.sort_by(&:created_at).last %>
<% most_recent_grant = Doorkeeper::AccessGrant.where(application_id: application.id,
resource_owner_id: current_user)
.max_by(&:created_at) %>
<tr>
<td><%= application.name %></td>
<td><% if application.scopes.include? "user_info" %><i class="material-icons small">done</i><% end %></td>
Expand All @@ -49,4 +49,4 @@
</tr>
<% end %>
</tbody>
</table>
</table>
Empty file.
39 changes: 0 additions & 39 deletions lib/modules/views/autograderDev.html.erb

This file was deleted.

0 comments on commit bfebef9

Please sign in to comment.