Commit c6a48c3d authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

asdf

parent 37fbed34
......@@ -8,12 +8,28 @@
<div class="col-md-6 back-tiles pull-left"><h3>Interest Feed</h3>
<div class="row">
<div class="front-tiles"><h4>Opportunities matching with your tags. Query all opportunities and filtering by the user's tags and the date posted in reverse order.</h4></div>
<div class="feed">
{% for entry in tag_feed $}
{{ entry }}
{% endfor %}
</div>
</div>
</div>
<div class="col-md-6 back-tiles pull-right"><h3>Org Feed</h3>
<div class="row">
<div class="front-tiles"><h4>All of the activity from your organizations. All opportunities from your selected organization sorted by reverse date.</h4></div>
<div class="feed">
{% for entry in org_feed $}
{{ entry }}
{% endfor %}
</div>
</div>
</div>
</div>
......@@ -22,12 +38,28 @@
<div class="col-md-6 back-tiles pull-left"><h3>Recommendations</h3>
<div class="row">
<div class="front-tiles"><h4>Will show recommended events by your previous activity at some point, but for the time being, it wil merely newly created tags and organizations.</h4></div>
<div class="feed">
{% for entry in tags_and_orgs_feed $}
{{ entry }}
{% endfor %}
</div>
</div>
</div>
<div class="col-md-6 back-tiles pull-right"><h3>Everything</h3>
<div class="row">
<div class="front-tiles"><h4>Query all the things</h4></div>
<div class="feed">
{% for entry in combined_feed $}
{{ entry }}
{% endfor %}
</div>
</div>
</div>
</div>
......
......@@ -89,3 +89,9 @@ body {
.centered-image {
text-align: center;
}
.feed {
min-width: 100px;
height: 200px;
overflow-x: scroll;
}
......@@ -53,8 +53,24 @@ def index(request):
# except (InvalidPage, EmptyPage):
# opportunities = paginator.page(paginator.num_pages)
tag_opportunities = []
current_tags = request.user.tags.all()
for tag in current_tags:
opportunity = Opportunity.objects.filter(tags=tag).all()
tag_opportunities.append( opportunity )
org_opportunities = []
current_orgs = request.user.organizations.all()
for org in current_orgs:
opportunity = Opportunity.objects.filter(organizations=org).all()
org_opportunities.append( opportunity )
return render_to_response('index.html', {
# "everything" : Objects.opportunities.all(),
"current_user" : request.user,
"tag_feed" : tag_opportunities,
"org_feed" : org_opportunities,
},
context_instance = RequestContext(request),
)
......@@ -70,18 +86,18 @@ def opportunity(request, slug):
@login_required
def person(request, slug):
return render_to_response('person.html', {
"current_user" : request.user,
"requested_user" : Person.objects.get(user__username=slug),
"requested_tags" : Person.objects.get(user__username=slug).tags.all(),
#"global_tags" : Tag.objects.all(),
"global_events" : Opportunity.objects.all(),
"sunday" : len(Person.objects.get(user__username=slug).sunday),
"monday" : len(Person.objects.get(user__username=slug).monday),
"tuesday" : len(Person.objects.get(user__username=slug).tuesday),
"wednesday" : len(Person.objects.get(user__username=slug).wednesday),
"thursday" : len(Person.objects.get(user__username=slug).thursday),
"friday" : len(Person.objects.get(user__username=slug).friday),
"saturday" : len(Person.objects.get(user__username=slug).saturday),
"current_user" : request.user,
"requested_user" : Person.objects.get(user__username=slug),
"requested_tags" : Person.objects.get(user__username=slug).tags.all(),
#"global_tags" : Tag.objects.all(),
"global_events" : Opportunity.objects.all(),
"sunday" : len(Person.objects.get(user__username=slug).sunday),
"monday" : len(Person.objects.get(user__username=slug).monday),
"tuesday" : len(Person.objects.get(user__username=slug).tuesday),
"wednesday" : len(Person.objects.get(user__username=slug).wednesday),
"thursday" : len(Person.objects.get(user__username=slug).thursday),
"friday" : len(Person.objects.get(user__username=slug).friday),
"saturday" : len(Person.objects.get(user__username=slug).saturday),
},
context_instance = RequestContext(request),
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment