Add edit link column to QuestionTable for improved item management
This commit is contained in:
@@ -24,6 +24,10 @@ class QuestionTable(tables.Table):
|
||||
stem = tables.Column()
|
||||
answers = tables.TemplateColumn("<ol type='A'><li>{{ record.a_answer|safe}}</li><li>{{ record.b_answer|safe}}</li><li>{{ record.c_answer|safe}}</li><li>{{ record.d_answer|safe}}</li><li>{{ record.e_answer|safe}}</li></ol>")
|
||||
|
||||
edit = tables.LinkColumn(
|
||||
"sbas:question_update", text="Edit", args=[A("pk")], orderable=False
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = Question
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
@@ -38,6 +42,7 @@ class QuestionTable(tables.Table):
|
||||
"created_date",
|
||||
"category",
|
||||
"author",
|
||||
"edit"
|
||||
)
|
||||
sequence = ("view", "stem", "answers")#, "exams")
|
||||
attrs = {"class": "table row-selector"}
|
||||
|
||||
Reference in New Issue
Block a user