kopia lustrzana https://github.com/jedie/PyInventory
Merge pull request #137 from jedie/dev1
FIXME: Remove '_reorder_' from ItemModelAdmin.list_displaypull/138/head
commit
cc3c13cf82
|
@ -155,5 +155,15 @@ class ItemModelAdmin(TagulousModelAdminFix, ImportExportMixin, SortableAdminMixi
|
||||||
readonly_fields = ('id', 'create_dt', 'update_dt', 'user', 'related_items')
|
readonly_fields = ('id', 'create_dt', 'update_dt', 'user', 'related_items')
|
||||||
inlines = (ItemImageModelInline, ItemFileModelInline, ItemLinkModelInline)
|
inlines = (ItemImageModelInline, ItemFileModelInline, ItemLinkModelInline)
|
||||||
|
|
||||||
|
def get_list_display(self, request):
|
||||||
|
list_display = list(super().get_list_display(request))
|
||||||
|
|
||||||
|
# FIXME: SortableAdminMixin.get_list_display() adds this, we didn't need here:
|
||||||
|
# See: https://github.com/jrief/django-admin-sortable2/issues/363
|
||||||
|
if '_reorder_' in list_display:
|
||||||
|
list_display.remove('_reorder_')
|
||||||
|
|
||||||
|
return list_display
|
||||||
|
|
||||||
|
|
||||||
tagulous.admin.enhance(ItemModel, ItemModelAdmin)
|
tagulous.admin.enhance(ItemModel, ItemModelAdmin)
|
||||||
|
|
|
@ -81,21 +81,6 @@
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th class="sortable column-_reorder_ sorted ascending" scope="col">
|
|
||||||
<div class="sortoptions">
|
|
||||||
<a class="sortremove" href="?o=" title="Remove from sorting">
|
|
||||||
</a>
|
|
||||||
<a class="toggle ascending" href="?o=-1" title="Toggle sorting">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="text">
|
|
||||||
<a href="?o=-1">
|
|
||||||
Path str
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="clear">
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
<th class="column-_tagulous_display_producer" scope="col">
|
<th class="column-_tagulous_display_producer" scope="col">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span>
|
<span>
|
||||||
|
@ -105,9 +90,15 @@
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th class="sortable column-item" scope="col">
|
<th class="sortable column-item sorted ascending" scope="col">
|
||||||
|
<div class="sortoptions">
|
||||||
|
<a class="sortremove" href="?o=" title="Remove from sorting">
|
||||||
|
</a>
|
||||||
|
<a class="toggle ascending" href="?o=-2" title="Toggle sorting">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<a href="?o=3.1">
|
<a href="?o=-2">
|
||||||
Item
|
Item
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +116,7 @@
|
||||||
</th>
|
</th>
|
||||||
<th class="sortable column-location" scope="col">
|
<th class="sortable column-location" scope="col">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<a href="?o=5.1">
|
<a href="?o=4.2">
|
||||||
Location
|
Location
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -134,7 +125,7 @@
|
||||||
</th>
|
</th>
|
||||||
<th class="sortable column-received_date" scope="col">
|
<th class="sortable column-received_date" scope="col">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<a href="?o=6.1">
|
<a href="?o=5.2">
|
||||||
Received date
|
Received date
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -143,7 +134,7 @@
|
||||||
</th>
|
</th>
|
||||||
<th class="sortable column-update_dt" scope="col">
|
<th class="sortable column-update_dt" scope="col">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<a href="?o=7.1">
|
<a href="?o=6.2">
|
||||||
Last update
|
Last update
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -157,10 +148,6 @@
|
||||||
<td class="action-checkbox">
|
<td class="action-checkbox">
|
||||||
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0001-0000-0000-000000000000"/>
|
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0001-0000-0000-000000000000"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="field-_reorder_">
|
|
||||||
<div class="drag handle" order="mainitem1" pk="00000000-0001-0000-0000-000000000000">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th class="field-_tagulous_display_producer">
|
<th class="field-_tagulous_display_producer">
|
||||||
<a href="/admin/inventory/itemmodel/00000000-0001-0000-0000-000000000000/change/">
|
<a href="/admin/inventory/itemmodel/00000000-0001-0000-0000-000000000000/change/">
|
||||||
</a>
|
</a>
|
||||||
|
@ -188,10 +175,6 @@
|
||||||
<td class="action-checkbox">
|
<td class="action-checkbox">
|
||||||
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0001-0001-0000-000000000000"/>
|
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0001-0001-0000-000000000000"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="field-_reorder_">
|
|
||||||
<div class="drag handle" order="mainitem1 0 subitem11" pk="00000000-0001-0001-0000-000000000000">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th class="field-_tagulous_display_producer">
|
<th class="field-_tagulous_display_producer">
|
||||||
<a href="/admin/inventory/itemmodel/00000000-0001-0001-0000-000000000000/change/">
|
<a href="/admin/inventory/itemmodel/00000000-0001-0001-0000-000000000000/change/">
|
||||||
</a>
|
</a>
|
||||||
|
@ -220,10 +203,6 @@
|
||||||
<td class="action-checkbox">
|
<td class="action-checkbox">
|
||||||
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0001-0002-0000-000000000000"/>
|
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0001-0002-0000-000000000000"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="field-_reorder_">
|
|
||||||
<div class="drag handle" order="mainitem1 0 subitem12" pk="00000000-0001-0002-0000-000000000000">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th class="field-_tagulous_display_producer">
|
<th class="field-_tagulous_display_producer">
|
||||||
<a href="/admin/inventory/itemmodel/00000000-0001-0002-0000-000000000000/change/">
|
<a href="/admin/inventory/itemmodel/00000000-0001-0002-0000-000000000000/change/">
|
||||||
</a>
|
</a>
|
||||||
|
@ -252,10 +231,6 @@
|
||||||
<td class="action-checkbox">
|
<td class="action-checkbox">
|
||||||
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0002-0000-0000-000000000000"/>
|
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0002-0000-0000-000000000000"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="field-_reorder_">
|
|
||||||
<div class="drag handle" order="mainitem2" pk="00000000-0002-0000-0000-000000000000">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th class="field-_tagulous_display_producer">
|
<th class="field-_tagulous_display_producer">
|
||||||
<a href="/admin/inventory/itemmodel/00000000-0002-0000-0000-000000000000/change/">
|
<a href="/admin/inventory/itemmodel/00000000-0002-0000-0000-000000000000/change/">
|
||||||
</a>
|
</a>
|
||||||
|
@ -283,10 +258,6 @@
|
||||||
<td class="action-checkbox">
|
<td class="action-checkbox">
|
||||||
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0002-0001-0000-000000000000"/>
|
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0002-0001-0000-000000000000"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="field-_reorder_">
|
|
||||||
<div class="drag handle" order="mainitem2 0 subitem21" pk="00000000-0002-0001-0000-000000000000">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th class="field-_tagulous_display_producer">
|
<th class="field-_tagulous_display_producer">
|
||||||
<a href="/admin/inventory/itemmodel/00000000-0002-0001-0000-000000000000/change/">
|
<a href="/admin/inventory/itemmodel/00000000-0002-0001-0000-000000000000/change/">
|
||||||
</a>
|
</a>
|
||||||
|
@ -315,10 +286,6 @@
|
||||||
<td class="action-checkbox">
|
<td class="action-checkbox">
|
||||||
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0002-0002-0000-000000000000"/>
|
<input class="action-select" name="_selected_action" type="checkbox" value="00000000-0002-0002-0000-000000000000"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="field-_reorder_">
|
|
||||||
<div class="drag handle" order="mainitem2 0 subitem22" pk="00000000-0002-0002-0000-000000000000">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th class="field-_tagulous_display_producer">
|
<th class="field-_tagulous_display_producer">
|
||||||
<a href="/admin/inventory/itemmodel/00000000-0002-0002-0000-000000000000/change/">
|
<a href="/admin/inventory/itemmodel/00000000-0002-0002-0000-000000000000/change/">
|
||||||
</a>
|
</a>
|
||||||
|
|
Ładowanie…
Reference in New Issue