From ef745d10d2d494c37956e42d67f212da673ac92c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 11 2018 09:56:49 +0000 Subject: [PATCH 1/2] Add a tag making it obvious when a package is retired on Fedora Fixes https://pagure.io/pagure-dist-git/issue/42 Signed-off-by: Pierre-Yves Chibon --- diff --git a/template/repo_info.html b/template/repo_info.html index aedeb4c..a870625 100644 --- a/template/repo_info.html +++ b/template/repo_info.html @@ -399,6 +399,13 @@ function disable_branches(){ branch = res.results[branch]; var _it = $('#branch-' + branch.name); _it.addClass('disabled_branch'); + if (branch.name == 'master') { + var _t = $('.projectinfo'); + html = ' \ +
Retired on Fedora
'; + _t.append(html); + } } if (res.next){ get_branches(res.next); From 3cd54562f415ff20d024489eb64923d0726f5c1a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 11 2018 15:58:13 +0000 Subject: [PATCH 2/2] Small simplification of the JS code Signed-off-by: Pierre-Yves Chibon --- diff --git a/template/repo_info.html b/template/repo_info.html index a870625..b584337 100644 --- a/template/repo_info.html +++ b/template/repo_info.html @@ -379,9 +379,8 @@ $(document).ready(function() { $( "#pkgdescription" ).text(res['description']); if (res['url']){ var _p = $('.projectinfo'); - $('.projectinfo').html( - _p.html() - + ' (upstream)') } } @@ -509,7 +508,9 @@ $(function() { }); {% endif %} + {% if repo.is_fork %} disable_branches(); + {% endif %} });