Skip to content

Commit

Permalink
chg: [website] For admin view of users, replaced url_for(...) with re…
Browse files Browse the repository at this point in the history
…quest.url in order to preserve existing parameters from the URL.
  • Loading branch information
cedricbonhomme committed Oct 3, 2024
1 parent ff908e5 commit 1fe3a6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions website/web/templates/admin/template_responsive_table_users.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<th>id</th>
<th>Login</th>
<th>Email address</th>
<th><a style="text-decoration:underline dotted" href="{{ url_for('admin_bp.list_users') | update_query(sort='organisation') }}">Organisation</a></th>
<th><a style="text-decoration:underline dotted" href="{{ request.url | update_query(sort='organisation') }}">Organisation</a></th>
<th>Country</th>
<th>Permissions</th>
<th>State</th>
<th><a style="text-decoration:underline dotted" href="{{ url_for('admin_bp.list_users') | update_query(sort='member_since') }}">Member since</a></th>
<th><a style="text-decoration:underline dotted" href="{{ url_for('admin_bp.list_users') | update_query(sort='last_seen') }}">Last seen</a></th>
<th><a style="text-decoration:underline dotted" href="{{ request.url | update_query(sort='member_since') }}">Member since</a></th>
<th><a style="text-decoration:underline dotted" href="{{ request.url | update_query(sort='last_seen') }}">Last seen</a></th>
<th>Actions</th>
</tr>
</thead>
Expand All @@ -22,11 +22,11 @@
<th scope="row">{{ user.id }}</th>
<td><a href="{{ url_for('user_bp.profile', login=user.login) }}">{{ user.login }}</a></td>
<td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td>
<td><a href="{{ url_for('admin_bp.list_users') | update_query(organisation=user.organisation) }}">{{ user.organisation }}</a></td>
<td><a href="{{ url_for('admin_bp.list_users') | update_query(country=user.country_code) }}">{{ user.country_code }}</a></td>
<td><a href="{{ request.url | update_query(organisation=user.organisation) }}">{{ user.organisation }}</a></td>
<td><a href="{{ request.url | update_query(country=user.country_code) }}">{{ user.country_code }}</a></td>
<td>
{% for permission in user.permissions() %}
<a href="{{ url_for('admin_bp.list_users') | update_query(permission=permission) }}">{{ permission }}</a>
<a href="{{ request.url | update_query(permission=permission) }}">{{ permission }}</a>
{% endfor %}
</td>
<td>
Expand Down

0 comments on commit 1fe3a6a

Please sign in to comment.