Skip to content

Commit

Permalink
bugfix and link addition to gui
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-peters committed Feb 7, 2024
1 parent 3bdbe8d commit 93da0c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<div class="mb-3">
<h2>Allocation Detail</h2>
<button class="btn btn-primary" id="download"> Download PDF </button>
{% if allocation.project.sf_zone %}
<a class="btn btn-success" href="https://starfish.rc.fas.harvard.edu/#/browser?zone={{allocation.project.sf_zone}}" role="button" id="starfish"> View more information about this allocation on Starfish </a>
{% endif %}
<hr>
</div>

Expand Down
7 changes: 2 additions & 5 deletions coldfront/core/project/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ def get_attribute(self, name):
Returns:
str: value of the first attribute found for this project with the specified name
"""

attr = self.projectattribute_set.filter(
project_attribute_type__name=name).first()
attr = self.projectattribute_set.filter(proj_attr_type__name=name).first()
if attr:
return attr.value
return None
Expand All @@ -242,8 +240,7 @@ def get_attribute_list(self, name):
Returns:
list: the list of values of the attributes found with specified name
"""

attr = self.projectattribute_set.filter(project_attribute_type__name=name)
attr = self.projectattribute_set.filter(proj_attr_type__name=name)
return [a.value for a in attr]

def __str__(self):
Expand Down
6 changes: 5 additions & 1 deletion coldfront/core/project/templates/project/project_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ <h3 class="d-inline"><i class="fas fa-list" aria-hidden="true"></i> Project Allo
<div class="table-responsive">
{% if storage_allocations %}
<table id="invoice_table" class="table table-hover">
<h4>Storage</h4>
<h4>Storage &nbsp;
{% if project.sf_zone %}
<a class="btn btn-success" href="https://starfish.rc.fas.harvard.edu/#/browser?zone={{project.sf_zone}}" role="button"> View detailed storage allocation information on Starfish </a>
{% endif %}
</h4>
<thead>
<tr>
<th scope="col">Resource Name</th>
Expand Down

0 comments on commit 93da0c1

Please sign in to comment.