|
a/Allura/allura/model/artifact.py |
|
b/Allura/allura/model/artifact.py |
|
... |
|
... |
495 |
@property
|
495 |
@property
|
496 |
def icon(self):
|
496 |
def icon(self):
|
497 |
return AwardFile.query.get(award_id=self._id)
|
497 |
return AwardFile.query.get(award_id=self._id)
|
498 |
|
498 |
|
499 |
def url(self):
|
499 |
def url(self):
|
500 |
return h.urlquote(self.short)
|
500 |
return str(self._id)
|
501 |
|
501 |
|
502 |
def longurl(self):
|
502 |
def longurl(self):
|
503 |
slug = str(self.created_by_neighborhood.url_prefix + "_admin/awards/" + self.short)
|
503 |
return self.created_by_neighborhood.url_prefix + "_admin/awards/" + self.url()
|
504 |
return h.urlquote(slug)
|
|
|
505 |
|
504 |
|
506 |
def shorthand_id(self):
|
505 |
def shorthand_id(self):
|
507 |
return self.short
|
506 |
return self.short
|
508 |
|
507 |
|
509 |
class AwardGrant(Artifact):
|
508 |
class AwardGrant(Artifact):
|
|
... |
|
... |
542 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
541 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
543 |
return h.urlquote(slug)
|
542 |
return h.urlquote(slug)
|
544 |
|
543 |
|
545 |
def longurl(self):
|
544 |
def longurl(self):
|
546 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
545 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
547 |
slug = str(self.granted_by_neighborhood.url_prefix + "_admin/awards/"
|
|
|
548 |
+ self.award.short + '/' + slug)
|
546 |
slug = self.award.longurl() + '/' + slug
|
549 |
return h.urlquote(slug)
|
547 |
return h.urlquote(slug)
|
550 |
|
548 |
|
551 |
def shorthand_id(self):
|
549 |
def shorthand_id(self):
|
552 |
if self.award:
|
550 |
if self.award:
|
553 |
return self.award.short
|
551 |
return self.award.short
|