Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Show event/group cover in directory
Browse files Browse the repository at this point in the history
  • Loading branch information
whs committed Dec 18, 2015
1 parent e652b1d commit 84f851a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 0 additions & 4 deletions User/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,3 @@ def create_profile(sender, instance, created, **kwargs):
"""Create a matching profile whenever a user object is created."""
if created:
profile, new = UserProfile.objects.get_or_create(user=instance)
if profile.gender == 'Male' or 'M':
profile.picture = File(open('media/default/male.png'))
else:
profile.picture = File(open('media/default/female.png'))
4 changes: 1 addition & 3 deletions ui/static/templates/eventbrowse.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ <h1>Upcoming events</h1>
<h2>Featured events</h2>

<div class="largegroup" ui-sref="root.event({event: first_event.id})">
<div class="image col-sm-3" style="background: #ccc"></div>
<div class="col-sm-9 description">
<div class="col-sm-12 description">
<h3 class="title">{{first_event.name}}</h3>
<div class="date"><i class="glyphicon glyphicon-time"></i>{{first_event.start_date}}</div>
<div class="message">
Expand All @@ -23,7 +22,6 @@ <h3 class="title">{{first_event.name}}</h3>
<div class="row">
<div class="col-md-4" ng-repeat="data in events">
<div class="groupblock" ui-sref="root.event({event: data.id})">
<div class="image" style="background: #ccc"></div>
<div class="description">
<h4 class="title">{{data.name}}</h4>
<div class="date"><i class="glyphicon glyphicon-time"></i>{{data.start_date}}</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/static/templates/groupbrowser.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h1>Find interest groups to join</h1>
<h2>Featured group</h2>

<div class="largegroup" ui-sref="root.group.info({id: allGroups[0].id})">
<div class="image col-sm-3" style="background: #ccc"></div>
<div class="image col-sm-3" style="background: url({{allGroups[0].cover}}) #ccc center center no-repeat; background-size: contain;"></div>
<div class="col-sm-9 description">
<h3 class="title">{{allGroups[0].name}}</h3>
<div class="message">
Expand Down
4 changes: 2 additions & 2 deletions ui/static/templates/groupbrowser_cat.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h1>{{category}}</h1>
</header>

<div class="largegroup" ui-sref="root.group.info({id: g.id})">
<div class="image col-sm-3" style="background: #ccc"></div>
<div class="image col-sm-3" style="background: url({{g.cover}}) #ccc center center no-repeat; background-size: contain;"></div>
<div class="col-sm-9 description">
<h3 class="title">{{g.name}}</h3>
<div class="message">
Expand All @@ -19,7 +19,7 @@ <h3 class="title">{{g.name}}</h3>
<div class="row">
<div class="col-md-4" ng-repeat="data in groups">
<div class="groupblock" ui-sref="root.group.info({id: data.id})">
<div class="image" style="background: #ccc"></div>
<div class="image" style="background: url({{data.cover}}) #ccc center center no-repeat; background-size: contain;"></div>
<div class="description">
<h4 class="title">{{data.name}}</h4>
<div class="message">
Expand Down

0 comments on commit 84f851a

Please sign in to comment.