aa-structures 2.17.0__py3-none-any.whl → 3.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,12 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: aa-structures
3
- Version: 2.17.0
3
+ Version: 3.0.1
4
4
  Summary: App for managing Eve Online structures with Alliance Auth.
5
5
  Author-email: Erik Kalkoken <kalkoken87@gmail.com>
6
6
  Requires-Python: >=3.8
7
7
  Description-Content-Type: text/markdown
8
8
  Classifier: Environment :: Web Environment
9
9
  Classifier: Framework :: Django
10
- Classifier: Framework :: Django :: 4.0
11
10
  Classifier: Framework :: Django :: 4.2
12
11
  Classifier: Intended Audience :: End Users/Desktop
13
12
  Classifier: License :: OSI Approved :: MIT License
@@ -17,10 +16,12 @@ Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Topic :: Internet :: WWW/HTTP
21
21
  Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
22
- Requires-Dist: allianceauth-app-utils>=1.22
23
- Requires-Dist: allianceauth>=3.0
22
+ License-File: LICENSE
23
+ Requires-Dist: allianceauth-app-utils>=1.26
24
+ Requires-Dist: allianceauth>=4,<5
24
25
  Requires-Dist: dhooks-lite>=1.0
25
26
  Requires-Dist: django-eveuniverse>=1.5.2
26
27
  Requires-Dist: django-multiselectfield
@@ -1,11 +1,11 @@
1
- structures/__init__.py,sha256=IHFQy-PBTGawZQIDMVt3La5YoH6pK9dlDO5jvrQQph4,204
1
+ structures/__init__.py,sha256=IL7XpCaDfbWxPI8lPbABfS7iBnvgjzCyOJhmV1bGUFI,203
2
2
  structures/admin.py,sha256=K7wh8mHFfGHONn7oLdqXsBAxq0rmYrwbZ7S3uIOuMtg,41303
3
3
  structures/app_settings.py,sha256=aWA2bTcv_vVwIyisx-G7GBSpfM6JDyt2MWcXKtHnjK0,6651
4
4
  structures/apps.py,sha256=MNZH9l3qWCwuS7OGiKGkBVrDzKoOFlqwDdEgyEFzxVA,195
5
5
  structures/auth_hooks.py,sha256=nRbrixFkAE5gphDokB1E8xhH8FY2VtXVwu0XMmSGBAw,1013
6
6
  structures/constants.py,sha256=k5rfD29ZjR7ToRmJw4WnLVd4LmoZvDw4OK5IoiiyJ6w,1063
7
7
  structures/forms.py,sha256=kXs-SGIIj-D9xtFCILKe_PMRU4eHl3-HLNWRhaZKmnQ,391
8
- structures/helpers.py,sha256=_dw7j7yobpcV70VwWxoQiptk69b3ksvaDlRQKHg8Kmg,2344
8
+ structures/helpers.py,sha256=iadnXcpkHrWciB9snTHyc2bfxk3Hd5Xj1hKshOpvTJU,2542
9
9
  structures/managers.py,sha256=_XZhsWb4is7LpQTUmGZwxQeJzyZnsB3n21EETgEIlzU,20062
10
10
  structures/providers.py,sha256=9QYHd8X5HwBhrbgbX3LUrXXV1KGM3hFhcxK6qIJjJtg,317
11
11
  structures/tasks.py,sha256=INZ3soMYHYfxrQsyTO-ozoxbVX6lpMnF3AUo8ybWIoA,9083
@@ -13,7 +13,7 @@ structures/urls.py,sha256=An5v27AD_NXMNL66cMVtQNci1C_Aqry32rrvDkMpgYo,1467
13
13
  structures/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  structures/core/notification_timers.py,sha256=KLjkVrlCCKTWtHJNUfI3U6ppAIZN8vPnIx1zCafRkKQ,16748
15
15
  structures/core/notification_types.py,sha256=AMelkzBgOVcXKQauHEjBkcu5iFcLx6R_e9kXLBasbrs,13676
16
- structures/core/serializers.py,sha256=4W6kA7mhVvc-1OSiTl_w0rSio_HUsjIBm9qbkEr9vCY,20965
16
+ structures/core/serializers.py,sha256=qBkDP-gOU4t-Ew_pyjok31T3k7CAJEFSp2WohmlQAik,21082
17
17
  structures/core/sovereignty.py,sha256=XKgjAFO4BfLpEEUz_hBr2DVDnvWBq9sL9EEQiT4T0n0,730
18
18
  structures/core/starbases.py,sha256=nw7skHYATrnAV-zuPAuxmhM5E4Aqjc_DHSU2TYWgBng,1757
19
19
  structures/core/notification_embeds/__init__.py,sha256=30cpjKLZ5_OFtXDACDcjvWQAYszM2BrYxUYb5PRQoTA,131
@@ -67,7 +67,7 @@ structures/models/__init__.py,sha256=Da0-Z4BtsZ_mlnI6XtyvoE0UtTuOA0psGCuVhVPVKrM
67
67
  structures/models/eveuniverse.py,sha256=vTIfzZL9guEDuZHQvRdG6pI4zSEdMqfVE-2SkHdqbRo,2213
68
68
  structures/models/notifications.py,sha256=HwQc-ChdP0ULuJgxUym9_CBsCWCmcHT7whlk9tB2vzw,35364
69
69
  structures/models/owners.py,sha256=yXeP21KkdpNdO6yqKLoEMfYVA72uVaCvBmq0e19Qm78,59611
70
- structures/models/structures_1.py,sha256=zk380uG2DuQ7exO7THbq5TE5Ro2jr6EyVCIxRJXHIJI,29958
70
+ structures/models/structures_1.py,sha256=ZxKx3xmAxeOozyFeQ63A4ftOOeP1FrHkzhhEm28LldA,30064
71
71
  structures/models/structures_2.py,sha256=g5Pct5jNmZC-n7fnpLs5UyiP9JLrGdI1vjYucHTV_wQ,10371
72
72
  structures/static/structures/css/global.css,sha256=R4LEH9PwLoN77qkqBK7u2y_vzRC3fq8X_zKnAW7yhiA,1165
73
73
  structures/static/structures/css/main.css,sha256=kNgHhC3tVG376h8-6b71MtiERhYZ48cTIno5Kj6ZFGo,303
@@ -126,26 +126,26 @@ structures/static/structures/img/panel/tyrannis_darkred.png,sha256=CwCeqXvr6Nm-K
126
126
  structures/static/structures/img/panel/tyrannis_default.png,sha256=18TntkT7i0YZHZ-v9D_-glKHDKYEA0rSTjXMqwXFy0Q,38343
127
127
  structures/static/structures/img/panel/tyrannis_revelations.png,sha256=mnaL5lt-1D-Do7sb77QJDc3EPtoynz207Z932S09is0,42868
128
128
  structures/static/structures/js/global.js,sha256=DK1IZs-SePAO00WVTo03iOcw1CfT43ET2X7a4givvgk,1842
129
- structures/static/structures/js/public.js,sha256=b7CnBNpjffMmvQ022_vb6RfVmnyoH2bAmA0JIUFiw2s,3746
129
+ structures/static/structures/js/public.js,sha256=Bxi2BOE2H9fxzlC9U4qiboKqUDXy8MMGC5elvWKiFeE,3970
130
130
  structures/static/structures/js/statistics.js,sha256=qSfjy3opXq9XQ1Fp1yXA0dbk6JylgavpJpVIPfRZ9x8,2857
131
- structures/static/structures/js/structures.js,sha256=YccSuNWXvCs5WNitWy7NdC-nIHlCu2-LCjPAWbApJSk,15089
131
+ structures/static/structures/js/structures.js,sha256=RPgdyQHPssY1VcaPMdkTFiKeRuZGz1r-T3CWm3Fn83w,15240
132
132
  structures/static/structures/vendor/datatables/plugins/dataTables.rowGroup.min.js,sha256=TqdVnz3vX_H-UpCbPy3eqKY7poGMHGkKud7oBnHu9eY,5573
