From a25ca898bb50efe6ba3436be5afcf433a8d06300 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jan 18 2016 09:55:59 +0000 Subject: [PATCH 1/7] made the forks section look the same as the repos section --- diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index 7f689fa..c3d07bd 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -37,7 +37,7 @@
{% if repo.open_tickets_public == 0 %} - {{- repo.open_tickets_public }} @@ -52,7 +52,7 @@ {% endif %} {% if repo.open_requests == 0 %} - {{- repo.open_requests}} @@ -76,7 +76,64 @@
{% endif %} - {{ render_repos_as_card(forks, forks_length,'Forks', 'forkpage', forkpage, total_page_forks) }} + +
+
+ My Forks {{forks | count}} +
+ {% if forks %} +
+ {% for fork in forks %} +
+ {% if fork.is_fork %} + {% set url = url_for('view_repo', username=fork.user.username, repo=fork.name) %} + {% else %} + {% set url = url_for('view_repo', repo=fork.name) %} + {% endif %} + + + {{ fork.name }} + +
+ {% if fork.open_tickets_public == 0 %} + + + {{- fork.open_tickets_public }} + + {% else %} + + + {{- fork.open_tickets_public }} + + {% endif %} + + {% if fork.open_requests == 0 %} + + + {{- fork.open_requests}} + + {% else %} + + + {{- fork.open_requests}} + + {% endif %} +
+
+ {% endfor %} +
+ {% else %} +
+

You have no forks

+
+ {% endif %} +
From d22e2a2a6680413438084facc902e62ca3d1fa41 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jan 18 2016 09:55:59 +0000 Subject: [PATCH 2/7] added a add project button to the dashboard --- diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index c3d07bd..1cca1fb 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -21,6 +21,15 @@
My Projects {{repos | count}} + {% if config.get('ENABLE_NEW_PROJECTS', True) and repos %} + + + + + + {% endif %}
{% if repos %}
@@ -72,7 +81,12 @@
{% else %}
-

You have no projects

+
You have no projects
+
{% endif %}
From 9bec0cc9631cce6853c9c3e809988ec3f516a96d Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jan 18 2016 09:55:59 +0000 Subject: [PATCH 3/7] made the fork list on the dashboard show the username this is just to make it the same as how we present the name on the page for the fork itself. --- diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index 1cca1fb..fe38b1d 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -106,7 +106,7 @@ {% endif %} - {{ fork.name }} + {{username}}/{{ fork.name }}
{% if fork.open_tickets_public == 0 %} From a4b212745407371cd6a2be47c4b977f858c63f52 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jan 18 2016 09:55:59 +0000 Subject: [PATCH 4/7] added a link to the parent repo to your forks on the dashboard this is mainly a pet peeve of mine on the old pagure UI, because i work both in my fork, and the main pagure repo, i sometimes need to go to one or the other, so having a link to it here should help --- diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index fe38b1d..596ab5b 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -109,6 +109,11 @@ {{username}}/{{ fork.name }}
+ forked from + + {{fork.parent.name}} + + {% if fork.settings.get('pull_requests', True) %} {% if fork.open_tickets_public == 0 %} @@ -123,7 +128,8 @@ {{- fork.open_tickets_public }} {% endif %} - + {% endif %} + {% if fork.settings.get('issue_tracker', True) %} {% if fork.open_requests == 0 %} @@ -138,6 +144,7 @@ {{- fork.open_requests}} {% endif %} + {% endif %}
{% endfor %} From 4cc553ec505cbf6d01aef675f642e4f41cc19f35 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 18 2016 09:59:10 +0000 Subject: [PATCH 5/7] Index and only show the create project buttons if the instance allows it --- diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index 596ab5b..0f946ba 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -24,8 +24,8 @@ {% if config.get('ENABLE_NEW_PROJECTS', True) and repos %} - @@ -82,11 +82,15 @@ {% else %} {% endif %}
From 34a605f55627301f598f15243c66bbda8c7010d4 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 18 2016 10:02:00 +0000 Subject: [PATCH 6/7] Check the right setting when showing tickets/PRs of the forks --- diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index 0f946ba..5e6cb04 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -117,7 +117,7 @@ {{fork.parent.name}} - {% if fork.settings.get('pull_requests', True) %} + {% if fork.settings.get('issue_tracker', True) %} {% if fork.open_tickets_public == 0 %} @@ -133,7 +133,7 @@ {% endif %} {% endif %} - {% if fork.settings.get('issue_tracker', True) %} + {% if fork.settings.get('pull_requests', True) %} {% if fork.open_requests == 0 %} From aac8aabdbb43f048a8fd05970762357a17c24387 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 18 2016 10:04:26 +0000 Subject: [PATCH 7/7] We no longer paginate the dashboard page --- diff --git a/tests/test_progit_flask_ui_app.py b/tests/test_progit_flask_ui_app.py index 84beb4e..b377a28 100644 --- a/tests/test_progit_flask_ui_app.py +++ b/tests/test_progit_flask_ui_app.py @@ -87,8 +87,6 @@ class PagureFlaskApptests(tests.Modeltests): 'Forks 0', output.data) self.assertEqual( - output.data.count('

No projects found

'), 1) - self.assertEqual( output.data.count('

No group found

'), 1) self.assertEqual( output.data.count('
'), 3)