mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
templates: Translate pkgbase.html and partials
+ Include the `is_maintainer` context key. + Use `is_maintainer` in more locations. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
1e1c0c3fe5
commit
2d3d03e01e
5 changed files with 155 additions and 75 deletions
|
@ -28,6 +28,8 @@ async def package_base(request: Request, package: str):
|
|||
context["packages_count"] = package.packages.count()
|
||||
context["keywords"] = package.keywords.all()
|
||||
context["comments"] = package.comments.all()
|
||||
context["is_maintainer"] = request.user.is_authenticated() \
|
||||
and request.user.Username == package.Maintainer.Username
|
||||
|
||||
return render_template(request, "pkgbase.html", context)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue