Skip to content

Commit

Permalink
did: update link API
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Apr 23, 2024
1 parent f97d6b0 commit c908c47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions basxconnect/core/views/term.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from basxbread import layout
from basxbread.utils import Link, ModelHref, permissionname
from basxbread.views import BrowseView
from basxbread.views import BrowseView, deletelink
from django.utils.translation import gettext_lazy as _

from basxconnect.core.models import Term, Vocabulary


class TermsBrowseView(BrowseView):
rowclickaction = BrowseView.gen_rowclickaction("edit", return_to_current=True)
rowactions = [BrowseView.deletelink()]
rowactions = [deletelink()]
columns = ["term", "slug"]

def get(self, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions basxconnect/core/views/vocabulary.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import htmlgenerator as hg
from basxbread.utils import Link, ModelHref
from basxbread.views import BrowseView
from basxbread.views import BrowseView, editlink
from django.utils.translation import gettext_lazy as _

from basxconnect.core.models import Term


class VocabularyBrowseView(BrowseView):
rowactions = [
BrowseView.editlink(),
editlink(),
Link(
href=ModelHref(Term, "browse", query={"vocabulary_slug": hg.C("row").slug}),
label=_("Terms of vocabulary"),
Expand Down
2 changes: 1 addition & 1 deletion basxconnect/invoicing/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def receipt_download(context):
),
],
rowactions=[
views.BrowseView.editlink(),
views.editlink(),
layout.modal.Modal.with_ajax_content(
hg.C("row"),
utils.ModelHref(hg.C("row"), "cancel", query={"asajax": True}),
Expand Down

0 comments on commit c908c47

Please sign in to comment.