Source

django-pim / projects / templates / projects / view_project.html

Full commit
{% extends "projects/base.html" %}

{% block body %}
<h2>{{project.title}}</h2>
<i>Created on: {{project.created_on}}</i>
<p>{{project.description|linebreaksbr}}</p><hr/>
{% if project.complete %}
<p>This project is complete.</p>
{% else %}
<a class="btn" href="{% url projects-view project.slug %}?complete=true">Mark as complete</a>
<a class="btn" href="{% url projects-create-goal project.slug %}">Add Goal</a>
<a class="btn" href="{% url projects-create-note project.slug %}">Add Note</a>
{% endif %}
<div class="tabbable tabs-left">
  <ul class="nav nav-tabs">
    <li class="active"><a href="#goals" data-toggle="tab">Goals</a></li>
    <li><a href="#notes" data-toggle="tab">Notes</a></li>
  </ul>
  <div class="tab-content">
    <div class="tab-pane active" id="goals">
      {% if goals.count > 0 %}
      <table class="table table-striped">
      <thead><tr><th>Goal</th><th>Complete</th><th>Due on</th></tr></thead>
      <tbody>
      {% for goal in goals %}
      <tr><td><a href="{{goal.get_absolute_url}}">{{goal}}</a></td><td><i class="icon-{{goal.complete|yesno:"ok,remove"}}"></i></td><td>{{goal.due_on}}</td></tr>
      {% endfor %}
      </tbody>
      </table>
      {% else %}
      No goals for this project.
      {% endif %}
    </div>
    <div class="tab-pane" id="notes">
      {% if notes.count > 0 %}
      <table class="table table-striped">
      <thead><tr><th>Note</th><th>Created on</th></tr></thead>
      <tbody>
      {% for note in notes %}
      <tr><td><a href="{{note.get_absolute_url}}">{{note}}</a></td><td>{{note.created_on}}</td></tr>
      {% endfor %}
      </tbody>
      </table>
      {% else %}
      No notes added for this project.
      {% endif %}
    </div>
  </div>
</div>
{% endblock %}