|
@@ -116,11 +116,14 @@ class ServiceTypeTable(tables.Table):
|
|
|
|
|
|
id = tables.Column( attrs={"td":{"width":"5%"}})
|
|
id = tables.Column( attrs={"td":{"width":"5%"}})
|
|
codename = tables.LinkColumn('service_type/edit/', verbose_name='Услуга', orderable=False, text = lambda record: record.codename,
|
|
codename = tables.LinkColumn('service_type/edit/', verbose_name='Услуга', orderable=False, text = lambda record: record.codename,
|
|
- args=[tables.A('pk')], attrs={'th':{'scope':'col'},})
|
|
|
|
|
|
+ args=[tables.A('pk')], attrs= {"a": {"style": "pointer-events: none;"}, 'th':{'scope':'col'}, "td":{"class":"name_col"}})
|
|
description = tables.LinkColumn('service_type/edit/', orderable=False, verbose_name='Описание', text = lambda record: record.description,
|
|
description = tables.LinkColumn('service_type/edit/', orderable=False, verbose_name='Описание', text = lambda record: record.description,
|
|
- args=[tables.A('pk')], attrs={'th':{'scope':'col'}, })
|
|
|
|
- deletee = tables.LinkColumn('service_type/delete/', verbose_name='', text = "Удалить",
|
|
|
|
- args=[tables.A('pk')], attrs={'th':{'scope':'col'},})
|
|
|
|
|
|
+ args=[tables.A('pk')], attrs= {"a": {"style": "pointer-events: none;"}, 'th':{'scope':'col'}, "td":{"class":"description_col"}})
|
|
|
|
+ edit = tables.LinkColumn('service_type/edit/', verbose_name='', orderable=False, text = "E",
|
|
|
|
+ args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"edit_col"}})
|
|
|
|
+ deletee = tables.LinkColumn('service_type/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
|
+ args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"delete_col"}})
|
|
|
|
+
|
|
|
|
|
|
class Meta:
|
|
class Meta:
|
|
model = ServiceType
|
|
model = ServiceType
|
|
@@ -130,11 +133,11 @@ class ServiceTypeTable(tables.Table):
|
|
'id_metaservice', 'link_agreement',
|
|
'id_metaservice', 'link_agreement',
|
|
'is_global', 'is_visible', 'caption')
|
|
'is_global', 'is_visible', 'caption')
|
|
|
|
|
|
- def render_delete(self, value, record):
|
|
|
|
- return format_html('<a href="/service_type/delete" class="btn btn-outline-danger">_(Delete)</a>')
|
|
|
|
|
|
+ # def render_delete(self, value, record):
|
|
|
|
+ # return format_html('<a href="/service_type/delete" class="btn btn-outline-danger">_(Delete)</a>')
|
|
|
|
|
|
- def render_name_operation(self, value, record):
|
|
|
|
- return format_html("<a href='{}'>{}</a>", record.get_absolute_url(), value)
|
|
|
|
|
|
+ # def render_name_operation(self, value, record):
|
|
|
|
+ # return format_html("<a href='{}'>{}</a>", record.get_absolute_url(), value)
|
|
|
|
|
|
class ServiceTable(tables.Table):
|
|
class ServiceTable(tables.Table):
|
|
|
|
|