Skip to content

Commit 1f52d09

Browse files
feat: display friendly deleted at for merchants in public and admin views
1 parent f37cb2c commit 1f52d09

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

app/views/admin/merchants/_merchant.html.slim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ tr
3939
td
4040
.status.status-lg> class=(merchant.deleted? ? 'status-error' : 'status-success') aria-label="status"
4141
- if merchant.deleted?
42-
| Désactivé
42+
span.tooltip data-tip=l(merchant.deleted_at) Désactivé
4343
- else
4444
| En ligne
4545

4646
td class=('text-center' if merchant.updated?)
47-
p title=Merchant.human_attribute_name(:created_at)
47+
p.tooltip data-tip=Merchant.human_attribute_name(:created_at)
4848
= l(merchant.created_at)
4949

5050
- if merchant.updated?
5151
= lucide_icon 'move-left', class: 'mx-auto w-5 h-5 -rotate-90 bg-primary text-primary-content rounded-full my-2 p-1'
5252

53-
p title=Merchant.human_attribute_name(:updated_at)
53+
p.tooltip data-tip=Merchant.human_attribute_name(:updated_at)
5454
= l(merchant.updated_at)
5555

5656
td

app/views/merchants/show.html+banner.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ article
2828
- if @merchant.deleted?
2929
p.alert.alert-error
3030
= lucide_icon 'info', class: 'inline-flex w-4 h-4'
31-
span=< t('.soft_deleted_warning')
31+
span=< t('.soft_deleted_warning', date: l(@merchant.deleted_at.to_date))
3232

3333
- if @merchant.might_be_outdated?
3434
p.alert.alert-warning

app/views/merchants/show.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- if @merchant.deleted?
99
p.alert.alert-error
1010
= lucide_icon 'info', class: 'inline-flex w-4 h-4'
11-
span=< t('.soft_deleted_warning')
11+
span=< t('.soft_deleted_warning', date: l(@merchant.deleted_at.to_date))
1212

1313
- if @merchant.might_be_outdated?
1414
p.alert.alert-warning

config/locales/en/pages.en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ en:
276276
itinerary_title: Itinerary
277277
last_survey_warning_html: This merchant has not been verified since <span title="%{raw_date}">%{date}</span>. The information provided may no longer match.
278278
view_on_osm: View on OpenStreetMap
279-
soft_deleted_warning: This merchant was marked as a pre-suppressed. It will no longer come out in the search results as long as it has not been reactivated or deleted definitively.
279+
soft_deleted_warning: This merchant was marked as a pre-suppressed on %{date}. It will no longer come out in the search results as long as it has not been reactivated or deleted definitively.
280280
alert: This merchant is not available and has been marked as pre-deleted.
281281

282282
share_by_email:

config/locales/fr/pages.fr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ fr:
276276
itinerary_title: Itinéraire
277277
last_survey_warning_html: Ce commerçant n'a pas été vérifié depuis <span title="%{raw_date}">%{date}</span>. Les informations indiquées peuvent ne plus correspondre.
278278
view_on_osm: Ouvrir sur OpenStreetMap
279-
soft_deleted_warning: Ce commerçant a été marqué comme pré-supprimé. Il ne ressortira plus dans les résultats de recherche tant qu'il n'aura pas été réactivé ou supprimé définitivement.
279+
soft_deleted_warning: Ce commerçant a été marqué comme pré-supprimé le %{date}. Il ne ressortira plus dans les résultats de recherche tant qu'il n'aura pas été réactivé ou supprimé définitivement.
280280
alert: Ce commerçant n'est plus accessible car il a été marqué comme pré-supprimé.
281281

282282
share_by_email:

0 commit comments

Comments
 (0)