Skip to content

Commit

Permalink
ubccr#259: Archived grants can be viewed on the Project Detail page. …
Browse files Browse the repository at this point in the history
…The grants section of the page now has a status column to show the status of each grant associated with a project.
  • Loading branch information
brisco17 committed Jun 2, 2021
1 parent 941e87a commit 7623646
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions coldfront/core/project/templates/project/project_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ <h3 class="d-inline" id="grants"><i class="fas fa-trophy" aria-hidden="true"></i
<th scope="col" class="text-nowrap">Award Amount</th>
<th scope="col" class="text-nowrap">Grant Start Date</th>
<th scope="col" class="text-nowrap">Grant End Date</th>
<th scope="col" class="text-nowrap">Status</th>
<th scope="col" class="nosort">Actions</th>
</tr>
</thead>
Expand All @@ -256,6 +257,13 @@ <h3 class="d-inline" id="grants"><i class="fas fa-trophy" aria-hidden="true"></i
<td>{{ grant.total_amount_awarded|intcomma}}</td>
<td>{{ grant.grant_start|date:"Y-m-d" }}</td>
<td>{{ grant.grant_end|date:"Y-m-d" }}</td>
{% if grant.status.name == 'Active' %}
<td class="text-success">{{ grant.status.name }}</td>
{% elif grant.status.name == 'Archived' %}
<td class="text-danger">{{ grant.status.name }}</td>
{% else %}
<td class="text-info">{{ grant.status.name }}</td>
{% endif %}
<td><a href="{% url 'grant-update' grant.id %}"><i class="far fa-edit" aria-hidden="true"></i><span class="sr-only">Edit</span></a></td>
</tr>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion coldfront/core/project/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_context_data(self, **kwargs):
context['research_outputs'] = ResearchOutput.objects.filter(
project=self.object).order_by('-created')
context['grants'] = Grant.objects.filter(
project=self.object, status__name__in=['Active', 'Pending'])
project=self.object, status__name__in=['Active', 'Pending', 'Archived'])
context['allocations'] = allocations
context['project_users'] = project_users
context['ALLOCATION_ENABLE_ALLOCATION_RENEWAL'] = ALLOCATION_ENABLE_ALLOCATION_RENEWAL
Expand Down

0 comments on commit 7623646

Please sign in to comment.