Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Separate templates for buildout and pip project views.

  • Loading branch information...
commit c3c81720e0ddceb2fc0f9c0d620ba658742466b4 1 parent 57664bd
Dusty Phillips buchuki authored
22 greatbigcrane/templates/project/buildout_detail.html
View
@@ -0,0 +1,22 @@
+{% load buildout_config %}
+ <section class="buildout">
+ <h2>Buildout Sections</h2>
+ {% if not project.buildout_sections %}
+ <p>No Buildout sections yet.</p>
+ {% endif %}
+ {% for name, section in project.buildout_sections %}
+ <ul>
+ <li class="clearfix">
+ <a href="{% url edit_recipe project.id name %}" class="button right grey">Edit</a>
+ <a href="{% url delete_recipe project.id name %}" class="button ajax right red confirm">Delete</a>
+ <h3>{{name}}</h3>
+ {% for key, value in section.items %}
+ <ul>
+ <li>{{key}} = {{value|configvalue}}</li>
+ </ul>
+ {% endfor %}
+ </li>
+ </ul>
+ {% endfor %}
+ <a href="{% url add_recipe project.id %}" class="left orange button orange">Add Recipe</a>
+ </section>
3  greatbigcrane/templates/project/pip_detail.html
View
@@ -0,0 +1,3 @@
+This is a pip project. We aren't handling those very well yet.
+
+But we're working on it. Hence this placeholder template.
27 greatbigcrane/templates/project/project_detail.html
View
@@ -1,5 +1,4 @@
{% extends 'sidebar.html' %}
-{% load buildout_config %}
{% load markup %}
{% block contenttitle %}{{project.name}}{% endblock %}
@@ -16,27 +15,11 @@
<div class="description blocktext">{{project.description|markdown}}</div>
{% endif %}
- <section class="buildout">
- <h2>Buildout Sections</h2>
- {% if not project.buildout_sections %}
- <p>No Buildout sections yet.</p>
- {% endif %}
- {% for name, section in project.buildout_sections %}
- <ul>
- <li class="clearfix">
- <a href="{% url edit_recipe project.id name %}" class="button right grey">Edit</a>
- <a href="{% url delete_recipe project.id name %}" class="button ajax right red confirm">Delete</a>
- <h3>{{name}}</h3>
- {% for key, value in section.items %}
- <ul>
- <li>{{key}} = {{value|configvalue}}</li>
- </ul>
- {% endfor %}
- </li>
- </ul>
- {% endfor %}
- <a href="{% url add_recipe project.id %}" class="left orange button orange">Add Recipe</a>
- </section>
+ {% if project.project_type == "buildout" %}
+ {% include "project/buildout_detail.html" %}
+ {% else %}
+ {% include "project/pip_detail.html" %}
+ {% endif %}
</div>
{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.