style(attachment): delete button replaces bullet when user can download + destroy

This commit is contained in:
Colin Darie 2022-12-06 11:42:12 +01:00
parent 5b20713893
commit 182bfcd3e3
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
3 changed files with 9 additions and 1 deletions

View file

@ -43,3 +43,10 @@
top: -1rem;
}
}
.attachment-multiple.fr-downloads-group.destroyable {
ul {
list-style-type: none;
padding-inline-start: 0;
}
}

View file

@ -10,6 +10,7 @@ class Attachment::MultipleComponent < ApplicationComponent
attr_reader :form_object_name
attr_reader :max
attr_reader :user_can_destroy
alias user_can_destroy? user_can_destroy
attr_reader :user_can_download
alias user_can_download? user_can_download

View file

@ -1,4 +1,4 @@
.fr-mb-4w.attachment-multiple{ class: class_names("fr-downloads-group": user_can_download?) }
.fr-mb-4w.attachment-multiple{ class: class_names("fr-downloads-group": user_can_download?, "destroyable": user_can_destroy?) }
= template
%ul