Skip to content
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

Add "edit" and "view docs" buttons to subproject list #3572

Merged
merged 7 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from 3 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
45 changes: 42 additions & 3 deletions media/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -1124,11 +1124,50 @@ div.httpexchange div.highlight pre {
}

/* Subprojects */
div.module.project-subprojects div.subproject-meta {
font-size: .9em;
font-style: italic;
div.module.project-subprojects div.subproject-info {
height: 2.625em;
overflow: hidden;
}

div.module.project-subprojects div.subproject-info a.subproject-name {
line-height: 1.5em;
text-decoration: none;
}

div.module.project-subprojects div.subproject-info span.subproject-url a {
display: block;
font-size: .75em;
line-height: 1.5em;
color: #999;
text-decoration: none;
}

div.module.project-subprojects div.subproject-info ul.subproject-menu {
top: 10px;
right: 10px;
}

div.module.project-subprojects li.subproject span.subproject-url a:before {
padding-right: .5em;
font-family: FontAwesome;
font-size: 1.2em;
content: "\f0c1";
}

div.module.project-subprojects li.subproject a.subproject-edit {
display: block;
height: 1em;
padding: .5em .75em;
font-size: 1em;
font-weight: normal;
}
div.module.project-subprojects li.subproject a.subproject-edit:before {
font-family: FontAwesome;
font-weight: normal;
content: "\f044";
}


/* Pygments */
div.highlight pre .hll { background-color: #ffffcc }
div.highlight pre .c { color: #60a0b0; font-style: italic } /* Comment */
Expand Down
61 changes: 36 additions & 25 deletions readthedocs/templates/projects/projectrelationship_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,43 @@

<div class="module project-subprojects">
<div class="module-list-wrapper">
<ul>
{% for subproject in object_list %}
<li class="module-item">
<div class="subproject-name">
<a href="{% url 'projects_subprojects_update' project_slug=project.slug subproject_slug=subproject.child.slug %}">
{{ subproject.child }}
</a>
</div>
<div class="module-list">
<div class="module-list-wrapper">
<ul class="subprojects">
{% for subproject in object_list %}
<li class="module-item subproject">
<div class="subproject-info">
<a
class="subproject-name"
href="{% url 'projects_manage' project_slug=subproject.child.slug %}">
{{ subproject.child }}
</a>
<span class="subproject-url">
<a href="{{ subproject.get_absolute_url }}">
{{ subproject.get_absolute_url }}
</a>
</span>
</div>

<div class="subproject-meta">
<a href="{% url 'projects_manage' project_slug=subproject.child.slug %}">
{% trans "Project page" %}</a>
&nbsp;&dash;&nbsp;
<a href="{{ subproject.get_absolute_url }}">
{{ subproject.get_absolute_url }}
</a>
</div>
</li>
{% empty %}
<li class="module-item">
<p class="quiet">
{% trans 'No subprojects are currently configured' %}
</p>
</li>
{% endfor %}
</ul>
<ul class="module-item-menu subproject-menu">
<li>
<a
class="subproject-edit"
href="{% url 'projects_subprojects_update' project_slug=project.slug subproject_slug=subproject.child.slug %}">
</a>
</li>
</ul>
</li>
{% empty %}
<li class="module-item">
<p class="quiet">
{% trans 'No subprojects are currently configured' %}
</p>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endif %}
Expand Down