CiviWiki/OpenCiviWiki

Add "Civis" tab to the user profile view

brylie opened this issue · 10 comments

We recently removed some features from the user Profile view and now want to reimplement them using only Django.

This task will be to add a "Civis" tab to the user profile view. The tab should link to a sub-path of the user profile so it is clear to the viewer that they are viewing Civis related to the user.

Task

All of these tasks should be done in the accounts app.

  • create a Django view called UserCivis (in accounts/views.py)
  • create a URL definition profile/<str:username>/civis that renders the UserCivis view ( in accounts/urls.py)
  • ensure the UserCivis view context contains a list of Civis created by the relevant user (given via the username in the URL)
  • create a template to render the user civis - for now, extending base.html so we have consistent branding (in accounts/templates/accounts/user_civis.html)

Hi, I would be interested in taking this on. Do you think this could be done in two weeks or less?

I believe it could be managed in a weekend, with focused effort.

Appreciate this was assigned yesterday, but if @smhavens doesn't get it done in their needed timeframe, would be keen to have a go.

Let's check back in a couple of days.

Hi everyone, i would like to help with this issue if is necessary

Unfortunately I won't be able to continue working on this. Feel free to assign to anyone else.

Hi, I'm willing to take this on with @riajots @rbatchu2 and @FredKhayat, and we can finish it within the next few days

To clarify, what's the difference between accounts/templates/accounts/user_civis.html and accounts/templates/accounts/partials/user_civis.html? Are we supposed to create a new accounts/templates/accounts/user_civis.html or stick with the one in partials?

The partials/user_civis.html contains leftover code from our Backbone.js migration. For now, use the templates/accounts/user_civis.html to render the User Civis.

The recent PR is the one that I worked on with the other people I mentioned!