Skip to content

Fix template structure around import page #2449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 36 additions & 29 deletions readthedocs/templates/projects/project_import.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,40 +75,47 @@ <h1>{% trans "Import a Repository" %}</h1>
<div class="module-list">
<div class="module-list-wrapper">

<ul data-bind="visible: is_ready() && !has_projects()" style="display: none;">
<ul data-bind="visible: is_ready() && !has_projects()" style="display: none;"
class="remote-repos-empty">
<li class="module-item">
{% if has_connected_accounts %}
{% blocktrans with binding='data-bind="click: sync_projects"' trimmed %}
No remote repositories found,
try <a href="#" {{ binding }}>refreshing your accounts</a>.
<p>
No remote repositories found,
try <a href="#" {{ binding }}>refreshing your accounts</a>.
</p>
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
You don't currently have any connected accounts.
Connect your account to be able to easily set up projects.
{% endblocktrans %}

<form
method="get"
action="{% provider_login_url "github" %}"
class="import-connect import-connect-github">
<button>
{% trans "Connect to GitHub" %}
</button>
<input type="hidden" name="process" value="connect">
<input type="hidden" name="next" value="/dashboard/import/">
</form>

<form
method="get"
action="{% provider_login_url "bitbucket_oauth2" %}"
class="import-connect import-connect-bitbucket">
<button>
{% trans "Connect to Bitbucket" %}
</button>
<input type="hidden" name="process" value="connect">
<input type="hidden" name="next" value="/dashboard/import/">
</form>
<p>
{% blocktrans trimmed %}
You don't currently have any connected accounts.
Connect your account to be able to easily set up projects.
{% endblocktrans %}
</p>

<div class="project-import-providers">
<form
method="get"
action="{% provider_login_url "github" %}"
class="import-connect import-connect-github">
<button>
{% trans "Connect to GitHub" %}
</button>
<input type="hidden" name="process" value="connect">
<input type="hidden" name="next" value="/dashboard/import/">
</form>

<form
method="get"
action="{% provider_login_url "bitbucket_oauth2" %}"
class="import-connect import-connect-bitbucket">
<button>
{% trans "Connect to Bitbucket" %}
</button>
<input type="hidden" name="process" value="connect">
<input type="hidden" name="next" value="/dashboard/import/">
</form>
</div>

{% endif %}
</li>
Expand Down