Skip to content

Commit 2beb44e

Browse files
authored
fix content overflow for node page (#11182)
## Purpose fix content overflow on the node admin page ## Ticket https://openscience.atlassian.net/browse/ENG-8063
1 parent ffaef7a commit 2beb44e

File tree

2 files changed

+51
-49
lines changed

2 files changed

+51
-49
lines changed

admin/templates/nodes/contributors.html

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,60 @@
33
<tr>
44
<td>Contributors</td>
55
<td>
6-
<table class="table table-bordered table-hover">
7-
<thead>
8-
<tr>
9-
<td>Email</td>
10-
<td>Name</td>
11-
<td>Permissions</td>
12-
<td>Actions</td>
13-
{% if perms.osf.change_node %}
14-
<td></td>
15-
{% endif %}
16-
</tr>
17-
</thead>
18-
<tbody>
19-
{% for user in node.contributors %}
6+
<div style="overflow-x: auto; width: 100%;">
7+
<table class="table table-bordered table-hover">
8+
<thead>
209
<tr>
21-
<td>
22-
<a href="{{ user | reverse_user }}">
23-
{{ user }}
24-
</a>
25-
</td>
26-
<td>{{ user.fullname }}</td>
27-
<td>{% get_permissions user node %}</td>
10+
<td>Email</td>
11+
<td>Name</td>
12+
<td>Permissions</td>
13+
<td>Actions</td>
2814
{% if perms.osf.change_node %}
15+
<td></td>
16+
{% endif %}
17+
</tr>
18+
</thead>
19+
<tbody>
20+
{% for user in node.contributors %}
21+
<tr>
2922
<td>
30-
<a data-toggle="modal" data-target="#{{ user.id }}Modal" class="btn btn-danger">Remove</a>
31-
<div class="modal" id="{{ user.id }}Modal">
32-
<div class="modal-dialog">
33-
<div class="modal-content">
34-
<form class="well" method="post" action="{% url 'nodes:remove-user' guid=node.guid user_id=user.id %}">
35-
<div class="modal-header">
36-
<button type="button" class="close" data-dismiss="modal">x</button>
37-
<h3>Removing contributor: {{ user.username }}</h3>
38-
</div>
39-
<div class="modal-body">
40-
User will be removed. Currently only an admin on this node type will be able to add them back.
41-
{% csrf_token %}
42-
</div>
43-
<div class="modal-footer">
44-
<input class="btn btn-danger" type="submit" value="Confirm" />
45-
<button type="button" class="btn btn-default" data-dismiss="modal">
46-
Cancel
47-
</button>
48-
</div>
49-
</form>
23+
<a href="{{ user | reverse_user }}">
24+
{{ user }}
25+
</a>
26+
</td>
27+
<td>{{ user.fullname }}</td>
28+
<td>{% get_permissions user node %}</td>
29+
{% if perms.osf.change_node %}
30+
<td>
31+
<a data-toggle="modal" data-target="#{{ user.id }}Modal" class="btn btn-danger">Remove</a>
32+
<div class="modal" id="{{ user.id }}Modal">
33+
<div class="modal-dialog">
34+
<div class="modal-content">
35+
<form class="well" method="post" action="{% url 'nodes:remove-user' guid=node.guid user_id=user.id %}">
36+
<div class="modal-header">
37+
<button type="button" class="close" data-dismiss="modal">x</button>
38+
<h3>Removing contributor: {{ user.username }}</h3>
39+
</div>
40+
<div class="modal-body">
41+
User will be removed. Currently only an admin on this node type will be able to add them back.
42+
{% csrf_token %}
43+
</div>
44+
<div class="modal-footer">
45+
<input class="btn btn-danger" type="submit" value="Confirm" />
46+
<button type="button" class="btn btn-default" data-dismiss="modal">
47+
Cancel
48+
</button>
49+
</div>
50+
</form>
51+
</div>
5052
</div>
5153
</div>
52-
</div>
53-
</td>
54-
{% endif %}
55-
</tr>
56-
{% endfor %}
57-
</tbody>
58-
</table>
54+
</td>
55+
{% endif %}
56+
</tr>
57+
{% endfor %}
58+
</tbody>
59+
</table>
60+
</div>
5961
</td>
6062
</tr>

admin/templates/nodes/node.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div>
2828
</div>
2929
</div>
30-
<div class="row">
30+
<div class="row" style="overflow-x: auto; width: 100%;">
3131
<h2>{{ node.type|cut:'osf.'|title }}: <b>{{ node.title }}</b> <a href="{{ node.absolute_url }}"> ({{node.guid}})</a> </h2>
3232
<table class="table table-striped">
3333
<thead>

0 commit comments

Comments
 (0)