Skip to content

Commit

Permalink
Move the create key links out of the table
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Nov 27, 2024
1 parent 0a02f83 commit 0ec9e70
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 27 deletions.
7 changes: 0 additions & 7 deletions app/assets/stylesheets/provider/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ table.list {
}
}

table.no-border {
td,
th {
border: 0;
}
}

table.mini {
border: line-height-times(1) solid $white;
}
Expand Down
38 changes: 18 additions & 20 deletions app/views/provider/admin/keys/_widget.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,24 @@
<% if cinstance.backend_version.app_keys_allowed? %>
<%- can_add_keys = cinstance.application_keys.can_add? %>
<div class="pf-c-card__body">
<table class="list no-border">
<tr>
<td colspan="2" id="app-keys-operations" <%= "style=display:none;" unless can_add_keys %>>
<% if cinstance.custom_keys_enabled? %>
<%= link_to 'Add Custom key', new_provider_admin_application_key_path(cinstance),
class: 'fancybox action add',
'data-autodimensions' => 'true',
title: 'Add Custom key' %>
<% end %>
<%= link_to 'Add Random key', provider_admin_application_keys_path(cinstance),
method: :post,
remote: true,
class: 'create_key add action' %>
</td>

<td colspan="2" id="app-keys-limit-warning" <%= "style=display:none;" if can_add_keys %>>
Keys limit reached.
</td>
</tr>
</table>
<div>
<div id="app-keys-operations" <%= "style=display:none;" unless can_add_keys %>>
<% if cinstance.custom_keys_enabled? %>
<%= link_to 'Add Custom key', new_provider_admin_application_key_path(cinstance),
class: 'fancybox action add',
'data-autodimensions' => 'true',
title: 'Add Custom key' %>
<% end %>
<%= link_to 'Add Random key', provider_admin_application_keys_path(cinstance),
method: :post,
remote: true,
class: 'create_key add action pull-right' %>
</div>

<div colspan="2" id="app-keys-limit-warning" <%= "style=display:none;" if can_add_keys %>>
Keys limit reached.
</div>
</div>
</div>
<% end %>
Expand Down

0 comments on commit 0ec9e70

Please sign in to comment.