133
133
  structures/static/structures/vendor/datatables/plugins/datetime.js,sha256=yJzBU69oWEoQI16MOC18R2vrPpzqPGrGmtFhR6UT30A,3908
134
134
  structures/static/structures/vendor/datatables/plugins/filterDropDown.min.js,sha256=_ZGm5gV7NHq3wulljXeipLvpJi0SNEI4mydoEUCXIeQ,2529
135
135
  structures/static/structures/vendor/datatables/plugins/rowGroup.bootstrap.min.css,sha256=mfb-mieZDwLASMlQTUNXrZQr8OXvQyEDfV3Xz3E7DSU,384
136
136
  structures/static/structures/vendor/datatables/plugins/rowGroup.dataTables.min.css,sha256=mfb-mieZDwLASMlQTUNXrZQr8OXvQyEDfV3Xz3E7DSU,384
137
- structures/templates/structures/base.html,sha256=ND0JjP2Pa537FXOrIj3cziHfDbTh0ZNzrLFJ_zpVhw8,337
138
- structures/templates/structures/public.html,sha256=R3kjhr1MLC5r9r8L3t-1-Nh7-ngKbRiiZNIwgpsGg70,3239
139
- structures/templates/structures/statistics.html,sha256=rVI_wPW4VXIO3IoWna8_GoqWCc5ra-6Jc9iekfusS78,1736
140
- structures/templates/structures/structures.html,sha256=q0c7Wlaxvt2dg1B236JIEmmSBgQyX5F_QlBLokt-W0E,8329
137
+ structures/templates/structures/base.html,sha256=FYo6aJJ8DReEnyr7lUzlMcUHbTlBhnrL27WHK6767b8,1844
138
+ structures/templates/structures/public.html,sha256=P93tur3mxlx-MwTfGPu6KBlxBfMVV2WnnJJdGOF5tQI,3219
139
+ structures/templates/structures/statistics.html,sha256=2AVIeznBQCaJc-z7kxNSx3pxSdLW5Y81AiISbvUTAPE,1644
140
+ structures/templates/structures/structures.html,sha256=Q_1AVWIZkW1Svvzt6OxAcMlNV8UzXz85G00Oa_TN2gE,8148
141
141
  structures/templates/structures/modals/fitting_assets.html,sha256=0GSpDAk-wgvaZdxM9JzteUYhoPsek5y-L4TdG2q5Sbg,264
142
142
  structures/templates/structures/modals/fitting_gfx.html,sha256=hmdU1Zv09woGKigUugbBRxScKQun8l81yEPUMGrok2g,9530
143
- structures/templates/structures/modals/poco_details.html,sha256=uwaEM0jDvkdu_Lff2mUKwm7pn1KXePcgN9yBwFHsQO4,2705
144
- structures/templates/structures/modals/starbase_detail.html,sha256=qfFayAyzL1Sa20NVhK-O4gnfASQQ-zvR-0Q8FyAwBQc,4133
145
- structures/templates/structures/modals/structure_details.html,sha256=lA6PoGPECv7c3MPBiF059gjYTwvjTOGspgfldC1gb2s,4102
143
+ structures/templates/structures/modals/poco_details.html,sha256=oiaSEMF9HiojXHbN2OjHmK5nPuWRR4mZBgB9ySYNrAY,2835
144
+ structures/templates/structures/modals/starbase_detail.html,sha256=-mOo5zMGClZ2oRjVQS440n55ipHM8rU2O8wVPuI3OmI,4383
145
+ structures/templates/structures/modals/structure_details.html,sha256=zY3X_LFmrj2c3bUevSDd10qzmR1rsHqtgkDbSI_e8Xc,4339
146
146
  structures/templates/structures/modals/tab_general_detail.html,sha256=oX3Aa3RrjfWXUDiQgxB7HN-6ILJDL0fZuf85_0Kua5w,2324
147
147
  structures/templates/structures/modals/tab_services_detail.html,sha256=fd-KhwR0ARF3hFCPXCjirpBHgdZv-RgoXzHMYUe0vSQ,596
148
- structures/templates/structures/partials/menu.html,sha256=pxN_Tvo_vON0Fauyg_XPYlE6R6kaKRNFfhkLszIAMJI,2329
148
+ structures/templates/structures/partials/menu.html,sha256=rSsemMJclo_O33V9NaGRMa39tZizpwZXHXvkfUAYknM,2335
149
149
  structures/templates/structures/partials/public/poco_list.html,sha256=tVAsGXS7rh7Qr5x2X26buyt7jwJJ-YoNLs9eMs0gDM4,1222
150
150
  structures/templates/structures/partials/statistics/structure_summary.html,sha256=ZCEBOPhfOUyih7C8TzaQi9OI2AsMzZGBb9ZGHsShzmk,1133
151
151
  structures/templates/structures/partials/structures/active_tags.html,sha256=KhYA6LbAqg-iJJ2J4BGACXdbdiZFM4wAgDEq2RQEu0s,106
@@ -154,10 +154,10 @@ structures/templates/structures/partials/structures/orbital_list.html,sha256=uWV
154
154
  structures/templates/structures/partials/structures/starbase_list.html,sha256=Djl3nsTSn9TIZ6k4F0hiF-qDv_rLiVSIapnWUz0bvqU,1412
155
155
  structures/templates/structures/partials/structures/structure_list.html,sha256=2EHP1xJrmDNhwENhxGY3L6YbC53qFwhnDHcFzxkNXpI,1421
156
156
  structures/templates/structures/templatetags/detail_title.html,sha256=PWoYNZhTt1ngDEdz_B4TlyC7duO-8MxgznSUb27lUDA,117
157
- structures/templates/structures/templatetags/list_asset.html,sha256=6wWndrdBlWbOMIQlGaqeUtSfk-c6F3ZQMYErZJ4H7SM,375
158
- structures/templates/structures/templatetags/list_item.html,sha256=vWOvGx-QEjsno-iqSJrfv_ip4VphoVVV0-FIngqnK5Q,706
159
- structures/templates/structures/templatetags/list_tax_item.html,sha256=K5XSYY5UyNx_o3GWN_WLyObxb0mDcmCJkztc20sTC0Q,505
160
- structures/templates/structures/templatetags/list_title.html,sha256=C2NWwo27TGfGsQo4BgSD_2A6TemcR4DEwb04tSN_hEM,68
157
+ structures/templates/structures/templatetags/list_asset.html,sha256=loGzJwxp--c3nYAukAAGqfp4_hcBddoWgbooLLPDI1A,414
158
+ structures/templates/structures/templatetags/list_item.html,sha256=jhl2Clt6fmLSQPidTqkgwTk2gZmwx7aWTQ7ClQSwwyM,706
159
+ structures/templates/structures/templatetags/list_tax_item.html,sha256=Cs9KDpCaiC-hyBqETbWObSnepn1lpRBjto33OY_X4x0,505
160
+ structures/templates/structures/templatetags/list_title.html,sha256=IzRlAPQ1cDDXnhpEO2CtD_GIfHrh-wy06LeOZP3KmNw,52
161
161
  structures/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
162
162
  structures/templatetags/structures.py,sha256=vSt5AnfYuo11q1SxiskT4oshSMsZ9ZgM0nYpYiMl8bA,1637
163
163
  structures/tests/__init__.py,sha256=9MrJzKr8DdsQY3-79v188pTpwqT4TDQ46vKnBJAGqic,75
@@ -191,7 +191,7 @@ structures/tests/models/test_owners_3.py,sha256=cpDkfFkVvC1v4uuXha1vGUmWZ163huYT
191
191
  structures/tests/models/test_owners_4.py,sha256=_VP4QsPYGwBnn_bVN4aNX2ZVeJzMAzWObZrgCJkOPgY,19496
192
192
  structures/tests/models/test_owners_5.py,sha256=TIF_SqJqyGja8FBV2lQNAC4yff1usmJ4e0QW7e68zTg,36929
193
193
  structures/tests/models/test_owners_6.py,sha256=R9UE2QGwiGTWLHzzOZwGQPWJrAPwIIl7UwrHH-ki4Ak,940
