Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cofounders/freyalove
Browse files Browse the repository at this point in the history
added dropdown search for who field for #121 and #118. pending functionality and polishing the design.
  • Loading branch information
sayanee committed Aug 23, 2012
2 parents 532a7bd + 7390347 commit 5fa8ca3
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 54 deletions.
14 changes: 7 additions & 7 deletions freyalove/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
url(r'^users/friends/leaderboard/summary/$', 'freyalove.api.views.currentuser.leaderboard'),

# OTHER USERS
url(r'^users/(?P<fb_username>[-\w]+)/profile/$', 'freyalove.api.views.otherusers.profile'),
url(r'^users/(?P<fb_username>[-\w]+)/profile/summary/$', 'freyalove.api.views.otherusers.profile_summary'),
url(r'^users/(?P<fb_username>[-\w]+)/friends/$', 'freyalove.api.views.otherusers.friends'),
url(r'^users/friends/(?P<fb_username>[-\w]+)/mutual/$', 'freyalove.api.views.otherusers.mutual_friends'),
url(r'^users/(?P<fb_username>[-\w.]+)/profile/$', 'freyalove.api.views.otherusers.profile'),
url(r'^users/(?P<fb_username>[-\w.]+)/profile/summary/$', 'freyalove.api.views.otherusers.profile_summary'),
url(r'^users/(?P<fb_username>[-\w.]+)/friends/$', 'freyalove.api.views.otherusers.friends'),
url(r'^users/friends/(?P<fb_username>[-\w.]+)/mutual/$', 'freyalove.api.views.otherusers.mutual_friends'),

# ACTIVITIES
url(r'^activities/sexytimes/upcoming/$', 'freyalove.api.views.activities.fetch_sexytimes'),
Expand All @@ -47,9 +47,9 @@
url(r'^matchmaker/(?P<userid_list>[-\w+]+)/questions/answered/$', 'freyalove.api.views.matchmaking.answered'),

# QUESTIONNAIRE
url(r'^users/(?P<fb_username>[-\w]+)/questionnaire/categories/$', 'freyalove.api.views.questionnaire.categories'),
url(r'^users/(?P<fb_username>[-\w]+)/questionnaire/questions/random/(?P<status>[-\w]+)/$','freyalove.api.views.questionnaire.random_questions'),
url(r'^users/(?P<fb_username>[-\w]+)/questionnaire/(?P<category>[-\w]+)/(?P<status>[-\w]+)/$','freyalove.api.views.questionnaire.filter_questions'),
url(r'^users/(?P<fb_username>[-\w.]+)/questionnaire/categories/$', 'freyalove.api.views.questionnaire.categories'),
url(r'^users/(?P<fb_username>[-\w.]+)/questionnaire/questions/random/(?P<status>[-\w]+)/$','freyalove.api.views.questionnaire.random_questions'),
url(r'^users/(?P<fb_username>[-\w.]+)/questionnaire/(?P<category>[-\w]+)/(?P<status>[-\w]+)/$','freyalove.api.views.questionnaire.filter_questions'),
url(r'^questionnaire/questions/add/$', 'freyalove.api.views.questionnaire.answer'),

# Index
Expand Down
6 changes: 3 additions & 3 deletions freyalove/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ def wink_notify(sender, instance, **kwargs):
except Wink.DoesNotExist:
# wink creation
if not instance.received and not instance.accepted:
notify.send(instance.from_profile.user_object, recipient=instance.from_profile, verb="winked at", action_object=instance, target=instance.to_profile)
notify.send(instance, recipient=instance.to_profile.user_object, verb="winked at")
if instance.received == wink_in_db.received:
pass
if not wink_in_db.accepted and instance.accepted: # wink response
notify.send(instance.to_profile.user_object, ecipient=instance.to_profile, verb="winked at", action_object=instance, target=instance.from_profile)
notify.send(instance, recipient=instance.to_profile.user_object, verb="winked back")

# Register with freyalove.notifications
pre_save.connect(wink_notify, sender=Wink, dispatch_uid="wink_presave")
#pre_save.connect(wink_notify, sender=Wink, dispatch_uid="wink_presave")
6 changes: 3 additions & 3 deletions www/templates/views/activities/recent.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ <h3>Recent Activity</h3>
<li>
{{#FRIEND_JOIN}}
Your friend
{{#friend}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>{{/friend}}
{{#friend}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>{{/friend}}
joined FreyaLove.
{{/FRIEND_JOIN}}

{{#ARRANGED_SEXYTIME}}
Your friends
{{#from}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>{{/from}}
{{#from}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>{{/from}}
and
{{#to}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>{{/to}}
{{#to}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>{{/to}}
are going to <span class="where">{{where}}</span>
on <span class="when">{{when}}</span>.
{{#notes}}
Expand Down
8 changes: 4 additions & 4 deletions www/templates/views/conversations/conversation.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="conversations-conversation">
<header>
<h2>Conversation with {{#participants}}{{name}}{{/participants}}</h2>
<h2>Conversation with {{#participants}}{{firstName}} {{lastName}}{{/participants}}</h2>
<p><a href="/conversations">View All Conversations</a></p>
</header>
<article>
Expand All @@ -9,14 +9,14 @@ <h2>Conversation with {{#participants}}{{name}}{{/participants}}</h2>
{{#messages}}
<li>
{{#from}}
<a href="/profile/{{id}}" title="Profile of {{name}}">
<img src="{{photo}}" alt="{{name}}" />
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
</a>
{{/from}}
<div class="conversation-content">
<p>
{{#from}}
<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>
{{/from}}
<span class="when">{{when}}</span>
</p>
Expand Down
4 changes: 2 additions & 2 deletions www/templates/views/conversations/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ <h3>Conversations</h3>
{{/from}}{{/lastMessage}}
{{#lastMessage}}
{{#from}}
<img src="{{photo}}" alt="{{name}}" />
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
{{/from}}
<div class="popup-conversation-profile-details">
<p>{{#from}}{{name}}{{/from}}</p>
<p>{{#from}}{{firstName}} {{lastName}}{{/from}}</p>
<p>{{body}}</p>
<p>{{when}}</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions www/templates/views/conversations/recent.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ <h2>Inbox</h2>
<li class="{{#UNREAD}}un{{/UNREAD}}read">
{{#lastMessage}}
{{#from}}
<img src="{{photo}}" alt="{{name}}" />
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
{{/from}}
<div class="conversation-content">
<p>
<span class="name">{{#from}}{{name}}{{/from}}</span>
<span class="name">{{#from}}{{firstName}} {{lastName}}{{/from}}</span>
<span class="when">{{when}}</span>
</p>
<p>{{body}}</p>
Expand Down
4 changes: 2 additions & 2 deletions www/templates/views/friends/all.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ <h3>Your Friends ({{count}})</h3>
<ul>
{{#friends}}
<li>
<a href="/profile/{{id}}" title="Profile of {{name}}">
<img src="{{photo}}" alt="{{name}}" />
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
</a>
</li>
{{/friends}}
Expand Down
6 changes: 3 additions & 3 deletions www/templates/views/friends/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ <h3>Common Friends ({{count}})</h3>
<ul>
{{#friends}}
<li>
<a href="/profile/{{id}}" title="Profile of {{name}}">
<img src="{{photo}}" alt="{{name}}" />
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
</a>
</li>
{{/friends}}
</ul>
{{#matchmaker}}
<p>You were introduced by <a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a></p>
<p>You were introduced by <a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a></p>
{{/matchmaker}}
</article>
</section>
2 changes: 1 addition & 1 deletion www/templates/views/friends/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img id="profile-pic" src="{{photo}}../dummy/user1.png" alt="My profile picture" />
<div id="profile-snapshot">
<h1>
{{name}}
{{firstName}} {{lastName}}
{{#isMe}}
me
{{/isMe}}
Expand Down
6 changes: 3 additions & 3 deletions www/templates/views/friends/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ <h2>Found {{count}} Search Results for {{query}}</h2>
<ol>
{{#friends}}
<li>
<a href="/profile/{{id}}" title="Profile of {{name}}">
<img src="{{photo}}" alt="{{name}}" />
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
</a>
<div class="search-profile-details">
<p>
<a href="/profile/{{id}}" class="name" title="Profile of {{name}}">{{name}}</a>
<a href="/profile/{{id}}" class="name" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>
</p>

{{#dateOfBirth}}
Expand Down
2 changes: 1 addition & 1 deletion www/templates/views/header/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h1>
<form method="get" class="search">
<input type="text" name="query" maxlength="100" placeholder="Find friends..." />
</form>
<a class="name" href="/profile/{{id}}" title="View my profile">{{name}}</a>
<a class="name" href="/profile/{{id}}" title="View my profile">{{firstName}} {{lastName}}</a>
<a class="signout" href="#" title="Sign out">Sign out</a>
</nav>
</div>
Expand Down
10 changes: 5 additions & 5 deletions www/templates/views/matches/couples.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ <h2>Aren’t they just cute together? Introduce them!</h2>
{{#items}}
<li{{#selected}} class="selected"{{/selected}}>
<a href="/matchmaker/{{#first}}{{id}}{{/first}}/with/{{#second}}{{id}}{{/second}}"
title="Compare the profiles of {{#first}}{{name}}{{/first}} and {{#second}}{{name}}{{/second}}">
title="Compare the profiles of {{#first}}{{firstName}} {{lastName}}{{/first}} and {{#second}}{{firstName}} {{lastName}}{{/second}}">
{{#first}}
<div class="first">
<img src="{{photo}}" alt="{{name}}" />
<h5>{{name}}</h5>
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
<h5>{{firstName}} {{lastName}}</h5>
</div>
{{/first}}
{{#second}}
<div class="second">
<img src="{{photo}}" alt="{{name}}" />
<h5>{{name}}</h5>
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
<h5>{{firstName}} {{lastName}}</h5>
</div>
{{/second}}
</a>
Expand Down
6 changes: 3 additions & 3 deletions www/templates/views/matches/singles.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ <h2>Hmmm... These Girls Look Good For You...</h2>
<ol>
{{#items}}
<li{{#selected}} class="selected"{{/selected}}>
<img src="{{photo}}" alt="{{name}}" style="background-image: url({{photo}})" />
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" style="background-image: url({{photo}})" />

<h3><a href="/profile/{{id}}" id="name" title="Profile of {{name}}">{{name}}</a></h3>
<h3><a href="/profile/{{id}}" id="name" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a></h3>

{{#age}}
<p class="age">Age {{age}}</p>
Expand All @@ -33,7 +33,7 @@ <h5>About</h5>
</div>
{{/about}}

<a href="/profile/{{id}}" class="button cta" title="Profile of {{name}}">Check her out!</a>
<a href="/profile/{{id}}" class="button cta" title="Profile of {{firstName}} {{lastName}}">Check her out!</a>
</li>
{{/items}}
</ol>
Expand Down
4 changes: 2 additions & 2 deletions www/templates/views/matchmakers/top.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ <h3>Top Matchmakers</h3>
<ol>
{{#matchmakers}}
<li>
<img src="{{photo}}" alt="Picture of {{name}}" />
<img src="{{photo}}" alt="Picture of {{firstName}} {{lastName}}" />
<div class="matchmaker-points">
<p><a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a></p>
<p><a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a></p>
<p>{{points}} points</p>
</div>
</li>
Expand Down
6 changes: 3 additions & 3 deletions www/templates/views/notifications/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ <h3>Notifications</h3>
{{#notifications}}
<li>
{{#WINK_RECEIVED}}
{{#from}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a> smiled at you. <a href="#" class="smile_back">Smile back.</a>{{/from}}
{{#from}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a> smiled at you. <a href="#" class="smile_back">Smile back.</a>{{/from}}
{{/WINK_RECEIVED}}

{{#MATCH_INTRODUCTION}}
{{#matchmaker}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>{{/matchmaker}}
{{#matchmaker}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>{{/matchmaker}}
introduced you to
{{#to}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>{{/to}}
{{#to}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>{{/to}}
{{/MATCH_INTRODUCTION}}
</li>
{{/notifications}}
Expand Down
6 changes: 3 additions & 3 deletions www/templates/views/sexytimes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ <h3>Upcoming Dates</h3>
{{#sexyTimes}}
<li>
{{#from}}
<a href="/profile/{{id}}" title="Profile of {{name}}">
<img src="{{photo}}" alt="{{name}}" />
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
</a>
{{/from}}
<p>
You're meeting
{{#from}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>{{/from}}
{{#from}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>{{/from}}
<span class="when">{{when}}</span>
at <span class="where">{{where}}</span>.
</p>
Expand Down
6 changes: 3 additions & 3 deletions www/templates/views/sexytimes/upcoming.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ <h3>Upcoming Dates</h3>
{{#sexyTimes}}
<li>
{{#from}}
<a href="/profile/{{id}}" title="Profile of {{name}}">
<img src="{{photo}}" alt="{{name}}" />
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
</a>
{{/from}}
<p>
You're meeting
{{#from}}<a href="/profile/{{id}}" title="Profile of {{name}}">{{name}}</a>{{/from}}
{{#from}}<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">{{firstName}} {{lastName}}</a>{{/from}}
<span class="when">{{when}}</span>
at <span class="where">{{where}}</span>.
</p>
Expand Down
2 changes: 1 addition & 1 deletion www/templates/views/user/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img id="profile-pic" src="{{photo}}" alt="Your profile picture" />
<div id="profile-snapshot">
<h1>
{{name}}
{{firstName}} {{lastName}}
{{#isMe}}
<!-- TODO: remove after testing -->
me
Expand Down
6 changes: 3 additions & 3 deletions www/templates/views/winks/received.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ <h2>Hey, somebody winked at you!</h2>
{{#items}}
{{#from}}
<li{{#selected}} class="selected"{{/selected}}>
<a href="/profile/{{id}}" title="Profile of {{name}}">
<img src="{{photo}}" alt="{{name}}" />
<h6>{{name}}</h6>
<a href="/profile/{{id}}" title="Profile of {{firstName}} {{lastName}}">
<img src="{{photo}}" alt="{{firstName}} {{lastName}}" />
<h6>{{firstName}} {{lastName}}</h6>
</a>
</li>
{{/from}}
Expand Down

0 comments on commit 5fa8ca3

Please sign in to comment.