Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / projects / project_detail.html @ 65f6e8ec

History | View | Annotate | Download (4.7 kB)

1
{% extends "im/account_base.html" %}
2

    
3
{% load astakos_tags filters django_tables2 %}
4

    
5
{% block page.body %}
6
{% with object.project.approved_members as approved_members %}
7
<div class="projects">
8
        
9

    
10
        <h2>
11
        <em>
12
            {% if user_owns_project %}
13
                [ ADMINISTRATOR - {{ object.state|upper }} ]
14
            {%  else %}
15
                {% if  user in approve_members %}
16
                    [ ENROLLED - ACTIVE ]
17
                {% else %}
18
                    [ ENROLLED - PENDING ]
19
                {% endif %}
20
            {% endif %}
21
        </em>
22
                 <span>{{ object.name|upper }}</span>
23
         </h2>
24
         
25
         <div class="full-dotted">
26
                 <h3>PROJECT DETAILS</h3>
27
                 <dl class="alt-style">
28
                         <dt>Name</dt>
29
                         <dd>{{ object.name }}&nbsp;</dd>
30
                         <dt>Homepage url</dt>
31
            <dd>
32
                {% if object.homepage%}
33
                    <a href="{{ object.homepage }}">{{ object.homepage }}</a>
34
                {% else %}
35
                    Not set yet
36
                {% endif %}
37
            </dd>
38
                         <dt>Description</dt>
39
                         <dd>{{ object.description }}&nbsp;</dd>
40
            
41
            
42
                         <dt>Issue date</dt>
43
                         <dd>{{object.issue_date|date:"d/m/Y"}}&nbsp;</dd>
44
                         <dt>Start date</dt>
45
                         <dd>{{object.start_date|date:"d/m/Y"}}&nbsp;</dd>
46
                         <dt>End Date</dt>
47
                         <dd>{{object.end_date|date:"d/m/Y"}}&nbsp;</dd>
48
                         <dt>Comments</dt>
49
                         <dd>{{ object.comments }}&nbsp;</dd>
50
                         <dt>Status</dt>
51
                         <dd>{{ object.state }}</dd>
52
                         <dt>Owner</dt>
53
                         <dd>{% if user == object.owner %}
54
                        Me
55
                {% else%}
56
                    {{object.owner.realname}} {% if user.is_superuser %}({{object.owner.email}}){% endif %}
57
                {% endif %}
58
                &nbsp;
59
            </dd>
60

    
61
            {% comment %}
62
                         <dt>Precursor Application</dt>
63
                         <dd>
64
                             {% if object.precursor_application %}
65
                    <a href="{% url project_detail object.precursor_application.id %}">{{object.precursor_application.id}}</a>
66
                {% endif %}
67
                &nbsp;
68
                         </dd>
69
                         <dt>Follower Application</dt>
70
                         <dd>
71
                             {% if object.follower %}
72
                    <a href="{% url project_detail object.follower.id %}">{{object.follower.id}}</a>
73
                {% endif %}
74
                &nbsp;
75
            </dd>
76
            {% endcomment %}
77
                 </dl>
78
         </div>
79
         <div class="full-dotted">
80
                 <h3>MEMBERSHIP OPTIONS</h3>
81
                 <dl class="alt-style">
82
                         <dt>Max participants</dt>
83
                         <dd>{% if object.limit_on_members_number%}{{object.limit_on_members_number}}{% else %}&nbsp;{% endif %}</dd>
84
                         <dt>Member join policy</dt>
85
            <dd>
86
                {{ join_policies|lookup:object.member_join_policy }}
87
            </dd>
88
                         <dt>Member leave policy</dt>
89
            <dd>
90
                {{ leave_policies|lookup:object.member_leave_policy }}
91
            </dd>
92
                 </dl>
93
         </div>
94
         <div class="full-dotted">
95
                 <h3>RESOURCES</h3>
96
                 {% if object.projectresourcegrant_set.all %}
97
             <dl class="alt-style">        
98
                         {% for rp in object.projectresourcegrant_set.all %}
99
                                 <dt>
100
                                       Max {% if rp.resource.is_abbreviation %}{{ rp.resource.verbose_name|upper }}{% else %}{{ rp.resource.verbose_name }}{% endif %}{% if not q.unit %}s {% endif  %}  per user
101
                               </dt>
102
                                 <dd>
103
                               {% if rp.member_capacity %}
104
                                        {% if rp.resource.unit %}
105
                                                {{ rp.member_capacity|sizeof_fmt }}
106
                                        {% else %}
107
                                                {{ rp.member_capacity|isinf }}
108
                                        {% endif %}
109
                               {% else %}
110
                                       Unlimited
111
                               {% endif %}
112
                               </dd>
113
                       {% empty %}
114
                               No resources
115
                         {% endfor %}
116
                         
117
                         
118
                 </dl>
119
                {% else %}
120
            <p>No resources</p>
121
        {% endif %} 
122
    </div>
123

    
124
     {% if user_owns_project %}
125
         {% if object.project.is_alive %}
126
         <div class="full-dotted">
127
             <h3>MEMBERS</h3>
128
             {% if members_table %}
129
                  {% render_table members_table %}
130
             {% endif %}
131
         </div>
132
         
133
         
134
        
135
        <div class="full-dotted">
136
            <form action="{% url project_detail object.id %}#members-table" method="post" class="withlabels" >{% csrf_token %}
137
                <h2>Enroll more members</h2>
138
                    {% with addmembers_form as form %}
139
                        {% include "im/form_render.html" %}
140
                    {% endwith %}
141
                    <div class="form-row submit">
142
                        <input type="submit" class="submit altcol" value="ADD MEMBERS" />
143
                    </div>
144
            </form>
145
        </div>
146
        {% endif %}
147
    {% endif %}
148
    <div class="full-dotted">
149
        <p>
150
                <a href="{% url project_list %}">&lt; Back to Projects</a>
151
        </p>
152
        </ul>
153
    </div>
154
     
155
    
156
</div>
157

    
158
{% endwith %} 
159
{% endblock %}