[ckan-changes] [okfn/ckan] 302649: This is an initial implementation of the activity ...

noreply at github.com noreply at github.com
Fri Jan 6 12:01:12 UTC 2012

  Branch: refs/heads/feature-1515-activity-streams
  Home:   https://github.com/okfn/ckan

  Commit: 30264997c7fe34324381123d6741d404baa67c1e
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-01-06 (Fri, 06 Jan 2012)

  Changed paths:
    M ckan/controllers/user.py
  M ckan/lib/helpers.py
  M ckan/logic/action/get.py
  M ckan/templates/_util.html
  A ckan/templates/activity_streams/changed_package.html
  A ckan/templates/activity_streams/changed_resource.html
  A ckan/templates/activity_streams/new_package.html
  A ckan/templates/activity_streams/new_resource.html
  M ckan/templates/user/read.html

  Log Message:
  This is an initial implementation of the activity activity streams
templating. Adds an HTML rendering of a user's activity stream into
their user page, in place of the revision list.

The functions added to logic/action/get.py currently call other logic
functions (package_show(), resource_show()) to get things like package
and resource titles for use in activity streams templates. This kind of
information needs to be added to and retrieved from the 'data' columns
of the activity and activity_detail tables instead.

There are still edge cases and details to be handled properly.


- Added user_activity_list_html() function, returns the activity list
	for a user as a rendered HTML snippet for including in an HTML page.

- Uses a dict activity_renderers as a registry of functions for
	rendering different types of activity. In the future there might be an
	extension point where extensions can register functions for rendering
	types of activity, and the functions will be added to this dict.

- Added renderer functions for new and changed packages and resources.
	These use the new template files added to


- UserController.read() call the user_activity_list_html() logic
	function, save the returned HTML in the template context.


- Retrieve the activity stream HTML from the template context, use it in
	place of the revisions list.


- Added optional date_format argument to render_datetime().


- Added resource_summary() genshi function.

More information about the ckan-changes mailing list