Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123096
D5432.id19453.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D5432.id19453.diff
View Options
diff --git a/swh/web/browse/snapshot_context.py b/swh/web/browse/snapshot_context.py
--- a/swh/web/browse/snapshot_context.py
+++ b/swh/web/browse/snapshot_context.py
@@ -1367,6 +1367,10 @@
)
target_url = ""
+ tooltip = (
+ f"The release {release['name']} targets "
+ f"{release['target_type']} {release['target']}"
+ )
if release["target_type"] == "revision":
target_url = reverse(
"browse-revision",
@@ -1391,9 +1395,14 @@
url_args={"sha1_git": release["target"]},
query_params=query_params_tgt,
)
+ tooltip = (
+ f"The release {release['name']} "
+ f"is an alias for release {release['target']}"
+ )
release["release_url"] = release_url
release["target_url"] = target_url
+ release["tooltip"] = tooltip
if origin_info:
browse_view_name = "browse-origin-releases"
diff --git a/swh/web/templates/browse/releases.html b/swh/web/templates/browse/releases.html
--- a/swh/web/templates/browse/releases.html
+++ b/swh/web/templates/browse/releases.html
@@ -36,7 +36,7 @@
</td>
<td class="swh-release-target">
<a href="{{ release.target_url }}">
- <i class="{{ swh_object_icons|key_value:release.target_type }} mdi-fw" aria-hidden="true"></i>{{ release.target|slice:":7" }}
+ <i class="{{ swh_object_icons|key_value:release.target_type }} mdi-fw" aria-hidden="true" title="{{ release.tooltip }}"></i>{{ release.target|slice:":7" }}
</a>
</td>
<td class="swh-log-entry-message swh-release-message swh-table-cell-text-overflow" title="{{ release.message }}">
diff --git a/swh/web/tests/browse/views/test_origin.py b/swh/web/tests/browse/views/test_origin.py
--- a/swh/web/tests/browse/views/test_origin.py
+++ b/swh/web/tests/browse/views/test_origin.py
@@ -1208,6 +1208,7 @@
assert_contains(resp, f"Releases ({snapshot_sizes['release']}")
assert_contains(resp, '<tr class="swh-release-entry', count=nb_releases)
+ assert_contains(resp, 'title="The release', count=nb_releases)
for release in origin_releases:
browse_release_url = reverse(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 17, 9:13 PM (2 d, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217166
Attached To
D5432: Added explanatory tooltips on the pictos for the revision history
Event Timeline
Log In to Comment