This is look good, really no problems I've found, but some cleanup can be done to keep the code smaller and simpler - always good :)
The {% block actions %} section will never run since the current user is always the user. (It runs on Activity tools when you look at another person's/project's activity). So that can be removed.
And then the follow_toggle and following variables aren't used, so the code for them can be removed. (Which is good anyway since those had trailing commas like FollowToggle(), which would make them incorrectly be a tuple)
the follow.js javascript code doesn't do anything (it runs on $('.artifact_follow') elements and there aren't any on the page). So we can omit the config dir and register_ew_resources and g.register_js, etc.
the activity.html template is virtually the same as the ForgeActivity profile_section.html template. And ActivitySection.prepare_context is very similar to ForgeActivityProfileSection.prepare_context, although it will have some differences now. I think it'd be worth updating the templates so the ~20 lines of HTML isn't duplicated. I think the best way would be to move everything that is within {% block content %} into the forgeactivity templates/macros.html file as a new macro. That macro file is already imported into both of the templates. Then within the block content section of both files you just have to call the macro something like am.timeline_section(timeline, activity_app) or whatever you name it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is look good, really no problems I've found, but some cleanup can be done to keep the code smaller and simpler - always good :)
{% block actions %}
section will never run since the current user is always the user. (It runs on Activity tools when you look at another person's/project's activity). So that can be removed.follow_toggle
andfollowing
variables aren't used, so the code for them can be removed. (Which is good anyway since those had trailing commas likeFollowToggle(),
which would make them incorrectly be a tuple)$('.artifact_follow')
elements and there aren't any on the page). So we can omit the config dir and register_ew_resources and g.register_js, etc.{% block content %}
into the forgeactivity templates/macros.html file as a new macro. That macro file is already imported into both of the templates. Then within theblock content
section of both files you just have to call the macro something likeam.timeline_section(timeline, activity_app)
or whatever you name it.Thanks for the feedback. I've done the changes and updated