Commit 70d2fde4 authored by Robert Speicher's avatar Robert Speicher

Restructure SSH key table partial rendering

Prior, we were double-checking `@keys.any?`, and unnecessarily assigning
`is_admin` in a view where it wasn't needed.
parent 1b10724e
- is_admin = defined?(admin) ? true : false
- is_admin = local_assigns.fetch(:admin, false)
- if @keys.any?
%ul.well-list
- @keys.each do |key|
= render 'profiles/keys/key', key: key, is_admin: is_admin
= render partial: 'profiles/keys/key', collection: @keys, locals: { is_admin: is_admin }
- else
%p.profile-settings-message.text-center
- if is_admin
There are no SSH keys associated with this account.
- else
There are no SSH keys with access to your account.
- page_title "SSH Keys"
- header_title page_title, profile_keys_path
- is_admin = defined?(admin) ? true : false
.row.prepend-top-default
.col-lg-3.profile-settings-sidebar
......@@ -19,11 +18,4 @@
%h5
Your SSH keys (#{@keys.count})
%div.append-bottom-default
- if @keys.any?
= render 'key_table'
- else
%p.profile-settings-message.text-center
- if is_admin
User has no ssh keys
- else
There are no SSH keys with access to your account.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment