From e2793985c64317c41353ee1ce6108a53e9af324a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 24 2018 14:30:41 +0000 Subject: [PATCH 1/15] Add a banner about adding a README file when PRs are disabled Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html index ae5a619..ced9c05 100644 --- a/pagure/themes/srcfpo/templates/repo_info.html +++ b/pagure/themes/srcfpo/templates/repo_info.html @@ -347,6 +347,25 @@ + + {% if g.authenticated and g.repo_committer and not repo.is_fork + and not repo.settings.get('pull_requests', True) and not readme %} +
+
+
+ +

+ You appear to have turned off pull-request you may want to add + a README file with instructions on how to contribute to this + project. Thanks! +

+
+
+
+ {% endif %} {% if g.repo_obj and g.repo_obj.is_empty %} From 84d895707514d17751566007c2b0e505781303f6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 24 2018 14:30:41 +0000 Subject: [PATCH 2/15] Add package description and upstream's URL to the page Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html index ced9c05..37645e8 100644 --- a/pagure/themes/srcfpo/templates/repo_info.html +++ b/pagure/themes/srcfpo/templates/repo_info.html @@ -41,6 +41,13 @@ padding-left: 33px; background: url(https://admin.fedoraproject.org/pkgdb/static/icon_koschei.png) 0 50% no-repeat; } + .projectinfo { + white-space: pre-wrap; + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ + } {% endblock %} @@ -437,6 +444,24 @@ $(document).ready(function() { watchProjectForm.submit(); }); + {% if repo.namespace == 'rpms' %} + $.ajax({ + url: 'https://apps.fedoraproject.org/mdapi/rawhide/pkg/{{ repo.name }}', + type: 'GET', + dataType: 'jsonp', + success: function(res) { + console.log(res); + $( ".projectinfo" ).text(res['description']); + if (res['url']){ + var _p = $('.projectinfo'); + $('.projectinfo').append( + ' (upstream)') + } + } + }); + {% endif %} + }); {% endblock %} From b435c5b7496e455e84822f8b3f29d13d28f8d29d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 24 2018 14:30:41 +0000 Subject: [PATCH 3/15] Adjustment to the html indentation Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html index 37645e8..dc6e22d 100644 --- a/pagure/themes/srcfpo/templates/repo_info.html +++ b/pagure/themes/srcfpo/templates/repo_info.html @@ -113,192 +113,182 @@ {% if repo.description %}{{ repo.description | noJS | safe }}{% else %}-{% endif -%} {%- if repo.url %}  |  {{ repo.url }}{% endif %} -
- {% if not g.repo_starred %} + +
+
+ +
- - - {{watch_button_text}} - - {{num_watchers}} - {% if g.repo_obj and g.repo_obj.is_empty %}