FEATURE: improve "blank page syndrome" on the user bookmarks page (PR #14093)

Some time ago, we made the bookmarks panel on the user menu look like this when a user doesn’t have bookmarks yet: Screenshot 2021-08-19 at 20 40 57

Now we want to use the same design on the user bookmarks page:

There’ll be further discussion about design of this page, we’ll probably adjust styles a bit.

From technical point of view, the change is not very straight forward because there exist several reasons why the bookmarks page can contain an empty list of bookmarks:

  1. A user may have no bookmarks yet (the case we’re handling in this PR)
  2. A user may try to look at bookmarks of another user and don’t have permissions for doing that
  3. A user may enter a search query that doesn’t return results

This PR:

  1. Rework the template and the controller to make handling these different cases explicit and straight forward
  2. Suppress the search box on the bookmarks page when user doesn’t have bookmarks
  3. Make the page show a new design when user doesn’t have bookmarks

Also, this PR fixes a little bug. When a user had bookmarks, the message “You have no bookmarked posts” appeared for a while when loading the page:

It’s fixed now:

GitHub