allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] 01/01: [#8316] update accolades page to handle missing projects ok
Date Wed, 10 Jul 2019 16:19:02 GMT
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8316
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 2b86d5e95e3f951a929f9086854465a543d74756
Author: Dave Brondsema <dave@brondsema.net>
AuthorDate: Wed Jul 10 12:18:48 2019 -0400

    [#8316] update accolades page to handle missing projects ok
---
 Allura/allura/templates/neighborhood_admin_accolades.html | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/templates/neighborhood_admin_accolades.html b/Allura/allura/templates/neighborhood_admin_accolades.html
index 5e28591..40b5bec 100644
--- a/Allura/allura/templates/neighborhood_admin_accolades.html
+++ b/Allura/allura/templates/neighborhood_admin_accolades.html
@@ -115,14 +115,22 @@
                   {% for grant in grants %}
                     <tr>
                       <td><a href="{{grant.award.longurl()}}">{{grant.award.short}}</a></td>
-                      <td><a href="{{grant.granted_to_project.url()}}">{{grant.granted_to_project.shortname}}</a></td>
+                      <td>
+                          {% if grant.granted_to_project %}
+                            <a href="{{grant.granted_to_project.url()}}">{{grant.granted_to_project.shortname}}</a>
+                          {% else %}
+                            Project not found
+                          {% endif %}
+                      </td>
                       <td><a href="{{grant.award_url}}">{{grant.award_url}}</a></td>
                       <td>{{grant.comment}}</td>
                       <td>
+                        {% if grant.granted_to_project %}
                         <form action="{{grant.longurl()}}/revoke" method="post" onsubmit="return
confirm('Continue to revoke this award?');">
                           <input type="submit" value="Revoke"/>
                           {{lib.csrf_token()}}
                         </form>
+                        {% endif %}
                     </tr>
                   {% endfor %}
                 </tbody>


Mime
View raw message