~michael.nelson/open-goal-tracker/trunk

« back to all changes in this revision

Viewing changes to usergoals/templates/usergoals/overview_for_user.html

  • Committer: Michael Nelson
  • Date: 2011-06-11 11:34:34 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: michael.nelson@canonical.com-20110611113434-fb8js5rrln1co5bg
Use standard table display for usergoal list and overview for user.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
{% block content %}
8
8
<h2>Your learning dashboard</h2>
9
9
 
 
10
<table summary="Review agreements for {{ helper.firstname }}.">
 
11
  <thead>
 
12
    <tr>
 
13
      <th>Goal</th>
 
14
      <th>Next review</th>
 
15
    </tr>
 
16
  </thead>
 
17
  <tbody>
10
18
{% for agreement in agreement_list %}
11
 
<div>
12
 
    {% with agreement.user_goal.user as goal_user %}
13
 
    <blockquote><a href="{{ agreement.user_goal.get_absolute_url }}">
 
19
{% with agreement.user_goal.user as goal_user %}
 
20
<tr>
 
21
  <td>
 
22
    <a href="{{ agreement.user_goal.get_absolute_url }}">
14
23
    {% if goal_user == user %}
15
24
      I want to {{ agreement.user_goal.goal }}.
16
25
    {% else %}
17
26
      {{ goal_user.first_name }} wants to {{ agreement.user_goal.goal }}.
18
27
    {% endif %}
19
28
    </a>
20
 
    </blockquote>
21
 
    <p>You've agreed to review this
 
29
  </td>
 
30
  <td>
22
31
      {% if agreement.next_review < now %}
23
32
        {{ agreement.next_review|timesince }} ago.
24
33
      {% else %}
25
34
        in {{ agreement.next_review|timeuntil }}.
26
35
      {% endif %}
27
 
    </p>
28
 
    {% endwith %}
29
 
</div>
 
36
  </td>
 
37
</tr>
 
38
{% endwith %}
30
39
{% endfor %}
 
40
  </tbody>
 
41
</table>
31
42
 
32
 
<a href="{% url usergoal-new %}">Create a new goal</a>
 
43
<a href="{% url usergoal-new %}">Create a new goal for someone</a> or
 
44
<a href="{% url usergoal-list user.username %}">view your own goals</a> or
 
45
<a href="{% url usergoalagreement-list-for-helper user.username %}">view all the goals you are supporting</a>.
33
46
 
34
47
{% endblock %}