An actual minimum viable product, maybe? #11

Merged
andrewlalis merged 43 commits from develop into master 2018-10-12 18:19:41 +00:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit 6e1a6fc3fa - Show all commits

View File

@ -44,6 +44,12 @@ class RateableEntity(models.Model):
def __str__(self): def __str__(self):
return self.name return self.name
def getType(self):
for (t, t_name) in RateableEntity.TYPE_CHOICES:
if t == self.entity_type:
return t_name
return ''
# A review represents any single data entry to the database. # A review represents any single data entry to the database.
class Review(models.Model): class Review(models.Model):
# An integer rating in the domain [1, 5] # An integer rating in the domain [1, 5]

View File

@ -10,7 +10,7 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="ibox float-e-margins "> <div class="ibox float-e-margins ">
<div class="ibox-content"> <div class="ibox-content">
<h2> <h2
{{ results|length }} results found for: <span class="text-navy test">"{{ search_query }}"</span> {{ results|length }} results found for: <span class="text-navy test">"{{ search_query }}"</span>
</h2> </h2>
@ -33,7 +33,7 @@
<div class="hr-line-dashed"></div> <div class="hr-line-dashed"></div>
<div class="search-result"> <div class="search-result">
<h3><a href="/rateables/{{ entity.pk }}">{{ entity.name }}</a></h3> <h3><a href="/rateables/{{ entity.pk }}">{{ entity.name }}</a></h3>
<a href="#" class="search-link">UNIVERSITY</a> <a href="#" class="search-link">{{ entity.getType }}</a>
<span class="toright glyphicon glyphicon-icon-comments"></span> <span class="toright glyphicon glyphicon-icon-comments"></span>
</div> </div>