@@ -67,21 +67,22 @@ <h1 class="ui medium header">
67
67
68
68
{% if has_connected_accounts %}
69
69
{# Search prompt and dropdown #}
70
+ < label >
71
+ {% trans "Repository name:" %}
72
+ </ label >
70
73
< div class ="ui fluid disabled loading search " data-bind ="semanticui: {search: search_config()}, css: {disabled: is_loading(), loading: is_loading()} ">
71
- < div class ="ui fluid icon large action input ">
72
- < input class ="ui text " type ="text " placeholder ="{% trans "Search repositories " %}">
73
- < button
74
- class ="ui right icon button "
75
- data-bind ="click: sync_remote_repos, css: {disabled: is_syncing(), loading: is_syncing()} "
76
- data-content ="{% trans "Refresh repositories " %}">
77
- < i class ="fa-duotone fa-refresh icon "> </ i >
78
- </ button >
74
+ < div class ="ui fluid icon large input ">
75
+ < input
76
+ class ="ui text "
77
+ type ="text "
78
+ autofocus =true />
79
+ < i class ="fa-duotone fa-search icon "> </ i >
79
80
</ div >
80
81
< div class ="results "> </ div >
81
82
82
83
{% comment %}
83
84
This is the template used by Knockout to render the SUI search
84
- template. The output format is similar, but there is additional
85
+ template. The output format is similar, but there are additional
85
86
conditional blocks for display purposes. The `standard` search
86
87
template only uses image, title, and description.
87
88
@@ -123,53 +124,82 @@ <h1 class="ui medium header">
123
124
</ div >
124
125
{# End of search prompt and dropdown #}
125
126
126
- < div class ="ui placeholder segment " data-bind ="visible: !is_selected() ">
127
-
128
- {% if not has_connected_accounts %}
129
- < div class ="ui icon info message ">
130
- < i class ="fa-duotone fa-magic icon "> </ i >
131
- < div class ="content ">
132
- < p >
133
- {# Translators: "connected service" refers to the user setting page for "Connected Services" #}
134
- {% blocktrans trimmed %}
135
- To enable automatic configuration of repositories, you must first
136
- add a connected service to your account.
137
- {% endblocktrans %}
138
- </ p >
139
- < button class ="ui right floated button " href ="{{ url_connected_services }} ">
140
- {% trans "Add a connected service" %}
141
- </ button >
127
+ < div class ="ui basic horizontally fitted segment " data-bind ="visible: !is_selected() ">
128
+ < div class ="ui top attached placeholder segment ">
129
+ {% if not has_connected_accounts %}
130
+ < div class ="ui icon info message ">
131
+ < i class ="fa-duotone fa-magic icon "> </ i >
132
+ < div class ="content ">
133
+ < p >
134
+ {# Translators: "connected service" refers to the user setting page for "Connected Services" #}
135
+ {% blocktrans trimmed %}
136
+ To enable automatic configuration of repositories, you must first
137
+ add a connected service to your account.
138
+ {% endblocktrans %}
139
+ </ p >
140
+ < button class ="ui right floated button " href ="{{ url_connected_services }} ">
141
+ {% trans "Add a connected service" %}
142
+ </ button >
143
+ </ div >
142
144
</ div >
143
- </ div >
144
- {% endif %}
145
-
146
- < div class ="ui icon header ">
147
- {% trans "Configure a repository" %}
145
+ {% endif %}
148
146
149
- < div class ="sub header ">
147
+ < div class ="ui icon header ">
150
148
{% if not has_connected_accounts %}
151
149
{# User does not yet have any connected accounts, don't ask to "select repository" #}
152
- {# Translators: "connected service" refers to the user setting page for "Connected Services" #}
153
- {% blocktrans trimmed with url=url_connected_services %}
154
- To enable automatic configuration of repositories, you must first
155
- < a href ="{{ url }} "> add a connected service to your account</ a > .
156
- If you do not have an account to connect, you may still be able
157
- to manually configure repositories.
158
- {% endblocktrans %}
150
+ {% trans "Connect an account" %}
151
+
152
+ < div class ="sub header ">
153
+ {# Translators: "connected service" refers to the user setting page for "Connected Services" #}
154
+ {% blocktrans trimmed with url=url_connected_services %}
155
+ To enable automatic configuration of repositories, you must first
156
+ < a href ="{{ url }} "> add a connected service to your account</ a > .
157
+ If you do not have an account to connect, you may still be able
158
+ to manually configure repositories.
159
+ {% endblocktrans %}
160
+ </ div >
159
161
{% else %}
160
- {# User has connected accounts, don't point to connecting GitHub/etc #}
161
- {% blocktrans trimmed %}
162
- If you do not see the repository you would like to configure, you
163
- can try refreshing the list of repositories, or you might be able
164
- to add a new project by manually configure your repository.
165
- {% endblocktrans %}
162
+ {# Push user towards searching using input above #}
163
+ < i class ="fad fa-search icon "> </ i >
164
+ {% trans "Select a repository" %}
165
+
166
+ < div class ="sub header ">
167
+ {# User has connected accounts, don't point to connecting GitHub/etc #}
168
+ {% blocktrans trimmed %}
169
+ Use the search above to find the repository you would like to
170
+ use to build your new project. This project will be connected to
171
+ the repository through your connected account.
172
+ {% endblocktrans %}
173
+ </ div >
166
174
{% endif %}
167
175
</ div >
176
+
177
+ </ div >
178
+ < div class ="ui small bottom attached center aligned message ">
179
+
180
+ {% trans "Can't find the repository you are searching for?" %}
181
+
182
+ < button
183
+ class ="ui mini black basic compact right aligned button "
184
+ data-bind ="click: sync_remote_repos, css: {disabled: is_syncing(), loading: is_syncing()} ">
185
+ < i class ="fa-duotone fa-refresh icon "> </ i >
186
+ {% trans "Refresh your repositories" %}
187
+ </ button >
188
+
168
189
</ div >
169
190
</ div >
170
191
{# End placeholder segment when no repository is selected #}
171
192
172
- {# Card display for selected remote repository #}
193
+ {% comment %}
194
+ Card display for selected remote repository
195
+ ===========================================
196
+
197
+ This block only shows when there is a selected project from the
198
+ search selction above. This block shows some information about using
199
+ the repository, such as where the repository has already been
200
+ connected and why the repository can/cannot be used.
201
+
202
+ {% endcomment %}
173
203
< div class ="ui fluid card " data-bind ="visible: is_selected, with: selected " style ="display: none; ">
174
204
< div class ="content ">
175
205
< img class ="ui right floated mini rounded image " data-bind ="attr: { src: avatar_url } ">
@@ -242,13 +272,14 @@ <h1 class="ui medium header">
242
272
{% endblocktrans %}
243
273
</ p >
244
274
< p class ="ui red text " data-bind ="visible: !admin ">
245
- < a class ="ui red mini basic button "> {% trans "Read more" %}</ a >
275
+ < a class ="ui red mini basic button " href ="https://docs.readthedocs.io/page/intro/import-guide.html#manually-import-your-docs ">
276
+ {% trans "Learn how to manually configure this repository" %}
277
+ </ a >
246
278
</ p >
247
279
</ div >
248
280
</ div >
249
281
</ div >
250
282
251
-
252
283
{# Is the repository already imported? #}
253
284
< div class ="item " data-bind ="if: has_project ">
254
285
< i class ="fa-solid fa-plus icon "> </ i >
@@ -258,21 +289,31 @@ <h1 class="ui medium header">
258
289
</ div >
259
290
< div class ="description ">
260
291
< p >
261
- {% blocktrans trimmed %}
262
- This repository can was previously configured for
263
- another project already. Configuring this repository
264
- again will not affect existing projects.
265
- {% endblocktrans %}
266
- </ p >
267
- < p data-bind ="foreach: matches ">
268
- < i class ="fa-duotone fa-arrow-up-right-from-square icon "> </ i >
269
- < a data-bind ="text: id, attr: {href: url} " target ="_blank "> </ a >
292
+ {% blocktrans trimmed %}
293
+ This following projects were already configured to use this repository:
294
+ {% endblocktrans %}
270
295
</ p >
296
+ < div data-bind ="foreach: matches ">
297
+ {% comment %}
298
+ This is currently using the v2 API because the v3
299
+ API doesn't support searching. Once the API v3
300
+ supports searching, this can be switched to using
301
+ the project chip template include. This will
302
+ include the project name, avatar URL, and embedded
303
+ popup for the project.
304
+
305
+ We only have two fields here for now: url and id (slug)
306
+ {% endcomment %}
307
+ < a class ="ui basic image label " data-bind ="attr: {href: url} " target ="_blank ">
308
+ {# TODO switch this to use the full response from the v3 API #}
309
+ {# < img src ="{{ project.remote_repository.avatar_url }} " /> #}
310
+ < span data-bind ="text: id "> </ span >
311
+ </ a >
312
+ </ div >
271
313
</ div >
272
314
</ div >
273
315
</ div >
274
316
275
-
276
317
</ div >
277
318
</ div >
278
319
@@ -288,7 +329,7 @@ <h1 class="ui medium header">
288
329
< input type ="hidden " name ="project_url " data-bind ="value: html_url " />
289
330
< input type ="hidden " name ="remote_repository " data-bind ="value: id " />
290
331
291
- < button class ="ui primary button ">
332
+ < button class ="ui primary button " data-bind =" css: {disabled: !admin} " >
292
333
{% trans "Set up" %}
293
334
</ button >
294
335
</ form >
@@ -305,22 +346,21 @@ <h1 class="ui medium header">
305
346
< div class ="ui tab " data-tab ="manual ">
306
347
< div class ="ui warning message ">
307
348
{% blocktrans trimmed %}
308
- Extra steps well be required to complete repository setup.
349
+ Extra steps will be required to complete repository setup.
309
350
{% endblocktrans %}
310
351
</ div >
311
352
< p >
312
353
{% blocktrans trimmed %}
313
354
We recommend you only attempt manual configuration if you are
314
355
familiar with configuring your repository and have the necessary
315
- admin privileges to configure the repository. Manual configuration
356
+ admin privileges to configure this repository. Manual configuration
316
357
will require several steps after your project is created in order
317
- to automatically build your project on changes to the repository .
358
+ to automatically build your project.
318
359
{% endblocktrans %}
319
360
</ p >
320
361
< div class ="ui right aligned basic segment ">
321
- < a class ="ui basic button " href ="https://docs.readthedocs.io/en/stable/intro/import-guide.html " target ="_blank ">
322
- < i class ="fa-duotone fa-question icon "> </ i >
323
- {% trans "Read more" %}
362
+ < a class ="ui basic button " href ="https://docs.readthedocs.io/page/intro/import-guide.html " target ="_blank ">
363
+ {% trans "Learn more" %}
324
364
</ a >
325
365
< a class ="ui button " href ="{% url 'projects_import_manual' %} ">
326
366
< i class ="fa-solid fa-triangle-exclamation icon "> </ i >
0 commit comments