[Dev-flock] recent activity
Lucy Mendel
lucy at thoughtandmemory.org
Wed Jun 11 03:59:40 EDT 2008
yo,
i played around with the
templates/user/impact.html
code.
it looks like logging has been turned off, since recent activity is no
longer being logged (see hm/db/log.py to see what i'm talking about)
at the bottom of the email is the svn diff of my changes n case you're
interested.
fYI - dan and I are going to meet at the end of june, some
20-something day, to prioritize more concrete tasks for the code
cleanup. we plan to work hard to get the repo into a more manageable
state (eg, fixing broken template tags and documenting their use on
the wiki, or removing their use from the code) by the end of July.
this is the most important task period. the easier new developers can
ramp up on the code and not get frustrated with brokenness or
inconsistency the more developers will have fun coding. we all know
that's the real goal for the organization, right?
there are several fun modules to work on at this point, so don't miss out.
i'm falling asleep now, so i'll send another email later about the
status of other projects. i have some more status-type stuff to post
tot he cellphone system/data gathering wiki, though it is public if
you want to check it out.
good luck,
l.
Index: app/views/main.py
===================================================================
--- app/views/main.py (revision 845)
+++ app/views/main.py (working copy)
@@ -126,7 +126,7 @@
for beh in my_behaviors:
for arg in beh.arguments:
data = data + get_arg_json(arg)
-
+
data = "{'arguments': [" + data.rstrip(",") + "]}"
return HttpResponse( data, mimetype="text/javascript" )
@@ -308,13 +308,23 @@
# convert to int else
uid = int(user_id)
-
+
+ actions = []
# selected user; uid==0 means no user selected
if uid > 0:
user_selected = True
# TODO: currently no UserExtended objects exist. There should be
# a 1-to-1 mapping between Users and UserExtended
user = User.objects.select_related().get(id=uid)
+ # get last 10 actions taken by user
+ #for a in Action.by_user(user)[:10]:
+ # a_data = {'time':a.time,
+ # 'label':a.item.label,
+ # 'description':a.item.description,
+ # 'item_type':a.item_type,
+ # 'item':a.item,
+ # 'item_id':a.item_id,}
+ # actions.append(a_data)
else:
user_selected = False
user = 0;
@@ -322,6 +332,7 @@
dict['user']=user
dict['page']='user'
dict['profile']=user.profile
+ #dict['actions']=actions
return render_to_response('user/page.html', dict)
Index: app/templates/user/page.html
===================================================================
--- app/templates/user/page.html (revision 845)
+++ app/templates/user/page.html (working copy)
@@ -12,9 +12,9 @@
{% endblock %}
{% block content_half_left %}
- {# include 'user/profile.html' #}
+ {% include 'user/profile.html' %}
{% endblock %}
{% block content_half_right %}
- {# include 'user/impact.html' #}
+ {% include 'user/impact.html' %}
{% endblock %}
Index: app/templates/user/impact.html
===================================================================
--- app/templates/user/impact.html (revision 845)
+++ app/templates/user/impact.html (working copy)
@@ -2,37 +2,23 @@
{% pane "impact" "Actions and Impact" %}
{% for ua in user.profile.actions|order:"-time"|limit:10 %}
- {% let item=ua.item %}
- {% case item|typename %}
- {% when "Rating" %}
- You gave {{item.item}} a score of {{item.score}}
- {% when "Tag" %}
- Tag
- {% when "Tagging" %}
- Tagging
- {% when "Node" %}
- You created {{item.label}}
- {% when "Edge" %}
- Edge
- {% when "Behavior" %}
- Review
- {% when "Argument" %}
- Review
- {% when "Dimension" %}
- Dimension
- {% when "Author" %}
- Author
- {% when "Source" %}
- Source
- {% when "Article" %}
- Article
- {% when "Citation" %}
- Citation
- {% else %}
- Not sure what you did...
- {{ item|typename }}
- {% endcase %}
- <br />
+ {{ ua.time|date:"F jS, Y H:i" }}:
+ {% ifequal ua.item_type.name "argument" %}
+ You reviewed the ua.item.behavior.dimension interest
on ua.item.behavior.node
+ {% endifequal %}
+ {% ifequal ua.item_type.name "behavior" %}
+ You reviewed the ua.item.dimension interest on ua.item.node
+ {% endifequal %}
+ {% ifequal ua.item_type.name "dimension" %}
+ You added the ua.item.label interest
+ {% endifequal %}
+ {% ifequal ua.item_type.name "rating" %}
+ You gave {{item.item}} a score of {{imte.score}}
+ {% endifequal %}
+ {% ifequal ua.item_type.name "node" %}
+ You created {{ua.item.label}}
+ {% endifequal %}
+ <br />
{% endfor %}
<p> TODO: show user's actions. and impact of actions.</p>
More information about the Dev-flock
mailing list