Fix account aliases page (#13452)

* Fix error not being displayed when adding an account alias, add error for self-references

Co-Authored-By: Mélanie Chauvel (ariasuni) <perso@hack-libre.org>

* Add “You have no aliases.” note in confusing empty aliases table

Co-Authored-By: Mélanie Chauvel (ariasuni) <perso@hack-libre.org>

Co-authored-by: Mélanie Chauvel (ariasuni) <perso@hack-libre.org>
This commit is contained in:
ThibG
2020-04-13 06:41:43 +02:00
committed by GitHub
parent 490ff09c5a
commit f7e011919e
3 changed files with 17 additions and 3 deletions

View File

@ -23,7 +23,11 @@
%th= t('simple_form.labels.account_alias.acct')
%th
%tbody
- @aliases.each do |account_alias|
- if @aliases.empty?
%tr
%td= account_alias.acct
%td= table_link_to 'trash', t('aliases.remove'), settings_alias_path(account_alias), data: { method: :delete }
%td.muted-hint{ colspan: 2 }= t('aliases.empty')
- else
- @aliases.each do |account_alias|
%tr
%td= account_alias.acct
%td= table_link_to 'trash', t('aliases.remove'), settings_alias_path(account_alias), data: { method: :delete }