Skip to content

Commit 457cd45

Browse files
authored
GitHub App: link to app from import page (#631)
Restores #606 Requires readthedocs/readthedocs.org#12310
1 parent 3834a74 commit 457cd45

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

readthedocsext/theme/templates/projects/partials/project_create_automatic.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{% load trans blocktrans from i18n %}
2+
{% load user_has_github_app_account from readthedocs.socialaccounts %}
23

34
{% comment rst %}
45
Project automatic configuration view
@@ -99,15 +100,26 @@
99100

100101
</div>
101102
<div class="ui small bottom attached center aligned message">
103+
<p>{% trans "Can't find the repository you are searching for?" %}</p>
102104

103-
{% trans "Can't find the repository you are searching for?" %}
105+
<p>
106+
{% if user|user_has_github_app_account %}
107+
<a class="ui mini black basic compact button"
108+
href="https://github.com/apps/{{ GITHUB_APP_NAME }}/installations/new/"
109+
target="_blank">
110+
<i class="fa-brands fa-github icon"></i>
111+
{% trans "Update GitHub App permissions" %}
112+
</a>
104113

105-
<button class="ui mini black basic compact right aligned button"
106-
data-bind="click: sync_remote_repos, css: {disabled: is_syncing(), loading: is_syncing()}">
107-
<i class="fa-duotone fa-refresh icon"></i>
108-
{% trans "Refresh your repositories" %}
109-
</button>
114+
{% trans "or" %}
115+
{% endif %}
110116

117+
<button class="ui mini black basic compact button"
118+
data-bind="click: sync_remote_repos, css: {disabled: is_syncing(), loading: is_syncing()}">
119+
<i class="fa-duotone fa-refresh icon"></i>
120+
{% trans "Refresh your repositories" %}
121+
</button>
122+
</p>
111123
</div>
112124
</div>
113125
{% endblock project_add_automatic_placeholder %}

0 commit comments

Comments
 (0)