retrospring/app/views/shared/_userbox.haml
Georg Gadinger 66efa5d4f4 clean up routes
- replace `match` with `get`/`post`/`patch`/`delete`
- format routes.rb
- rename the `show_user_{profile,question,answer}` routes to
  `profile`, `question`, `answer` so `url_for` (used by Rails Admin)
  works fine for these things
- also add `to_param` to the `User` model so that `url_for(some_user)`
  uses the user name
2022-07-23 12:14:06 +02:00

12 lines
449 B
Text

- type ||= :nil
.card.h-100.userbox
%img.userbox__header{ src: user.profile_header.url(:mobile) }
.card-body
%img.userbox__avatar{ src: user.profile_picture.url(:small) }
%a.profile__name{ href: user_path(user) }
- unless user.profile.display_name.blank?
.profile__display-name
= user.profile.display_name
.profile__screen-name
= user.screen_name
= render 'user/actions', user: user, type: type