Skip to content

Commit

Permalink
add upstream download page
Browse files Browse the repository at this point in the history
  • Loading branch information
jopejoe1 authored and AMDmi3 committed May 16, 2024
1 parent 45ad7c3 commit 0f49df0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions repologyapp/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class LinkType:
PACKAGE_STATISTICS: ClassVar[int] = 25
PACKAGE_BUILD_STATUS: ClassVar[int] = 26
PACKAGE_BUILD_LOGS: ClassVar[int] = 27
UPSTREAM_DOWNLOAD_PAGE: ClassVar[int] = 28
OTHER: ClassVar[int] = 99


Expand Down
1 change: 1 addition & 0 deletions repologyapp/templates/_macros/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
{%- elif code == 25 %}Package statistics
{%- elif code == 26 %}Package build status
{%- elif code == 27 %}Package build logs
{%- elif code == 28 %}Upstream download page
{%- else %}Other{% endif -%}
{%- endmacro -%}

Expand Down
2 changes: 1 addition & 1 deletion repologyapp/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _link_type_to_slice_name(link_type: int) -> str | None:
match link_type:
case LinkType.UPSTREAM_HOMEPAGE | LinkType.PROJECT_HOMEPAGE:
return 'homepages'
case LinkType.UPSTREAM_DOWNLOAD | LinkType.PROJECT_DOWNLOAD:
case LinkType.UPSTREAM_DOWNLOAD | LinkType.PROJECT_DOWNLOAD | LinkType.UPSTREAM_DOWNLOAD_PAGE:
return 'downloads'
case LinkType.UPSTREAM_ISSUE_TRACKER:
return 'issues'
Expand Down

0 comments on commit 0f49df0

Please sign in to comment.