From 36625ed64363244ee415497590852178f90d2e67 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: May 03 2018 11:13:39 +0000 Subject: [PATCH 1/2] Fix checking if the user is authenticated Signed-off-by: Pierre-Yves Chibon --- diff --git a/template/repo_info.html b/template/repo_info.html index aac5798..f6cdaaf 100644 --- a/template/repo_info.html +++ b/template/repo_info.html @@ -48,7 +48,7 @@ {% block repo %} - {% if authenticated and g.repo_committer and not repo.is_fork + {% if g.authenticated and g.repo_committer and not repo.is_fork and not repo.settings.get('pull_requests', True) and not readme %}
@@ -72,7 +72,7 @@
Source GIT URLs{% if - (authenticated and g.repo_committer) or + (g.authenticated and g.repo_committer) or (config['DOC_APP_URL'] and repo and repo.settings.get('project_documentation', True)) %} @@ -255,7 +255,7 @@ git push -u origin master aria-expanded="false" aria-controls="moregiturls" id="more_gits">more{%endif%}
- {% if authenticated and g.repo_committer %} + {% if g.authenticated and g.repo_committer %}
SSH
@@ -276,7 +276,7 @@ git push -u origin master and repo and repo.settings.get('project_documentation', True) %}
Docs GIT URLs
- {% if authenticated and g.repo_committer %} + {% if g.authenticated and g.repo_committer %}
SSH
@@ -293,7 +293,7 @@ git push -u origin master
{% endif %} - {% if authenticated and g.repo_committer %} + {% if g.authenticated and g.repo_committer %} {% if config.get('ENABLE_TICKETS', True) and repo.settings.get('issue_tracker', True) %}
Issues GIT URLs
From 59bf93a74ee7a18440a260a95776afb16fa3dcae Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: May 03 2018 11:16:59 +0000 Subject: [PATCH 2/2] Move the git URLs at the top of the column as done upstream Signed-off-by: Pierre-Yves Chibon --- diff --git a/template/repo_info.html b/template/repo_info.html index f6cdaaf..860eed9 100644 --- a/template/repo_info.html +++ b/template/repo_info.html @@ -148,6 +148,76 @@ git push -u origin master
+
Source GIT URLs{% if + (g.authenticated and g.repo_committer) or + (config['DOC_APP_URL'] and repo and + repo.settings.get('project_documentation', True)) + %} + {%endif%}
+
+ {% if g.authenticated and g.repo_committer %} +
+
+
SSH
+ +
+
+ {% endif %} +
+
+
GIT
+ +
+
+
+ {% if config['DOC_APP_URL'] + and repo + and repo.settings.get('project_documentation', True) %} +
Docs GIT URLs
+ {% if g.authenticated and g.repo_committer %} +
+
+
SSH
+ +
+
+ {% endif %} +
+
+
GIT
+ +
+
+ {% endif %} + {% if g.authenticated and g.repo_committer %} + {% if config.get('ENABLE_TICKETS', True) + and repo.settings.get('issue_tracker', True) %} +
Issues GIT URLs
+
+
+
SSH
+ +
+
+ {% endif %} +
Pull Requests GIT URLs
+
+
+
SSH
+ +
+
+ {% endif %} +
+
Contributors
@@ -246,76 +316,6 @@ git push -u origin master
{% endfor %}
-
Source GIT URLs{% if - (g.authenticated and g.repo_committer) or - (config['DOC_APP_URL'] and repo and - repo.settings.get('project_documentation', True)) - %} - {%endif%}
-
- {% if g.authenticated and g.repo_committer %} -
-
-
SSH
- -
-
- {% endif %} -
-
-
GIT
- -
-
-
- {% if config['DOC_APP_URL'] - and repo - and repo.settings.get('project_documentation', True) %} -
Docs GIT URLs
- {% if g.authenticated and g.repo_committer %} -
-
-
SSH
- -
-
- {% endif %} -
-
-
GIT
- -
-
- {% endif %} - {% if g.authenticated and g.repo_committer %} - {% if config.get('ENABLE_TICKETS', True) - and repo.settings.get('issue_tracker', True) %} -
Issues GIT URLs
-
-
-
SSH
- -
-
- {% endif %} -
Pull Requests GIT URLs
-
-
-
SSH
- -
-
- {% endif %} -
-
created {{repo.date_created|humanize}}