From f7e011919e8819e0d706f15eab87b84fce6fd3c7 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 13 Apr 2020 06:41:43 +0200 Subject: Fix account aliases page (#13452) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix error not being displayed when adding an account alias, add error for self-references Co-Authored-By: Mélanie Chauvel (ariasuni) * Add “You have no aliases.” note in confusing empty aliases table Co-Authored-By: Mélanie Chauvel (ariasuni) Co-authored-by: Mélanie Chauvel (ariasuni) --- app/views/settings/aliases/index.html.haml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/settings/aliases/index.html.haml b/app/views/settings/aliases/index.html.haml index 5b6986368..5df0c9669 100644 --- a/app/views/settings/aliases/index.html.haml +++ b/app/views/settings/aliases/index.html.haml @@ -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 } -- cgit