codeharbor_links editable through own profile

This commit is contained in:
Karol
2019-08-27 18:33:21 +02:00
parent ec48d1f447
commit 8c306669af
11 changed files with 116 additions and 56 deletions

View File

@@ -8,8 +8,9 @@ h1
= row(label: 'internal_user.role', value: t("users.roles.#{@user.role}"))
= row(label: 'internal_user.activated', value: @user.activated?)
- if @user.codeharbor_link.nil?
= row(label: 'codeharbor_link.profile_label', value: @user.codeharbor_link.nil? ? link_to(t('codeharbor_link.new'), new_codeharbor_link_path, class: 'btn btn-secondary') : link_to(t('codeharbor_link.edit'), edit_codeharbor_link_path(@user.codeharbor_link), class: 'btn btn-secondary'))
= row(label: 'codeharbor_link.new', value: link_to(t('codeharbor_link.new'), codeharbor_link_new_path, class: 'btn btn-secondary'))
- else
= row(label: 'codeharbor_link.edit', value: link_to(t('codeharbor_link.edit'), edit_codeharbor_link_path(@user.codeharbor_link), class: 'btn btn-secondary'))
/ - if @user.codeharbor_link.nil?
/ = row(label: 'codeharbor_link.profile_label', value: link_to(t('codeharbor_link.new'), codeharbor_link_new_path, class: 'btn btn-secondary'))
/ - else
/ = row(label: 'codeharbor_link.profile_label', value: link_to(t('codeharbor_link.edit'), edit_codeharbor_link_path(@user.codeharbor_link), class: 'btn btn-secondary'))