Revision f243d667 snf-astakos-app/astakos/im/templates/im/projects/project_detail.html

b/snf-astakos-app/astakos/im/templates/im/projects/project_detail.html
3 3
{% load astakos_tags filters django_tables2 %}
4 4

  
5 5
{% block page.body %}
6
{% with object.project as project %}
6
{% with object.chain as project %}
7 7
<div class="projects">
8 8
  <h2>
9 9
    <em>
10 10
      {% if owner_mode or admin_mode %}
11 11
        {% if project_view %}
12
           PROJECT {{ object.project_state_display|upper }}
13
          {% if object.has_pending_modifications %} -
14
             <a href="{% url astakos.im.views.project_app object.last_pending.pk %}">
12
           PROJECT {{ project.state_display|upper }}
13
          {% with project.last_pending_modification as last_pending %}
14
          {% if last_pending != None %} -
15
             <a href="{% url astakos.im.views.project_app last_pending.pk %}">
15 16
               MODIFICATION PENDING</a>
16 17
          {% else %}
17 18
             <!-- note that pending modifications have priority -->
......
20 21
               MODIFICATION DENIED</a>
21 22
             {% endif %}
22 23
          {% endif %}
24
          {% endwith %}
23 25
        {% else %}
24 26
          <!-- application view -->
25 27
           PROJECT {% if object.is_modification %} MODIFICATION {% endif %}
......
29 31
      {% else %}
30 32
        <!-- third user -->
31 33
        <!-- assert in project view -->
32
        <!-- there is always a project, may be deactivated -->
33
        
34 34
        {% if project.is_deactivated %}
35 35
        PROJECT {{ project.state_display|upper }} -
36 36
        {% endif %}
......
118 118

  
119 119
    <h3>
120 120
      {% if owner_mode and project_view %}
121
          {% if object.project.is_alive %}
121
          {% if project.is_alive %}
122 122
           <a href="{% url project_members object.chain_id %}">MEMBERS </a>
123 123
          {% else %}
124 124
          MEMBERS
......
146 146
        {{ object.member_leave_policy_display|title }}
147 147
      </dd>
148 148
       {% if owner_mode and project_view %}
149
          {% if object.project.is_alive %}
149
          {% if project.is_alive %}
150 150
      <dt><a href="{% url project_approved_members object.chain_id %}" title="view approved members">Approved members</a></dt>
151 151
      <dd>{{ approved_members_count }}
152 152
        <span class="faint"> 

Also available in: Unified diff