-
Notifications
You must be signed in to change notification settings - Fork 1k
Add sole owner badge on lists of projects #4970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…oo/warehouse into 3127-sole-owner-badge
warehouse/manage/views.py
Outdated
|
||
return { | ||
"projects_owned": request.db.query(projects_owned).all(), | ||
"projects_sole_owned": request.db.query(Project) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, can you reformat this line to be:
"projects_sole_owned": (
request.db.query(Project).join(with_sole_owner).order_by(Project.name).all()
),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
<h3 class="package-snippet__title">{{ project.name }}</h3> | ||
<h3 class="package-snippet__title">{{ project.name }} | ||
{% if project.name in projects_sole_owned %} | ||
<span class="badge package-snippet__sole-owner-badge">Sole owner</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you wrap this in a link to the collaboration management page?
<a href="{{ request.route_path('manage.project.roles', project_name=project.normalized_name) }}">
<span class="badge package-snippet__sole-owner-badge">Sole owner</span>
</a>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Thanks @rupali-saboo! |
Fixes #3127, closes #4396.
Changes:
This is built on top of @gabrielgradinaru PR: #4396