-
Notifications
You must be signed in to change notification settings - Fork 3
Tune project creation layout and UI #186
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
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,70 +3,92 @@ | |
{% load i18n %} | ||
{% load crispy_forms_tags %} | ||
|
||
{% block title %}{% trans "Add Project" %}{% endblock %} | ||
{% block title %}{% trans "Add project" %}{% endblock %} | ||
|
||
{% block content %} | ||
{% block project_add_content %} | ||
<div class="ui very padded centered stackable grid"> | ||
<div class="ui ten wide tablet six wide computer column"> | ||
{% block project_add_grid %} | ||
<div class="ui very padded centered stackable grid" {% block project_add_data_bind %}{% endblock %}> | ||
|
||
{% block project_add_content_header %} | ||
{% block project_add_header %} | ||
<div class="ui five wide computer four wide large screen computer only column"> | ||
{# Placeholder for column offset #} | ||
</div> | ||
<div class="ui sixteen wide tablet eleven wide computer ten wide large screen column"> | ||
<h1 class="ui medium header"> | ||
<div class="content"> | ||
{% trans "Add project" %} | ||
<div class="sub header"> | ||
{% block project_add_content_subheader %} | ||
{% endblock project_add_content_subheader %} | ||
{% block project_add_subheader %} | ||
{% endblock project_add_subheader %} | ||
</div> | ||
</div> | ||
</h1> | ||
{% endblock project_add_content_header %} | ||
</div> | ||
{% endblock project_add_header %} | ||
|
||
<form class="ui form" action="{% url "projects_import_manual" %}" method="post"> | ||
{% block project_add_sidebar %} | ||
<div class="ui sixteen wide tablet five wide computer four wide large screen column"> | ||
<div class="ui one column grid"> | ||
{% block project_add_sidebar_content %} | ||
{% endblock project_add_sidebar_content %} | ||
|
||
{% csrf_token %} | ||
{{ wizard.management_form }} | ||
{% block project_add_sidebar_help %} | ||
{# This hides the help on small view ports. It could be something better like and accordian #} | ||
<div class="computer only column"> | ||
<h2 class="ui small header">{% trans "Help topics" %}</h2> | ||
<div class="ui list"> | ||
{% block project_add_sidebar_help_topics %} | ||
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/intro/import-guide.html" text="Connecting a repository" is_external=True class="item" %} | ||
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/tutorial/index.html" text="Read the Docs tutorial" is_external=True class="item" %} | ||
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/examples.html" text="Example projects" is_external=True class="item" %} | ||
{% endblock project_add_sidebar_help_topics %} | ||
</div> | ||
</div> | ||
{% endblock project_add_sidebar_help %} | ||
</div> | ||
</div> | ||
{% endblock project_add_sidebar %} | ||
|
||
{% block wizard_form %} | ||
{% if wizard.form.forms %} | ||
{{ wizard.form.management_form }} | ||
{% for form in wizard.form.forms %} | ||
{% csrf_token %} | ||
{{ form|crispy }} | ||
{% endfor %} | ||
{% else %} | ||
{{ wizard.form|crispy }} | ||
{% endif %} | ||
{% endblock wizard_form %} | ||
{% block project_add_content %} | ||
<div class="ui sixteen wide tablet eleven wide computer ten wide large screen column"> | ||
{% block project_add_content_form %} | ||
<form class="ui form" action="{% url "projects_import_manual" %}" method="post"> | ||
|
||
{% block wizard_actions %} | ||
<div> | ||
{% if wizard.steps.prev %} | ||
<button class="ui button" name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}"> | ||
{% trans "Previous" %} | ||
</button> | ||
{% endif %} | ||
{% block wizard_form %} | ||
{% if wizard.form.forms %} | ||
{{ wizard.form.management_form }} | ||
{% for form in wizard.form.forms %} | ||
{% csrf_token %} | ||
{{ form|crispy }} | ||
{% endfor %} | ||
{% else %} | ||
{{ wizard.form|crispy }} | ||
{% endif %} | ||
{% endblock wizard_form %} | ||
|
||
{% csrf_token %} | ||
{{ wizard.management_form }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the hidden input fields, which are dropped down so that the |
||
|
||
{% if wizard.steps.next %} | ||
<input class="ui button primary" type="submit" value="{% trans "Next" %}" /> | ||
{% else %} | ||
<input class="ui button primary" type="submit" value="{% trans "Finish" %}" /> | ||
{% endif %} | ||
</div> | ||
{% endblock wizard_actions %} | ||
{% block wizard_actions %} | ||
<div> | ||
{% if wizard.steps.prev %} | ||
<button class="ui button" name="wizard_goto_step" value="{{ wizard.steps.prev }}"> | ||
{% trans "Previous" %} | ||
</button> | ||
{% endif %} | ||
|
||
</form> | ||
{% endblock project_add_content %} | ||
</div> | ||
{% if wizard.steps.next %} | ||
<input class="ui button primary" type="submit" value="{% trans "Next" %}" /> | ||
{% else %} | ||
<input class="ui button primary" type="submit" value="{% trans "Finish" %}" /> | ||
{% endif %} | ||
</div> | ||
{% endblock wizard_actions %} | ||
|
||
<div class="ui ten wide tablet four wide computer column"> | ||
<h2 class="ui small header">{% trans "Help topics" %}</h2> | ||
<div data-bind="using: EmbedTopicsView('intro/import-guide')"> | ||
<div data-bind="template: { name: 'doc-topics' }"></div> | ||
</div> | ||
</form> | ||
{% endblock project_add_content_form %} | ||
</div> | ||
{% endblock project_add_content %} | ||
</div> | ||
</div> | ||
|
||
{% include "includes/utils/embed_docs.html" %} | ||
|
||
{% endblock project_add_grid %} | ||
{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The column layout from import_form was moved here so all child templates could share this. I recommend viewing all of this with whitespace ignored.