Skip to content

Commit 6bf41ec

Browse files
authored
Add org apps to admin template (#17904)
1 parent 93e7ce0 commit 6bf41ec

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

warehouse/admin/templates/admin/users/detail.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ <h5 class="widget-user-desc text-center">{{ user.name }}</h5>
100100
Projects - Total Owned Size <span class="float-right badge bg-success">{{ user_projects | selectattr("role_name", "equalto", "Owner") | sum(attribute="total_size") | filesizeformat(binary=True) }}</span>
101101
</a>
102102
</li>
103+
<li class="nav-item">
104+
<a href="#organizations" class="nav-link">
105+
Organizations <span class="float-right badge bg-info">{{ user.organizations | length }}</span>
106+
</a>
107+
</li>
108+
<li class="nav-item">
109+
<a href="#orgapps" class="nav-link">
110+
Org Applications <span class="float-right badge bg-info">{{ user.organization_applications | length }}</span>
111+
</a>
112+
</li>
103113
</ul>
104114
</div>
105115

@@ -837,6 +847,32 @@ <h3 class="card-title">Organizations</h3>
837847
</div> <!-- .card -->
838848
{% endif %}
839849

850+
{% if user.organization_applications %}
851+
<div class="card">
852+
<div class="card-header with-border">
853+
<h3 class="card-title">Organization Applications</h3>
854+
</div>
855+
856+
<div class="card-body">
857+
<table class="table table-hover" id="orgapps">
858+
<thead>
859+
<tr>
860+
<th>Organization Application Name</th>
861+
</tr>
862+
</thead>
863+
<tbody>
864+
{% for application in user.organization_applications %}
865+
<tr>
866+
<td><a href="{{ request.route_path('admin.organization_application.detail', organization_application_id=application.id) }}">{{ application.name }}</a></td>
867+
</tr>
868+
{% endfor %}
869+
</tbody>
870+
</table>
871+
</div>
872+
</div> <!-- .card -->
873+
{% endif %}
874+
875+
840876
<div class="card">
841877
<div class="card-header with-border">
842878
<h3 class="card-title">Pending OpenID Connect Publishers</h3>

0 commit comments

Comments
 (0)