mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
* FEAT: Initial work on revision history for assets The revision history for individual items mostly works, though it shows database ID where it should show asset ID. Recent changes feed isn't yet done. * FEAT: Initial implementation of asset activity stream * CHORE: Fix pep8 * FIX: Asset history table 'branding' * FIX: Individual asset version history is now correctly filtered * FEAT: Make revision history for suppliers accessible * CHORE: *sings* And a pep8 in a broken tree... * Refactored out duplicated code from `AssetVersionHistory * CHORE: pep8 And another random bit of wierd whitespace I found Co-authored-by: Matthew Smith <mattysmith22@googlemail.com> Closes #358
36 lines
1.9 KiB
Python
36 lines
1.9 KiB
Python
from django.conf.urls import url
|
|
from django.urls import path
|
|
from assets import views, models
|
|
from RIGS import versioning
|
|
|
|
from PyRIGS.decorators import permission_required_with_403
|
|
|
|
urlpatterns = [
|
|
path('', views.AssetList.as_view(), name='asset_index'),
|
|
path('asset/list/', views.AssetList.as_view(), name='asset_list'),
|
|
path('asset/id/<str:pk>/', views.AssetDetail.as_view(), name='asset_detail'),
|
|
path('asset/create/', permission_required_with_403('assets.add_asset')
|
|
(views.AssetCreate.as_view()), name='asset_create'),
|
|
path('asset/id/<str:pk>/edit/', permission_required_with_403('assets.change_asset')
|
|
(views.AssetEdit.as_view()), name='asset_update'),
|
|
path('asset/id/<str:pk>/duplicate/', permission_required_with_403('assets.add_asset')
|
|
(views.AssetDuplicate.as_view()), name='asset_duplicate'),
|
|
path('asset/id/<str:pk>/history/', views.AssetVersionHistory.as_view(),
|
|
name='asset_history', kwargs={'model': models.Asset}),
|
|
path('activity', permission_required_with_403('assets.view_asset')
|
|
(views.ActivityTable.as_view()), name='asset_activity_table'),
|
|
|
|
path('asset/search/', views.AssetSearch.as_view(), name='asset_search_json'),
|
|
|
|
path('supplier/list', views.SupplierList.as_view(), name='supplier_list'),
|
|
path('supplier/<int:pk>', views.SupplierDetail.as_view(), name='supplier_detail'),
|
|
path('supplier/create', permission_required_with_403('assets.add_supplier')
|
|
(views.SupplierCreate.as_view()), name='supplier_create'),
|
|
path('supplier/<int:pk>/edit', permission_required_with_403('assets.change_supplier')
|
|
(views.SupplierUpdate.as_view()), name='supplier_update'),
|
|
path('supplier/<str:pk>/history/', views.SupplierVersionHistory.as_view(),
|
|
name='supplier_history', kwargs={'model': models.Supplier}),
|
|
|
|
path('supplier/search/', views.SupplierSearch.as_view(), name='supplier_search_json'),
|
|
]
|