Skip to content

[ENG-8063] Registrations in admin tables sometimes go out of the frame of the browser window #11182

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

Open
wants to merge 1 commit into
base: feature/pbs-25-10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 50 additions & 48 deletions admin/templates/nodes/contributors.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,60 @@
<tr>
<td>Contributors</td>
<td>
<table class="table table-bordered table-hover">
<thead>
<tr>
<td>Email</td>
<td>Name</td>
<td>Permissions</td>
<td>Actions</td>
{% if perms.osf.change_node %}
<td></td>
{% endif %}
</tr>
</thead>
<tbody>
{% for user in node.contributors %}
<div style="overflow-x: auto; width: 100%;">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td>
<a href="{{ user | reverse_user }}">
{{ user }}
</a>
</td>
<td>{{ user.fullname }}</td>
<td>{% get_permissions user node %}</td>
<td>Email</td>
<td>Name</td>
<td>Permissions</td>
<td>Actions</td>
{% if perms.osf.change_node %}
<td></td>
{% endif %}
</tr>
</thead>
<tbody>
{% for user in node.contributors %}
<tr>
<td>
<a data-toggle="modal" data-target="#{{ user.id }}Modal" class="btn btn-danger">Remove</a>
<div class="modal" id="{{ user.id }}Modal">
<div class="modal-dialog">
<div class="modal-content">
<form class="well" method="post" action="{% url 'nodes:remove-user' guid=node.guid user_id=user.id %}">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3>Removing contributor: {{ user.username }}</h3>
</div>
<div class="modal-body">
User will be removed. Currently only an admin on this node type will be able to add them back.
{% csrf_token %}
</div>
<div class="modal-footer">
<input class="btn btn-danger" type="submit" value="Confirm" />
<button type="button" class="btn btn-default" data-dismiss="modal">
Cancel
</button>
</div>
</form>
<a href="{{ user | reverse_user }}">
{{ user }}
</a>
</td>
<td>{{ user.fullname }}</td>
<td>{% get_permissions user node %}</td>
{% if perms.osf.change_node %}
<td>
<a data-toggle="modal" data-target="#{{ user.id }}Modal" class="btn btn-danger">Remove</a>
<div class="modal" id="{{ user.id }}Modal">
<div class="modal-dialog">
<div class="modal-content">
<form class="well" method="post" action="{% url 'nodes:remove-user' guid=node.guid user_id=user.id %}">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3>Removing contributor: {{ user.username }}</h3>
</div>
<div class="modal-body">
User will be removed. Currently only an admin on this node type will be able to add them back.
{% csrf_token %}
</div>
<div class="modal-footer">
<input class="btn btn-danger" type="submit" value="Confirm" />
<button type="button" class="btn btn-default" data-dismiss="modal">
Cancel
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</td>
</tr>
2 changes: 1 addition & 1 deletion admin/templates/nodes/node.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>
</div>
</div>
<div class="row">
<div class="row" style="overflow-x: auto; width: 100%;">
<h2>{{ node.type|cut:'osf.'|title }}: <b>{{ node.title }}</b> <a href="{{ node.absolute_url }}"> ({{node.guid}})</a> </h2>
<table class="table table-striped">
<thead>
Expand Down
Loading