Skip to content
Snippets Groups Projects
Commit 9be93db9 authored by Pierre-antoine Comby's avatar Pierre-antoine Comby
Browse files

les boeufs avant la charrue, a faire sur une autre branche

parent 9f53bda1
No related branches found
No related tags found
1 merge request!54Meilleurs vues pour la gestion des boutons
Pipeline #8019 passed with warnings with stages
in 4 minutes and 14 seconds
......@@ -58,7 +58,7 @@ class HistoryTable(tables.Table):
# function delete_button(id) provided in template file
delete_template = """
<button id="{{ record.pk }}" class="btn btn-danger" onclick="delete_button(this.id)"> {{ delete_trans }}</a>
<button id="{{ record.pk }}" class="btn btn-danger" onclick="delete_button(this.id)"> {{ delete_trans }}</button>
"""
class AliasTable(tables.Table):
......@@ -73,9 +73,16 @@ class AliasTable(tables.Table):
show_header = False
name = tables.Column(attrs={'td': {'class': 'text-center'}})
delete = tables.TemplateColumn(template_code=delete_template,
extra_context={"delete_trans":_('delete')},
attrs={'td':{'class': 'col-sm-1'}})
# delete = tables.TemplateColumn(template_code=delete_template,
# attrs={'td':{'class': 'col-sm-1'}})
delete = tables.LinkColumn('member:user_alias_delete',
args=[A('pk')],
attrs={
'td': {'class': 'col-sm-2'},
'a': {'class': 'btn btn-danger'}},
text='delete', accessor='pk')
class ButtonTable(tables.Table):
class Meta:
attrs = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment