|
a/Allura/allura/model/artifact.py |
|
b/Allura/allura/model/artifact.py |
|
... |
|
... |
691 |
@property
|
691 |
@property
|
692 |
def icon(self):
|
692 |
def icon(self):
|
693 |
return AwardFile.query.get(award_id=self._id)
|
693 |
return AwardFile.query.get(award_id=self._id)
|
694 |
|
694 |
|
695 |
def url(self):
|
695 |
def url(self):
|
696 |
return urllib.unquote_plus(str(self.short))
|
696 |
return urllib.quote_plus(str(self.short))
|
697 |
|
697 |
|
698 |
def longurl(self):
|
698 |
def longurl(self):
|
699 |
slug = str(self.created_by_neighborhood.url_prefix + "_admin/awards/" + self.short)
|
699 |
slug = str(self.created_by_neighborhood.url_prefix + "_admin/awards/" + self.short)
|
700 |
return urllib.unquote_plus(slug)
|
700 |
return urllib.quote_plus(slug)
|
701 |
|
701 |
|
702 |
def shorthand_id(self):
|
702 |
def shorthand_id(self):
|
703 |
return self.short
|
703 |
return self.short
|
704 |
|
704 |
|
705 |
class AwardGrant(Artifact):
|
705 |
class AwardGrant(Artifact):
|
|
... |
|
... |
733 |
def icon(self):
|
733 |
def icon(self):
|
734 |
return AwardFile.query.get(award_id=self.award_id)
|
734 |
return AwardFile.query.get(award_id=self.award_id)
|
735 |
|
735 |
|
736 |
def url(self):
|
736 |
def url(self):
|
737 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
737 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
738 |
return urllib.unquote_plus(slug)
|
738 |
return urllib.quote_plus(slug)
|
739 |
|
739 |
|
740 |
def longurl(self):
|
740 |
def longurl(self):
|
741 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
741 |
slug = str(self.granted_to_project.shortname).replace('/','_')
|
742 |
slug = str(self.granted_by_neighborhood.url_prefix + "_admin/awards/"
|
742 |
slug = str(self.granted_by_neighborhood.url_prefix + "_admin/awards/"
|
743 |
+ self.award.short + '/' + slug)
|
743 |
+ self.award.short + '/' + slug)
|
744 |
return urllib.unquote_plus(slug)
|
744 |
return urllib.quote_plus(slug)
|
745 |
|
745 |
|
746 |
def shorthand_id(self):
|
746 |
def shorthand_id(self):
|
747 |
if self.award:
|
747 |
if self.award:
|
748 |
return self.award.short
|
748 |
return self.award.short
|
749 |
else:
|
749 |
else:
|