194
- structures/tests/models/test_structures.py,sha256=iCCa0yYyPHieNfj8TQbdoIv141oLc6hlICZ6AsTnHAw,41849
194
+ structures/tests/models/test_structures.py,sha256=l51TGu1GFFmfSp9aJa9NvjN-YbZWf8_efVEwQYU5peY,41855
195
195
  structures/tests/testdata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
196
196
  structures/tests/testdata/constants.py,sha256=iab-9cHjAO4RBM88UeWbBypRm9qoZcViwZ8BPY17p1Q,441
197
197
  structures/tests/testdata/create_eveuniverse.py,sha256=a5DHYAxxsytOeevAL53RDoeDWObKwViqfpXRlmZeOHY,2157
@@ -225,7 +225,7 @@ structures/webhooks/models.py,sha256=kUkt9rnRQIJIrU9Bjcs34rvkb-TMbUubHdn-kny08kI
225
225
  structures/webhooks/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
226
226
  structures/webhooks/tests/test_core.py,sha256=4NcEAQgK2KhQkFOxYh2ad0S-qUWh1DNGDmLo5Mo5opI,6762
227
227
  structures/webhooks/tests/test_utils.py,sha256=ekADFv0JOEtXeqdiejbeqrABO__Q1flJHzVieQ7L9e0,459
228
- aa_structures-2.17.0.dist-info/LICENSE,sha256=XZiwB_S_40_HhnvLg5xvtBb3g1oGjPrk0rpFwk8iInE,1070
229
- aa_structures-2.17.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
230
- aa_structures-2.17.0.dist-info/METADATA,sha256=3WP4Xyde_TRUUwypayCkO-nnldwGuQqYtNpwGiQClIE,5972
231
- aa_structures-2.17.0.dist-info/RECORD,,
228
+ aa_structures-3.0.1.dist-info/licenses/LICENSE,sha256=XZiwB_S_40_HhnvLg5xvtBb3g1oGjPrk0rpFwk8iInE,1070
229
+ aa_structures-3.0.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
230
+ aa_structures-3.0.1.dist-info/METADATA,sha256=dh5tIejpIOxoAwsJkbAq-UBkzUaWed9os_IWNdk1RoE,6006
231
+ aa_structures-3.0.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.10.1
2
+ Generator: flit 3.12.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
structures/__init__.py CHANGED
@@ -3,5 +3,5 @@
3
3
  # pylint: disable = invalid-name
4
4
  default_app_config = "structures.apps.StructuresConfig"
5
5
 
6
- __version__ = "2.17.0"
6
+ __version__ = "3.0.1"
7
7
  __title__ = "Structures"
@@ -20,8 +20,7 @@ from eveuniverse.models import EvePlanet
20
20
  from allianceauth.eveonline.models import EveCharacter
21
21
  from app_utils.datetime import DATETIME_FORMAT, timeuntil_str
