27
27
</ head >
28
28
29
29
{% block body %}
30
- < body class ="{% block bodyclass %}{% endblock %} ">
31
- < div class ="wrapper ">
32
- {% block navbar %}
33
- < div class ="navbar navbar-static-top {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %} ">
34
- < div class ="container ">
35
- < span >
36
- {% block branding %}
37
- < a class ='navbar-brand ' rel ="nofollow " href ='https://www.django-rest-framework.org/ '>
38
- Django REST framework
39
- </ a >
40
- {% endblock %}
41
- </ span >
42
- < ul class ="nav navbar-nav pull-right ">
43
- {% block userlinks %}
44
- {% if user.is_authenticated %}
45
- {% optional_logout request user %}
46
- {% else %}
47
- {% optional_login request %}
48
- {% endif %}
49
- {% endblock %}
50
- </ ul >
51
- </ div >
52
- </ div >
53
- {% endblock %}
30
+ < body class ="{% block bodyclass %}{% endblock %} ">
54
31
32
+ < div class ="wrapper ">
33
+ {% block navbar %}
34
+ < div class ="navbar navbar-expand-md fixed-top {% block bootstrap_navbar_variant %}navbar-dark{% endblock %} "
35
+ role ="navigation " aria-label ="{% trans "navbar " %}">
55
36
< div class ="container ">
56
- {% block breadcrumbs %}
57
- < ul class ="breadcrumb ">
58
- {% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
59
- {% if forloop.last %}
60
- < li class ="active "> < a href ="{{ breadcrumb_url }} "> {{ breadcrumb_name }}</ a > </ li >
61
- {% else %}
62
- < li > < a href ="{{ breadcrumb_url }} "> {{ breadcrumb_name }}</ a > </ li >
63
- {% endif %}
64
- {% endfor %}
65
- </ ul >
66
- {% endblock %}
37
+ {% block branding %}
38
+ < a class ='navbar-brand ' rel ="nofollow " href ='https://www.django-rest-framework.org/ '>
39
+ Django REST framework
40
+ </ a >
41
+ {% endblock %}
42
+ < ul class ="navbar-nav ">
43
+ {% block userlinks %}
44
+ {% if user.is_authenticated %}
45
+ {% optional_logout request user %}
46
+ {% else %}
47
+ {% optional_login request %}
48
+ {% endif %}
49
+ {% endblock %}
50
+ </ ul >
51
+ </ div >
52
+ </ div >
53
+ {% endblock %}
54
+
55
+ < div class ="container ">
56
+ {% block breadcrumbs %}
57
+ < ul class ="breadcrumb ">
58
+ {% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
59
+ {% if forloop.last %}
60
+ < li class ="breadcrumb-item active "> < a href ="{{ breadcrumb_url }} "> {{ breadcrumb_name }}</ a > </ li >
61
+ {% else %}
62
+ < li class ="breadcrumb-item "> < a href ="{{ breadcrumb_url }} "> {{ breadcrumb_name }}</ a > </ li >
63
+ {% endif %}
64
+ {% empty %}
65
+ {% block breadcrumbs_empty %} {% endblock breadcrumbs_empty %}
66
+ {% endfor %}
67
+ </ ul >
68
+ {% endblock %}
67
69
68
70
<!-- Content -->
69
71
< div id ="content ">
70
72
{% if 'GET' in allowed_methods %}
71
- < form id ="get-form " class ="pull -right ">
73
+ < form id ="get-form " class ="float -right ">
72
74
< fieldset >
73
- < div class ="btn-group format-selection ">
75
+ < div class ="dropdown format-selection ">
74
76
< button class ="btn btn-primary dropdown-toggle " data-toggle ="dropdown ">
75
- Format < span class =" caret " > </ span >
77
+ Format
76
78
</ button >
77
79
< ul class ="dropdown-menu ">
78
80
{% for format in available_formats %}
79
81
< li >
80
- < a class ="format-option "
82
+ < a class ="dropdown-item "
81
83
href ='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %} '
82
84
rel ="nofollow ">
83
85
{{ format }}
92
94
93
95
{% if post_form %}
94
96
< button type ="button " class ="button-form btn btn-primary " data-toggle ="modal " data-target ="#createModal ">
95
- < span class ="glyphicon glyphicon-plus " aria-hidden ="true "> </ span > Create
97
+ < svg width ="1em " height ="1em " viewBox ="0 0 16 16 " class ="bi bi-file-plus mb-1 " fill ="currentColor " xmlns ="http://www.w3.org/2000/svg ">
98
+ < path fill-rule ="evenodd " d ="M4 1h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2zm0 1a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H4z "/>
99
+ < path fill-rule ="evenodd " d ="M8 5.5a.5.5 0 0 1 .5.5v1.5H10a.5.5 0 0 1 0 1H8.5V10a.5.5 0 0 1-1 0V8.5H6a.5.5 0 0 1 0-1h1.5V6a.5.5 0 0 1 .5-.5z "/>
100
+ </ svg >
101
+ Create
96
102
</ button >
97
103
{% endif %}
98
104
99
105
{% if put_form %}
100
106
< button type ="button " class ="button-form btn btn-primary " data-toggle ="modal " data-target ="#editModal ">
101
- < span class ="glyphicon glyphicon-pencil " aria-hidden ="true "> </ span > Edit
107
+ < svg width ="1em " height ="1em " viewBox ="0 0 16 16 " class ="bi bi-pencil mb-1 " fill ="currentColor " xmlns ="http://www.w3.org/2000/svg ">
108
+ < path fill-rule ="evenodd " d ="M11.293 1.293a1 1 0 0 1 1.414 0l2 2a1 1 0 0 1 0 1.414l-9 9a1 1 0 0 1-.39.242l-3 1a1 1 0 0 1-1.266-1.265l1-3a1 1 0 0 1 .242-.391l9-9zM12 2l2 2-9 9-3 1 1-3 9-9z "/>
109
+ < path fill-rule ="evenodd " d ="M12.146 6.354l-2.5-2.5.708-.708 2.5 2.5-.707.708zM3 10v.5a.5.5 0 0 0 .5.5H4v.5a.5.5 0 0 0 .5.5H5v.5a.5.5 0 0 0 .5.5H6v-1.5a.5.5 0 0 0-.5-.5H5v-.5a.5.5 0 0 0-.5-.5H3z "/>
110
+ </ svg >
111
+ Edit
102
112
</ button >
103
113
{% endif %}
104
114
105
115
{% if delete_form %}
106
116
< form class ="button-form " action ="{{ request.get_full_path }} " data-method ="DELETE ">
107
117
< button class ="btn btn-danger ">
108
- < span class ="glyphicon glyphicon-remove " aria-hidden ="true "> </ span > Delete
118
+ < svg width ="1em " height ="1em " viewBox ="0 0 16 16 " class ="bi bi-file-minus mb-1 " fill ="currentColor " xmlns ="http://www.w3.org/2000/svg ">
119
+ < path fill-rule ="evenodd " d ="M4 1h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2zm0 1a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H4z "/>
120
+ < path fill-rule ="evenodd " d ="M5.5 8a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1H6a.5.5 0 0 1-.5-.5z "/>
121
+ </ svg >
122
+ Delete
109
123
</ button >
110
124
</ form >
111
125
{% endif %}
112
126
113
127
{% if extra_actions %}
114
128
< div class ="dropdown " style ="float: right; margin-right: 10px ">
115
- < button class ="btn btn-default " id ="extra-actions-menu " data-toggle ="dropdown " aria-haspopup ="true " aria-expanded ="true ">
129
+ < button class ="btn btn-info dropdown-toggle " id ="extra-actions-menu " data-toggle ="dropdown " aria-haspopup ="true " aria-expanded ="true ">
116
130
{% trans "Extra Actions" %}
117
- < span class ="caret "> </ span >
118
131
</ button >
119
132
< ul class ="dropdown-menu " aria-labelledby ="extra-actions-menu ">
120
133
{% for action_name, url in extra_actions|items %}
121
- < li > < a href ="{{ url }} "> {{ action_name }}</ a > </ li >
134
+ < li > < a class =" dropdown-item " href ="{{ url }} "> {{ action_name }}</ a > </ li >
122
135
{% endfor %}
123
136
</ ul >
124
137
</ div >
125
138
{% endif %}
126
139
127
140
{% if filter_form %}
128
- < button style ="float: right; margin-right: 10px " data-toggle ="modal " data-target ="#filtersModal " class ="btn btn-default ">
129
- < span class ="glyphicon glyphicon-wrench " aria-hidden ="true "> </ span >
141
+ < button data-toggle ="modal " data-target ="#filtersModal " class ="btn btn-outline-secondary button-form ">
142
+ < svg width ="1em " height ="1em " viewBox ="0 0 16 16 " class ="bi bi-wrench mb-1 " fill ="currentColor " xmlns ="http://www.w3.org/2000/svg ">
143
+ < path fill-rule ="evenodd " d ="M.102 2.223A3.004 3.004 0 0 0 3.78 5.897l6.341 6.252A3.003 3.003 0 0 0 13 16a3 3 0 1 0-.851-5.878L5.897 3.781A3.004 3.004 0 0 0 2.223.1l2.141 2.142L4 4l-1.757.364L.102 2.223zm13.37 9.019L13 11l-.471.242-.529.026-.287.445-.445.287-.026.529L11 13l.242.471.026.529.445.287.287.445.529.026L13 15l.471-.242.529-.026.287-.445.445-.287.026-.529L15 13l-.242-.471-.026-.529-.445-.287-.287-.445-.529-.026z "/>
144
+ </ svg >
130
145
{% trans "Filters" %}
131
146
</ button >
132
147
{% endif %}
133
148
134
149
< div class ="content-main ">
135
- < div class ="page-header ">
150
+ < div class ="page-header mt-3 ">
136
151
< h1 > {{ name }}</ h1 >
137
152
</ div >
138
153
@@ -172,8 +187,8 @@ <h1>{{ name }}</h1>
172
187
< div class ="modal-dialog ">
173
188
< div class ="modal-content ">
174
189
< div class ="modal-header ">
175
- < button type ="button " class ="close " data-dismiss ="modal " aria-label ="Close "> < span aria-hidden ="true "> ×</ span > </ button >
176
190
< h4 class ="modal-title " id ="myModalLabel "> Create</ h4 >
191
+ < button type ="button " class ="close " data-dismiss ="modal " aria-label ="Close "> < span aria-hidden ="true "> ×</ span > </ button >
177
192
</ div >
178
193
< form action ="{{ request.get_full_path }} " method ="POST " enctype ="multipart/form-data " class ="form-horizontal " novalidate >
179
194
< div class ="modal-body ">
@@ -183,7 +198,7 @@ <h4 class="modal-title" id="myModalLabel">Create</h4>
183
198
</ fieldset >
184
199
</ div >
185
200
< div class ="modal-footer ">
186
- < button type ="button " class ="btn btn-default " data-dismiss ="modal "> Close</ button >
201
+ < button type ="button " class ="btn btn-secondary " data-dismiss ="modal "> Close</ button >
187
202
< button type ="submit " class ="btn btn-primary "> Save</ button >
188
203
</ div >
189
204
</ form >
@@ -196,8 +211,8 @@ <h4 class="modal-title" id="myModalLabel">Create</h4>
196
211
< div class ="modal-dialog ">
197
212
< div class ="modal-content ">
198
213
< div class ="modal-header ">
199
- < button type ="button " class ="close " data-dismiss ="modal " aria-label ="Close "> < span aria-hidden ="true "> ×</ span > </ button >
200
214
< h4 class ="modal-title " id ="myModalLabel "> Edit</ h4 >
215
+ < button type ="button " class ="close " data-dismiss ="modal " aria-label ="Close "> < span aria-hidden ="true "> ×</ span > </ button >
201
216
</ div >
202
217
< form action ="{{ request.get_full_path }} " data-method ="PUT " enctype ="multipart/form-data " class ="form-horizontal " novalidate >
203
218
< div class ="modal-body ">
@@ -206,7 +221,7 @@ <h4 class="modal-title" id="myModalLabel">Edit</h4>
206
221
</ fieldset >
207
222
</ div >
208
223
< div class ="modal-footer ">
209
- < button type ="button " class ="btn btn-default " data-dismiss ="modal "> Close</ button >
224
+ < button type ="button " class ="btn btn-secondary " data-dismiss ="modal "> Close</ button >
210
225
< button type ="submit " class ="btn btn-primary "> Save</ button >
211
226
</ div >
212
227
</ form >
@@ -220,8 +235,8 @@ <h4 class="modal-title" id="myModalLabel">Edit</h4>
220
235
< div class ="modal-dialog ">
221
236
< div class ="modal-content ">
222
237
< div class ="modal-header ">
223
- < button type ="button " class ="close " data-dismiss ="modal " aria-label ="Close "> < span aria-hidden ="true "> ×</ span > </ button >
224
238
< h4 class ="modal-title " id ="myModalLabel "> {{ error_title }}</ h4 >
239
+ < button type ="button " class ="close " data-dismiss ="modal " aria-label ="Close "> < span aria-hidden ="true "> ×</ span > </ button >
225
240
</ div >
226
241
< form action ="{{ request.get_full_path }} " data-method ="{{ request.method }} " enctype ="multipart/form-data " class ="form-horizontal " novalidate >
227
242
< div class ="modal-body ">
@@ -230,7 +245,7 @@ <h4 class="modal-title" id="myModalLabel">{{ error_title }}</h4>
230
245
</ fieldset >
231
246
</ div >
232
247
< div class ="modal-footer ">
233
- < button type ="button " class ="btn btn-default " data-dismiss ="modal "> Close</ button >
248
+ < button type ="button " class ="btn btn-secondary " data-dismiss ="modal "> Close</ button >
234
249
< button type ="submit " class ="btn btn-primary "> Save</ button >
235
250
</ div >
236
251
</ form >
@@ -253,6 +268,7 @@ <h4 class="modal-title" id="myModalLabel">{{ error_title }}</h4>
253
268
< script src ="{% static "rest_framework /js/jquery-3.5.1.min.js" %}"> </ script >
254
269
< script src ="{% static "rest_framework /js/ajax-form.js" %}"> </ script >
255
270
< script src ="{% static "rest_framework /js/csrf.js" %}"> </ script >
271
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/umd/popper.min.js "
integrity ="
sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo "
crossorigin ="
anonymous "
> </ script >
256
272
< script src ="{% static "rest_framework /js/bootstrap.min.js" %}"> </ script >
257
273
< script src ="{% static "rest_framework /js/prettify-min.js" %}"> </ script >
258
274
< script src ="{% static "rest_framework /js/default.js" %}"> </ script >
0 commit comments