22
22
  from app_utils.views import (
23
- BootstrapStyle,
24
- bootstrap_label_html,
23
+ BootstrapStyleBS5,
25
24
  format_html_lazy,
26
25
  link_html,
27
26
  no_wrap_html,
@@ -31,7 +30,7 @@ from app_utils.views import (
31
30
 
32
31
  from structures.app_settings import STRUCTURES_SHOW_FUEL_EXPIRES_RELATIVE
33
32
  from structures.constants import EveGroupId
34
- from structures.helpers import floating_icon_with_text_html
33
+ from structures.helpers import bootstrap5_label_html, floating_icon_with_text_html
35
34
  from structures.models import EveSpaceType, PocoDetails, Structure
36
35
 
37
36
 
@@ -176,24 +175,24 @@ class _AbstractStructureListSerializer(ABC):
176
175
 
177
176
  elif structure.is_low_power:
178
177
  fuel_expires_display = format_html_lazy(
179
- bootstrap_label_html(
180
- structure.get_power_mode_display(), BootstrapStyle.WARNING
178
+ bootstrap5_label_html(
179
+ structure.get_power_mode_display(), BootstrapStyleBS5.WARNING
181
180
  )
182
181
  )
183
182
  fuel_expires_timestamp = None
184
183
 
185
184
  elif structure.is_abandoned:
186
185
  fuel_expires_display = format_html_lazy(
187
- bootstrap_label_html(
188
- structure.get_power_mode_display(), BootstrapStyle.DANGER
186
+ bootstrap5_label_html(
187
+ structure.get_power_mode_display(), BootstrapStyleBS5.DANGER
189
188
  )
190
189
  )
191
190
  fuel_expires_timestamp = None
192
191
 
193
192
  elif structure.is_maybe_abandoned:
194
193
  fuel_expires_display = format_html_lazy(
195
- bootstrap_label_html(
196
- structure.get_power_mode_display(), BootstrapStyle.WARNING
194
+ bootstrap5_label_html(
195
+ structure.get_power_mode_display(), BootstrapStyleBS5.WARNING
197
196
  )
198
197
  )
199
198
  fuel_expires_timestamp = None
@@ -226,21 +225,21 @@ class _AbstractStructureListSerializer(ABC):
226
225
 
227
226
  if structure.is_full_power:
228
227
  last_online_at_display = format_html_lazy(
229
- bootstrap_label_html(
230
- structure.get_power_mode_display(), BootstrapStyle.SUCCESS
228
+ bootstrap5_label_html(
229
+ structure.get_power_mode_display(), BootstrapStyleBS5.SUCCESS
231
230
  )
232
231
  )
233
232
  elif structure.is_maybe_abandoned:
234
233
  last_online_at_display = format_html_lazy(
235
- bootstrap_label_html(
236
- structure.get_power_mode_display(), BootstrapStyle.WARNING
234
+ bootstrap5_label_html(
235
+ structure.get_power_mode_display(), BootstrapStyleBS5.WARNING
237
236
  )
238
237
  )
239
238
 
240
239
  elif structure.is_abandoned:
241
240
  last_online_at_display = format_html_lazy(
242
- bootstrap_label_html(
243
- structure.get_power_mode_display(), BootstrapStyle.DANGER
241
+ bootstrap5_label_html(
242
+ structure.get_power_mode_display(), BootstrapStyleBS5.DANGER
244
243
  )
245
244
  )
246
245
 
@@ -307,11 +306,15 @@ class _AbstractStructureListSerializer(ABC):
307
306
 
308
307
  elif structure.has_core is False:
309
308
  has_core = False
310
- core_status = bootstrap_label_html("Core missing", BootstrapStyle.DANGER)
309
+ core_status = bootstrap5_label_html(
310
+ "Core missing", BootstrapStyleBS5.DANGER
311
+ )
311
312
 
312
313
  else:
313
314
  has_core = None
314
- core_status = bootstrap_label_html("No core status", BootstrapStyle.WARNING)
315
+ core_status = bootstrap5_label_html(
316
+ "No core status", BootstrapStyleBS5.WARNING
317
+ )
315
318
 
316
319
  return core_status, has_core
317
320
 
@@ -330,8 +333,8 @@ class _AbstractStructureListSerializer(ABC):
330
333
  ):
331
334
  ajax_url = reverse("structures:structure_details", args=[structure.id])
332
335
  row["details"] = format_html(
333
- '<button type="button" class="btn btn-default" '
334
- 'data-toggle="modal" data-target="#modalUpwellDetails" '
336
+ '<button type="button" class="btn btn-secondary" '
337
+ 'data-bs-toggle="modal" data-bs-target="#modalUpwellDetails" '
335
338
  f"data-ajax_url={ajax_url} "
336
339
  f'title="{_("Show fitting")}">'
337
340
  '<i class="fas fa-search"></i></button>'
@@ -340,8 +343,8 @@ class _AbstractStructureListSerializer(ABC):
340
343
  elif structure.is_poco:
341
344
  ajax_url = reverse("structures:poco_details", args=[structure.id])
342
345
  row["details"] = format_html(
343
- '<button type="button" class="btn btn-default" '
344
- 'data-toggle="modal" data-target="#modalPocoDetails" '
346
+ '<button type="button" class="btn btn-secondary" '
347
+ 'data-bs-toggle="modal" data-bs-target="#modalPocoDetails" '
345
348
  f"data-ajax_url={ajax_url} "
346
349
  f'title="{_("Show details")}">'
347
350
  '<i class="fas fa-search"></i></button>'
@@ -350,8 +353,8 @@ class _AbstractStructureListSerializer(ABC):
350
353
  elif structure.is_starbase:
351
354
  ajax_url = reverse("structures:starbase_detail", args=[structure.id])
352
355
  row["details"] = format_html(
353
- '<button type="button" class="btn btn-default" '
354
- 'data-toggle="modal" data-target="#modalStarbaseDetail" '
356
+ '<button type="button" class="btn btn-secondary" '
357
+ 'data-bs-toggle="modal" data-bs-target="#modalStarbaseDetail" '
355
358
  f"data-ajax_url={ajax_url} "
356
359
  f'title="{_("Show details")}">'
357
360
  '<i class="fas fa-search"></i></button>'
@@ -431,7 +434,7 @@ class PocoListSerializer(_AbstractStructureListSerializer):
431
434
  solar_system_html = format_html(
432
435
  "{}<br>{}",
433
436
  link_html(dotlan.solar_system_url(solar_system_name), solar_system_name),
434
- bootstrap_label_html(text=space_type.label, label=space_badge_type),
437
+ bootstrap5_label_html(text=space_type.label, label=space_badge_type),
435
438
  )
436
439
 
437
440
  constellation_name = structure.eve_solar_system.eve_constellation.name
structures/helpers.py CHANGED
@@ -67,3 +67,8 @@ def floating_icon_with_text_html(
67
67
  text_html = format_html_join(mark_safe("<br>"), "{}", ((line,) for line in lines))
68
68
  result_html = format_html("<p>{}{}</p>", icon_html, text_html)
69
69
  return result_html
70
+
71
+
72
+ def bootstrap5_label_html(text: str, label: str = "default") -> str:
73
+ """Return HTML for a Bootstrap 5 label."""
74
+ return format_html('<span class="badge text-bg-{}">{}</span>', label, text)
@@ -17,13 +17,16 @@ from eveuniverse.models import EveMoon, EvePlanet, EveSolarSystem, EveType
17
17
 
18
18
  from allianceauth.services.hooks import get_extension_logger
19
19
  from app_utils.logging import LoggerAddTag
20
- from app_utils.views import bootstrap_label_html
21
20
 
22
21
  from structures import __title__
23
22
  from structures.app_settings import STRUCTURES_FEATURE_REFUELED_NOTIFICATIONS
24
23
  from structures.constants import EveCategoryId, EveGroupId, EveTypeId
25
24
  from structures.core import starbases
26
- from structures.helpers import datetime_almost_equal, hours_until_deadline
25
+ from structures.helpers import (
26
+ bootstrap5_label_html,
27
+ datetime_almost_equal,
28
+ hours_until_deadline,
29
+ )
27
30
  from structures.managers import StructureManager, StructureTagManager
28
31
 
29
32
  from .eveuniverse import EveSpaceType
@@ -125,7 +128,9 @@ class StructureTag(models.Model):
125
128
  name = escape(self.name)
126
129
  else:
127
130
  name = _(self.name)
128
- return bootstrap_label_html(name, self.style)
131
+ # Convert BS3 style names
132
+ style = "secondary" if self.style == StructureTag.Style.GREY else self.style
133
+ return bootstrap5_label_html(name, style)
129
134
 
130
135
  @classmethod
131
136
  def sorted(cls, tags: list, reverse: bool = False) -> list:
@@ -92,41 +92,47 @@ $(document).ready(function () {
92
92
  {
93
93
  idx: pocos_idx_start,
94
94
  title: filterTitles.constellation,
95
- maxWidth: "11em",
95
+ maxWidth: "10em",
96
96
  },
97
97
  {
98
98
  idx: pocos_idx_start + 1,
99
99
  title: filterTitles.planet_type,
100
+ maxWidth: "10em",
100
101
  },
101
102
  {
102
103
  idx: pocos_idx_start + 2,
103
104
  title: filterTitles.space_type,
105
+ maxWidth: "10em",
104
106
  },
105
107
  {
106
108
  idx: pocos_idx_start + 3,
107
109
  title: filterTitles.region,
110
+ maxWidth: "10em",
108
111
  },
109
112
  {
110
113
  idx: pocos_idx_start + 4,
111
114
  title: filterTitles.solar_system,
115
+ maxWidth: "10em",
112
116
  },
113
117
  {
114
118
  idx: pocos_idx_start + 5,
115
119
  title: filterTitles.corporation,
116
- maxWidth: "11em",
120
+ maxWidth: "10em",
117
121
  },
118
122
  {
119
123
  idx: pocos_idx_start + 6,
120
124
  title: filterTitles.alliance,
121
- maxWidth: "11em",
125
+ maxWidth: "10em",
122
126
  },
123
127
  {
124
128
  idx: pocos_idx_start + 7,
125
129
  title: filterTitles.access,
130
+ maxWidth: "10em",
126
131
  },
127
132
  ],
128
133
  autoSize: false,
129
134
  bootstrap: true,
135
+ bootstrap_version: 5,
130
136
  },
131
137
  });
132
138
  });
@@ -22,7 +22,7 @@ $(document).ready(function () {
22
22
  $('a[href="#' + tabId + '"]').tab("show");
23
23
 
24
24
  /* remember last selected tab */
25
- $('a[data-toggle="tab"]').on("shown.bs.tab", function (e) {
25
+ $('a[data-bs-toggle="tab"]').on("shown.bs.tab", function (e) {
26
26
  const selectedTabId = $(e.target).attr("href").substr(1);
27
27
  setCookie(COOKIE_LAST_TAB_ID, selectedTabId, COOKIE_LAST_TAB_HOURS);
28
28
  });
@@ -155,6 +155,7 @@ $(document).ready(function () {
155
155
  ],
156
156
  autoSize: false,
157
157
  bootstrap: true,
158
+ bootstrap_version: 5,
158
159
  },
159
160
  },
160
161
  });
@@ -242,6 +243,7 @@ $(document).ready(function () {
242
243
  ],
243
244
  autoSize: false,
244
245
  bootstrap: true,
246
+ bootstrap_version: 5,
245
247
  },
246
248
  },
247
249
  });
@@ -328,6 +330,7 @@ $(document).ready(function () {
328
330
  ],
329
331
  autoSize: false,
330
332
  bootstrap: true,
333
+ bootstrap_version: 5,
331
334
  },
332
335
  },
333
336
  });
@@ -455,6 +458,7 @@ $(document).ready(function () {
455
458
  ],
456
459
  autoSize: false,
457
460
  bootstrap: true,
461
+ bootstrap_version: 5,
458
462
  },
459
463
  createdRow: function (row, data, dataIndex) {
460
464
  if (data["is_reinforced"]) {
@@ -1,13 +1,50 @@
1
- {% extends 'allianceauth/base.html' %}
1
+ {% extends 'allianceauth/base-bs5.html' %}
2
2
  {% load i18n %}
3
+ {% load navactive %}
3
4
 
4
5
  {% block page_title %}{% translate "Structures" %}{% endblock %}
5
6
 
7
+ {% block header_nav_brand %}{% translate "Structures" %}{% endblock %}
8
+
9
+ {% block header_nav_collapse_left %}
10
+ {% if perms.structures.view_corporation_structures or perms.structures.view_alliance_structures or perms.structures.view_all_structures %}
11
+ <li class="nav-item">
12
+ <a class="nav-link {% navactive request 'structures:structure_list' %}" href="{% url 'structures:structure_list' %}">
13
+ {% translate 'Structure List' %}
14
+ </a>
15
+ </li>
16
+
17
+ <li class="nav-item">
18
+ <a class="nav-link {% navactive request 'structures:statistics' %}" href="{% url 'structures:statistics' %}">
19
+ {% translate 'Statistics' %}
20
+ </a>
21
+ </li>
22
+ {% endif %}
23
+
24
+ <li class="nav-item me-auto">
25
+ <a class="nav-link {% navactive request 'structures:public' %}" href="{% url 'structures:public' %}">
26
+ {% translate 'Public' %}
27
+ </a>
28
+ </li>
29
+
30
+ {% endblock header_nav_collapse_left %}
31
+
32
+ {% block header_nav_collapse_right %}
33
+ {% if perms.structures.add_structure_owner %}
34
+ <li class="nav-item">
35
+ <a class="btn btn-success me-2" href="{% url 'structures:add_structure_owner' %}" title="{% translate 'Add new structure owner or add new sync character to an existing structure owner' %}">
36
+ <i class="fa-solid fa-plus"></i>&nbsp;Add owner
37
+ </a>
38
+ </li>
39
+ {% endif %}
40
+ {% endblock header_nav_collapse_right %}
41
+
42
+ {% block header_nav_user_character_control %}
43
+ {% comment %}
44
+ Leave empty to remove user control nav items for this app
45
+ {% endcomment %}
46
+ {% endblock %}
47
+
6
48
  {% block content %}
7
- <br />
8
- <div>
9
- {% include 'structures/partials/menu.html' %}
10
- <h2 class="text-left">{{ page_title }}</h2>
11
- {% block details %}{% endblock %}
12
- </div>
49
+ {% block details %}{% endblock %}
13
50
  {% endblock %}
@@ -4,8 +4,8 @@
4
4
  {% load structures %}
5
5
 
6
6
  <div class="modal-header">
7
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
8
- <h4 class="modal-title">{{ structure }}</h4>
7
+ <h5 class="modal-title">{{ structure }}</h5>
8
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
9
9
  </div>
10
10
 
11
11
  <div class="modal-body">
@@ -13,27 +13,27 @@
13
13
  <br>
14
14
 
15
15
  <!-- Nav tabs -->
16
- <ul class="nav nav-tabs" role="tablist">
17
- <li role="presentation" class="active">
18
- <a href="#tab-poco-general" aria-controls="modules" role="tab" data-toggle="tab">
16
+ <ul class="nav nav-pills" role="tablist">
17
+ <li class="nav-item" role="presentation">
18
+ <button class="nav-link active" data-bs-target="#tab-poco-general" aria-controls="modules" role="tab" data-bs-toggle="tab">
19
19
  {% translate "General" %}
20
- </a>
20
+ </button>
21
21
  </li>
22
- <li role="presentation">
23
- <a href="#tab-poco-reinforcement" aria-controls="access" role="tab" data-toggle="tab">
24
- {% translate "Reinforcement Time" %}
25
- </a>
22
+ <li class="nav-item" role="presentation">
23
+ <button class="nav-link" data-bs-target="#tab-poco-reinforcement" aria-controls="access" role="tab" data-bs-toggle="tab">
24
+ {% translate "Reinforcement" %}
25
+ </button>
26
26
  </li>
27
- <li role="presentation">
28
- <a href="#tab-poco-settings" aria-controls="settings" role="tab" data-toggle="tab">
29
- {% translate "Tax Rates & Access" %}
30
- </a>
27
+ <li class="nav-item" role="presentation">
28
+ <button class="nav-link" data-bs-target="#tab-poco-settings" aria-controls="settings" role="tab" data-bs-toggle="tab">
29
+ {% translate "Tax & Access" %}
30
+ </button>
31
31
  </li>
32
32
  </ul>
33
33
 
34
34
  <!-- Tab panes -->
35
35
  <div class="tab-content">
36
- <div role="tabpanel" class="tab-pane active" id="tab-poco-general">
36
+ <div role="tabpanel" class="tab-pane show active" id="tab-poco-general">
37
37
  {% include "structures/modals/tab_general_detail.html" %}
38
38
  </div>
39
39
 
@@ -4,8 +4,8 @@
4
4
  {% load structures %}
5
5
 
6
6
  <div class="modal-header">
7
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
8
- <h4 class="modal-title">{{structure}}</h4>
7
+ <h5 class="modal-title">{{structure}}</h5>
8
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
9
9
  </div>
10
10
 
11
11
  <div class="modal-body">
@@ -13,37 +13,36 @@
13
13
  <br>
14
14
 
15
15
  <!-- Nav tabs -->
16
- <ul class="nav nav-tabs" role="tablist">
17
- <li role="presentation" class="active">
18
- <a href="#tab-starbase-general" aria-controls="modules" role="tab" data-toggle="tab">
16
+ <ul class="nav nav-pills" role="tablist">
17
+ <li class="nav-item" role="presentation">
18
+ <button class="nav-link active" data-bs-target="#tab-starbase-general" aria-controls="modules" role="tab" data-bs-toggle="tab">
19
19
  {% translate "General" %}
20
- </a>
20
+ </button>
21
21
  </li>
22
- <li role="presentation">
23
- <a href="#tab-starbase-fuel" aria-controls="fuels" role="tab" data-toggle="tab">
22
+ <li class="nav-item" role="presentation">
23
+ <button class="nav-link" data-bs-target="#tab-starbase-fuel" aria-controls="fuels" role="tab" data-bs-toggle="tab">
24
24
  {% translate "Fuel" %} <small>({{ fuel_blocks_count|default:"-"|intcomma }})</small>
25
- </a>
25
+ </button>
26
26
  </li>
27
- <li role="presentation">
28
- <a href="#tab-starbase-modules" aria-controls="modules" role="tab" data-toggle="tab">
27
+ <li class="nav-item" role="presentation">
28
+ <button class="nav-link" data-bs-target="#tab-starbase-modules" aria-controls="modules" role="tab" data-bs-toggle="tab">
29
29
  {% translate "Modules" %} <small>({{ modules_count }})</small>
30
- </a>
30
+ </button>
31
31
  </li>
32
- <li role="presentation">
33
- <a href="#tab-starbase-settings" aria-controls="settings" role="tab" data-toggle="tab">
32
+ <li class="nav-item" role="presentation">
33
+ <button class="nav-link" data-bs-target="#tab-starbase-settings" aria-controls="settings" role="tab" data-bs-toggle="tab">
34
34
  {% translate "Settings" %}
35
- </a>
35
+ </button>
36
36
  </li>
37
- <li role="presentation">
38
- <a href="#tab-starbase-access" aria-controls="access" role="tab" data-toggle="tab">
37
+ <li class="nav-item" role="presentation">
38
+ <button class="nav-link" data-bs-target="#tab-starbase-access" aria-controls="access" role="tab" data-bs-toggle="tab">
39
39
  {% translate "Access" %}
40
- </a>
40
+ </button>
41
41
  </li>
42
42
  </ul>
43
-
44
43
  <!-- Tab panes -->
45
44
  <div class="tab-content">
46
- <div role="tabpanel" class="tab-pane active" id="tab-starbase-general">
45
+ <div role="tabpanel" class="tab-pane show active" id="tab-starbase-general">
47
46
  {% include "structures/modals/tab_general_detail.html" %}
48
47
  </div>
49
48
 
@@ -4,10 +4,8 @@
4
4
  {% load structures %}
5
5
 
6
6
  <div class="modal-header">
7
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
8
- <span aria-hidden="true">&times;</span>
9
- </button>
10
- <h4 class="modal-title">{{structure.eve_solar_system.name}} - {{structure.name}}</h4>
7
+ <h5 class="modal-title">{{structure.eve_solar_system.name}} - {{structure.name}}</h5>
8
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
11
9
  </div>
12
10
 
13
11
  <div class="modal-body">
@@ -15,38 +13,38 @@
15
13
  <br>
16
14
 
17
15
  <!-- Nav tabs -->
18
- <ul class="nav nav-tabs" role="tablist">
19
- <li role="presentation" class="active">
20
- <a href="#tab-structure-general" aria-controls="modules" role="tab" data-toggle="tab">
16
+ <ul class="nav nav-pills" role="tablist">
17
+ <li class="nav-item" role="presentation">
18
+ <button class="nav-link active" data-bs-target="#tab-structure-general" aria-controls="modules" role="tab" data-bs-toggle="tab">
21
19
  {% translate "General" %}
22
- </a>
20
+ </button>
23
21
  </li>
24
- <li role="presentation">
25
- <a href="#tab-structure-services" aria-controls="fuel" role="tab" data-toggle="tab">
22
+ <li class="nav-item" role="presentation">
23
+ <button class="nav-link" data-bs-target="#tab-structure-services" aria-controls="fuel" role="tab" data-bs-toggle="tab">
26
24
  {% translate "Services" %} <small>({{ services_count|default:"-"|intcomma }})</small>
27
- </a>
25
+ </button>
28
26
  </li>
29
27
 
30
- <li role="presentation">
31
- <a href="#tab-structure-fuel" aria-controls="fuel" role="tab" data-toggle="tab">
28
+ <li class="nav-item" role="presentation">
29
+ <button class="nav-link" data-bs-target="#tab-structure-fuel" aria-controls="fuel" role="tab" data-bs-toggle="tab">
32
30
  {% translate "Fuel" %} <small>({{ fuel_blocks_total|default:"-"|intcomma }})</small>
33
- </a>
31
+ </button>
34
32
  </li>
35
- <li role="presentation">
36
- <a href="#tab-structure-ammo" aria-controls="ammo" role="tab" data-toggle="tab">
33
+ <li class="nav-item" role="presentation">
34
+ <button class="nav-link" data-bs-target="#tab-structure-ammo" aria-controls="ammo" role="tab" data-bs-toggle="tab">
37
35
  {% translate "Ammo" %} <small>({{ ammo_total|default:"-"|intcomma }})</small>
38
- </a>
36
+ </button>
39
37
  </li>
40
- <li role="presentation">
41
- <a href="#tab-structure-modules" aria-controls="modules" role="tab" data-toggle="tab">
38
+ <li class="nav-item" role="presentation">
39
+ <button class="nav-link" data-bs-target="#tab-structure-modules" aria-controls="modules" role="tab" data-bs-toggle="tab">
42
40
  {% translate "Modules" %} <small>({{ modules_count }})</small>
43
- </a>
41
+ </button>
44
42
  </li>
45
43
  </ul>
46
44
 
47
45
  <!-- Tab panes -->
48
46
  <div class="tab-content">
49
- <div role="tabpanel" class="tab-pane active" id="tab-structure-general">
47
+ <div role="tabpanel" class="tab-pane show active" id="tab-structure-general">
50
48
  {% include "structures/modals/tab_general_detail.html" %}
51
49
  </div>
52
50
 
@@ -5,8 +5,8 @@
5
5
  <nav class="navbar navbar-default">
6
6
  <div class="container-fluid">
7
7
  <div class="navbar-header">
8
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
9
- data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
8
+ <button type="button" class="navbar-toggle collapsed" data-bs-toggle="collapse"
9
+ data-bs-target="#bs-example-navbar-collapse-1" aria-expanded="false">
10
10
  <span class="sr-only">{% translate "Toggle navigation" %}</span>
11
11
  <span class="icon-bar"></span>
12
12
  <span class="icon-bar"></span>
@@ -5,44 +5,41 @@
5
5
 
6
6
  {% block details %}
7
7
 
8
- <span class="pull-right">
9
- <form class="form-inline">
10
- <select
11
- class="form-control"
12
- name="character_id"
13
- style="height: auto;"
14
- onchange="this.form.submit()"
15
- title="Character for calculating access and tax">
16
- {% for character in characters %}
17
- <option
18
- value="{{ character.character_id }}"
19
- {% if character.character_id == selected_character.character_id %} selected{% endif %}>
20
- {{ character.character_name }}
21
- </option>
22
- {% endfor %}
23
- </select>
24
- </form>
25
- </span>
26
8
 
27
9
  <!-- Nav tabs -->
28
- <ul id="public-tabs" class="nav nav-tabs" role="tablist">
10
+ <ul class="nav nav-tabs" role="tablist">
29
11
 
30
- <li role="presentation" class="active">
31
- <a href="#pocos" aria-controls="orbitals" role="tab" data-toggle="tab">
12
+ <li role="presentation" class="nav-item me-auto">
13
+ <button class="nav-link active" aria-controls="orbitals" role="tab" data-bs-toggle="tab" data-bs-target="#pocos">
32
14
  {% translate "Customs Offices" %} <small>({{ pocos_count|default:"-" }})</small>
33
- </a>
15
+ </button>
34
16
  </li>
35
17
 
18
+ <li role="presentation" class="nav-item">
19
+ <form class="form-inline">
20
+ <select
21
+ class="form-control"
22
+ name="character_id"
23
+ style="height: auto;"
24
+ onchange="this.form.submit()"
25
+ title="Character for calculating access and tax">
26
+ {% for character in characters %}
27
+ <option
28
+ value="{{ character.character_id }}"
29
+ {% if character.character_id == selected_character.character_id %} selected{% endif %}>
30
+ {{ character.character_name }}
31
+ </option>
32
+ {% endfor %}
33
+ </select>
34
+ </form>
35
+ </li>
36
36
  </ul>
37
37
 
38
- <div class="panel panel-default panel-tabs">
39
- <div class="panel-body">
40
- <div class="tab-content">
41
-
42
- <div role="tabpanel" class="tab-pane active" id="orbitals">
43
- {% include "structures/partials/public/poco_list.html" %}
44
- </div>
38
+ <div class="card card-default card-tabs border-0">
39
+ <div class="card-body tab-content">
45
40
 
41
+ <div role="tabpanel" class="tab-pane show active" id="orbitals">
42
+ {% include "structures/partials/public/poco_list.html" %}
46
43
  </div>
47
44
 
48
45
  <p class="text-muted">
@@ -65,16 +62,13 @@
65
62
  type="application/javascript"
66
63
  src="{% static 'structures/vendor/datatables/plugins/dataTables.rowGroup.min.js' %}">
67
64
  </script>
68
- <script
69
- type="application/javascript"
70
- src="{% static 'structures/vendor/datatables/plugins/filterDropDown.min.js' %}">
71
- </script>
65
+ {% include "bundles/filterdropdown-js.html" %}
72
66
  <script type="application/javascript" src="{% static 'structures/js/global.js' %}"></script>
73
67
  <script type="application/javascript" src="{% static 'structures/js/public.js' %}"></script>
74
68
  {% endblock %}
75
69
 
76
70
  {% block extra_css %}
77
- {% include 'bundles/datatables-css.html' %}
71
+ {% include 'bundles/datatables-css-bs5.html' %}
78
72
 
79
73
  <link
80
74
  rel="stylesheet"
@@ -6,22 +6,18 @@
6
6
  {% block details %}
7
7
 
8
8
  <!-- Nav tabs -->
9
- <ul id="statistics-tabs" class="nav nav-tabs" role="tablist">
10
-
11
- <li role="presentation" class="active">
12
- <a href="#summary" aria-controls="summary" role="tab" data-toggle="tab">{% trans "Summary" %}</a>
9
+ <ul class="nav nav-tabs" role="tablist">
10
+ <li role="presentation" class="nav-item">
11
+ <button class="nav-link active" aria-controls="summary" role="tab" data-bs-toggle="tab" data-bs-toggle="#summary">
12
+ {% trans "Summary" %}
13
+ </button>
13
14
  </li>
14
-
15
15
  </ul>
16
16
 
17
- <div class="panel panel-default panel-tabs">
18
- <div class="panel-body">
19
- <div class="tab-content">
20
-
21
- <div role="tabpanel" class="tab-pane active" id="summary">
22
- {% include "structures/partials/statistics/structure_summary.html" %}
23
- </div>
24
-
17
+ <div class="card card-default card-tabs border-0">
18
+ <div class="card-body tab-content">
19
+ <div role="tabpanel" class="tab-pane show active" id="summary">
20
+ {% include "structures/partials/statistics/structure_summary.html" %}
25
21
  </div>
26
22
  </div>
27
23
  </div>
@@ -33,18 +29,14 @@
33
29
 
34
30
  {% block extra_javascript %}
35
31
  {% include 'bundles/datatables-js.html' %}
36
- <script
37
- type="application/javascript"
38
- src="{% static 'structures/vendor/datatables/plugins/filterDropDown.min.js' %}">
39
- </script>
32
+ {% include "bundles/filterdropdown-js.html" %}
40
33
  <script type="application/javascript" src="{% static 'structures/js/global.js' %}"></script>
41
34
  <script type="application/javascript" src="{% static 'structures/js/statistics.js' %}"></script>
42
35
 
43
36
  {% endblock %}
44
37
 
45
38
  {% block extra_css %}
46
- {% include 'bundles/datatables-css.html' %}
47
-
39
+ {% include 'bundles/datatables-css-bs5.html' %}
48
40
  <link rel="stylesheet" href="{% static 'structures/css/global.css' %}" type="text/css" media="screen">
49
41
  <link rel="stylesheet" href="{% static 'structures/css/main.css' %}" type="text/css" media="screen">
50
42
  <link rel="stylesheet" href="{% static 'structures/css/statistics.css' %}" type="text/css" media="screen">
@@ -5,134 +5,126 @@
5
5
  {% load humanize %}
6
6
 
7
7
  {% block details %}
8
+ <ul class="nav nav-tabs" role="tablist">
8
9
 
9
- <!-- Tags Filter Button -->
10
- <span class="pull-right">
11
- {% if tags_exist %}
12
- {% if active_tags %}
13
- <button
14
- type="button"
15
- class="btn btn-warning btn-tabs"
16
- data-toggle="modal"
17
- data-target="#modalTagsFilter">
18
- {% translate "Tags Filter (Active)" %}
19
- </button>
20
- {% else %}
21
- <button
22
- type="button"
23
- class="btn btn-default btn-tabs"
24
- data-toggle="modal"
25
- data-target="#modalTagsFilter">
26
- {% translate "Tags Filter" %}
27
- </button>
28
- {% endif %}
29
- {% else %}
30
- <button
31
- type="button"
32
- class="btn btn-default btn-tabs"
33
- data-toggle="modal"
34
- data-target="#modalTagsFilter"
35
- disabled="disabled">
36
- {% translate "Tags Filter" %}
37
- </button>
38
- {% endif %}
39
- </span>
40
-
41
- <!-- Nav tabs -->
42
- <ul id="structure-tabs" class="nav nav-tabs" role="tablist">
43
-
44
- <li role="presentation">
45
- <a href="#structures" aria-controls="structures" role="tab" data-toggle="tab">
10
+ <li role="presentation" class="nav-item">
11
+ <button class="nav-link active" aria-controls="structures" role="tab" data-bs-toggle="tab" data-bs-target="#structures">
46
12
  {% trans "Upwell Structures" %} <small>({{ structures_count|default:"-" }})</small>
47
- </a>
13
+ </button>
48
14
  </li>
49
15
 
50
- <li role="presentation">
51
- <a href="#orbitals" aria-controls="orbitals" role="tab" data-toggle="tab">
16
+ <li role="presentation" class="nav-item">
17
+ <button class="nav-link" aria-controls="orbitals" role="tab" data-bs-toggle="tab" data-bs-target="#orbitals">
52
18
  {% trans "Orbitals" %} <small>({{ orbitals_count|default:"-" }})</small>
53
- </a>
19
+ </button>
54
20
  </li>
55
21
 
56
- <li role="presentation">
57
- <a href="#starbases" aria-controls="starbases" role="tab" data-toggle="tab">
22
+ <li role="presentation" class="nav-item">
23
+ <button class="nav-link" aria-controls="starbases" role="tab" data-bs-toggle="tab" data-bs-target="#starbases">
58
24
  {% trans "Starbases" %} <small>({{ starbases_count|default:"-" }})</small>
59
- </a>
25
+ </button>
60
26
  </li>
61
27
 
62
28
  {% if show_jump_gates_tab %}
63
- <li role="presentation">
64
- <a href="#jump-gates" aria-controls="jump-gates" role="tab" data-toggle="tab">
29
+ <li role="presentation" class="nav-item">
30
+ <button class="nav-link" aria-controls="jump-gates" role="tab" data-bs-toggle="tab" data-bs-target="#jump-gates">
65
31
  {% trans "Jump Gates" %} <small>({{ jump_gates_count|default:"-" }})</small>
66
- </a>
32
+ </button>
67
33
  </li>
68
34
  {% endif %}
69
35
 
70
- </ul>
36
+ <li role="presentation" class="nav-item ms-auto">
37
+ {% if tags_exist %}
38
+ {% if active_tags %}
39
+ <button
40
+ type="button"
41
+ class="btn btn-warning"
42
+ data-bs-toggle="modal"
43
+ data-bs-target="#modalTagsFilter">
44
+ {% translate "Tags Filter (Active)" %}
45
+ </button>
46
+ {% else %}
47
+ <button
48
+ type="button"
49
+ class="btn btn-secondary"
50
+ data-bs-toggle="modal"
51
+ data-bs-target="#modalTagsFilter">
52
+ {% translate "Tags Filter" %}
53
+ </button>
54
+ {% endif %}
55
+ {% else %}
56
+ <button
57
+ type="button"
58
+ class="btn btn-secondary"
59
+ data-bs-toggle="modal"
60
+ data-bs-target="#modalTagsFilter"
61
+ disabled="disabled">
62
+ {% translate "Tags Filter" %}
63
+ </button>
64
+ {% endif %}
65
+ </li>
71
66
 
72
- <div class="panel panel-default panel-tabs">
73
- <div class="panel-body">
74
- <div class="tab-content">
67
+ </ul>
75
68
 
76
- <div role="tabpanel" class="tab-pane" id="structures">
77
- {% include "structures/partials/structures/structure_list.html" %}
78
- </div>
69
+ <div class="card card-default card-tabs border-0">
70
+ <div class="card-body tab-content">
79
71
 
80
- <div role="tabpanel" class="tab-pane" id="orbitals">
81
- {% include "structures/partials/structures/orbital_list.html" %}
82
- </div>
72
+ <div class="tab-pane show active" id="structures" role="tabpanel">
73
+ {% include "structures/partials/structures/structure_list.html" %}
74
+ </div>
83
75
 
84
- <div role="tabpanel" class="tab-pane" id="starbases">
85
- {% include "structures/partials/structures/starbase_list.html" %}
86
- </div>
76
+ <div class="tab-pane" id="orbitals" role="tabpanel">
77
+ {% include "structures/partials/structures/orbital_list.html" %}
78
+ </div>
87
79
 
88
- {% if show_jump_gates_tab %}
89
- <div role="tabpanel" class="tab-pane" id="jump-gates">
90
- {% include "structures/partials/structures/jump_gate_list.html" %}
91
- </div>
92
- {% endif %}
80
+ <div class="tab-pane" id="starbases" role="tabpanel">
81
+ {% include "structures/partials/structures/starbase_list.html" %}
82
+ </div>
93
83
 
94
- <p class="text-muted">
95
- {% translate "All dates are EVE time" %}
96
- | {% translate "Data can be outdated by up to 1 hour due to API caching" %}
97
- | {% translate "Last updated" %} {{ last_updated|naturaltime|default:"?" }}
98
- </p>
84
+ {% if show_jump_gates_tab %}
85
+ <div class="tab-pane" id="jump-gates" role="tabpanel">
86
+ {% include "structures/partials/structures/jump_gate_list.html" %}
87
+ </div>
88
+ {% endif %}
99
89
 
100
- </div>
90
+ <p class="text-muted">
91
+ {% translate "All dates are EVE time" %}
92
+ | {% translate "Data can be outdated by up to 1 hour due to API caching" %}
93
+ | {% translate "Last updated" %} {{ last_updated|naturaltime|default:"?" }}
94
+ </p>
101
95
 
102
96
  </div>
103
97
  </div>
104
98
 
105
99
  <!-- Tags Filter Modal -->
106
- <div class="modal" id="modalTagsFilter" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
107
- <div class="modal-dialog" role="document">
108
- <form method="post">
109
- <div class="modal-content">
110
- <div class="modal-header">
111
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
112
- <span aria-hidden="true">&times;</span>
113
- </button>
114
- <h4 class="modal-title">{% translate "Tags Filter" %}</h4>
115
- </div>
100
+ <div class="modal" id="modalTagsFilter" tabindex="-1">
101
+ <div class="modal-dialog">
102
+ <div class="modal-content">
103
+ <div class="modal-header">
104
+ <h5 class="modal-title">{% translate "Tags Filter" %}</h5>
105
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
106
+ </div>
107
+ <form method="post">
116
108
  <div class="modal-body">
117
109
  {% csrf_token %}
118
110
  {{ tags_filter_form|bootstrap }}
119
111
  </div>
120
112
  <div class="modal-footer">
121
- <a class="btn btn-default pull-left" href="{% url 'structures:index' %}" role="button">
113
+ <a class="btn btn-secondary pull-left" href="{% url 'structures:index' %}" role="button">
122
114
  {% translate "Reset Filter" %}
123
115
  </a>
124
- <a class="btn btn-default pull-left" href="{% url 'structures:structure_list' %}" role="button">
116
+ <a class="btn btn-secondary pull-left" href="{% url 'structures:structure_list' %}" role="button">
125
117
  {% translate "Clear Filter" %}
126
118
  </a>
127
- <button type="button" class="btn btn-default" data-dismiss="modal">
119
+ <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
128
120
  {% translate "Cancel" %}
129
121
  </button>
130
122
  <button type="submit" class="btn btn-primary">
131
123
  {% translate "Apply Filter" %}
132
124
  </button>
133
125
  </div>
134
- </div>
135
- </form>
126
+ </form>
127
+ </div>
136
128
  </div>
137
129
  </div>
138
130
 
@@ -141,8 +133,8 @@
141
133
  <div class="modal-dialog" role="document">
142
134
  <div class="modal-content" id="modalUpwellDetailsContent">
143
135
  <div class="modal-header">
144
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
145
- <h4 class="modal-title">Loading...</h4>
136
+ <h5 class="modal-title">Loading...</h5>
137
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
146
138
  </div>
147
139
  <div class="modal-body">
148
140
  </div>
@@ -151,12 +143,12 @@
151
143
  </div>
152
144
 
153
145
  <!-- Poco details modal -->
154
- <div class="modal" id="modalPocoDetails" tabindex="-1" role="dialog" aria-labelledby="modalPocoDetails">
155
- <div class="modal-dialog" role="document">
146
+ <div class="modal" id="modalPocoDetails" tabindex="-1" aria-labelledby="modalPocoDetails">
147
+ <div class="modal-dialog">
156
148
  <div class="modal-content" id="modalPocoDetailsContent">
157
149
  <div class="modal-header">
158
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
159
- <h4 class="modal-title">Loading...</h4>
150
+ <h5 class="modal-title">Loading...</h5>
151
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
160
152
  </div>
161
153
  <div class="modal-body">
162
154
  </div>
@@ -169,8 +161,8 @@
169
161
  <div class="modal-dialog" role="document">
170
162
  <div class="modal-content" id="modalStarbaseDetailContent">
171
163
  <div class="modal-header">
172
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
173
- <h4 class="modal-title">Loading...</h4>
164
+ <h5 class="modal-title">Loading...</h5>
165
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
174
166
  </div>
175
167
  <div class="modal-body">
176
168
  </div>
@@ -184,18 +176,16 @@
184
176
  {% endblock %}
185
177
 
186
178
  {% block extra_javascript %}
187
- {% include 'bundles/datatables-js.html' %}
188
- <script
189
- type="application/javascript"
190
- src="{% static 'structures/vendor/datatables/plugins/filterDropDown.min.js' %}">
191
- </script>
179
+ {% include "bundles/datatables-js-bs5.html" %}
180
+ {% include "bundles/filterdropdown-js.html" %}
181
+
192
182
  <script type="application/javascript" src="{% static 'structures/js/global.js' %}"></script>
193
183
  <script type="application/javascript" src="{% static 'structures/js/structures.js' %}"></script>
194
184
 
195
185
  {% endblock %}
196
186
 
197
187
  {% block extra_css %}
198
- {% include 'bundles/datatables-css.html' %}
188
+ {% include 'bundles/datatables-css-bs5.html' %}
199
189
 
200
190
  <link rel="stylesheet" href="{% static 'structures/css/global.css' %}" type="text/css" media="screen">
201
191
  <link rel="stylesheet" href="{% static 'structures/css/main.css' %}" type="text/css" media="screen">
@@ -1,9 +1,11 @@
1
1
  <li class="list-group-item">
2
- <p class="list-group-item-text">
3
- <img src="{{ icon_url }}" style="height: 32px; width: 32px;">&nbsp;
4
- <a href="{{ profile_url }}" target="_blank">{{ name }}</a>
2
+ <div class="d-flex w-100 justify-content-between">
3
+ <span>
4
+ <img src="{{ icon_url }}" style="height: 32px; width: 32px;">&nbsp;
5
+ <a href="{{ profile_url }}" target="_blank">{{ name }}</a>
6
+ </span>
5
7
  {% if not is_singleton %}
6
- <span class="pull-right">{{ quantity|default_if_none:"?"|floatformat:"0g" }}</span>
8
+ <span>{{ quantity|default_if_none:"?"|floatformat:"0g" }}</span>
7
9
  {% endif %}
8
- </p>
10
+ </div>
9
11
  </li>
@@ -1,13 +1,13 @@
1
1
  {% load humanize %}
2
2
 
3
3
  <li class="list-group-item">
4
- <p class="list-group-item-text">
4
+ <div class="d-flex w-100 justify-content-between">
5
5
  {% if is_muted %}
6
6
  <span class="text-muted">{{ title }}</span>
7
7
  {% else %}
8
8
  {{ title }}
9
9
  {% endif %}
10
- <span class="pull-right">
10
+ <span>
11
11
  {% if value is False or value is None %}
12
12
  <i class="fas fa-times text-danger" title="Disabled"></i>
13
13
  {% elif value is True %}
@@ -18,5 +18,5 @@
18
18
  {{ value }}
19
19
  {% endif %}
20
20
  </span>
21
- </p>
21
+ </div>
22
22
  </li>
@@ -1,9 +1,9 @@
1
1
  {% load i18n %}
2
2
 
3
3
  <li class="list-group-item">
4
- <p class="list-group-item-text">
4
+ <div class="d-flex w-100 justify-content-between">
5
5
  {{ title }}
6
- <span class="pull-right">
6
+ <span>
7
7
  {% widthratio value 1 100 %} %
8
8
  {% if has_access is False %}
9
9
  <i class="fas fa-ban text-danger" title="{% translate 'No Access' %}"></i>
@@ -11,5 +11,5 @@
11
11
  <i class="fas fa-check text-success" title="{% translate 'Has Access' %}"></i>
12
12
  {% endif %}
13
13
  </span>
14
- </p>
14
+ </div>
15
15
  </li>
@@ -1 +1 @@
1
- <li class="list-group-item list-group-item-custom">{{ title }}</li>
1
+ <li class="list-group-item active">{{ title }}</li>
@@ -1042,13 +1042,13 @@ class TestStructureTag(NoSocketsTestCase):
1042
1042
  def test_html_default(self):
1043
1043
  x = StructureTag(name="Super cool tag")
1044
1044
  self.assertEqual(
1045
- x.html, '<span class="label label-default">Super cool tag</span>'
1045
+ x.html, '<span class="badge text-bg-secondary">Super cool tag</span>'
1046
1046
  )
1047
1047
 
1048
1048
  def test_html_primary(self):
1049
1049
  x = StructureTag(name="Super cool tag", style="primary")
1050
1050
  self.assertEqual(
1051
- x.html, '<span class="label label-primary">Super cool tag</span>'
1051
+ x.html, '<span class="badge text-bg-primary">Super cool tag</span>'
1052
1052
  )
1053
1053
 
1054
1054