#4054 my_projects macro

unreleased
open
nobody
None
General
nobody
2012-05-22
2012-04-16
No

Create a [[my_projects]] macro that uses the projects that user.my_projects() returns, and also supports the display options of the [[projects]] macro. Re-use the same output templates. This should work on a wiki installed onto a user-project (e.g. /u/admin1) and use that user (e.g. admin1) not the logged in user, to get the list of projects.

The 'neighborhood-wiki' context will have to change for my_projects macro. If there's a way to limit the context to the /u/ neighborhood that'd be nice, but I doubt the current macro context logic supports it.

The long-term goal is to be able to replace the user profile page (allura/ext/user_profile/templates/user_index.html) with a regular wiki page.

Related

Tickets: #4054

Discussion

  • Yaroslav Luzin - 2012-04-17

    created #39: [#4054] Create my_projects macro (2cp)

     

    Related

    Tickets: #4054

  • Yaroslav Luzin - 2012-04-18

    closed #39, pushed changes into 42cc_4054

     
  • Dave Brondsema

    Dave Brondsema - 2012-04-18
    • We don't need to support the my_projects type on pages that aren't user-projects (e.g. the 'else' block that starts with admin_role_id can go away)
    • I'd like to move as much of the "if macro_type" switching out of the shared get_projects_for_macro function, and do it in the projects or my_projects function. For example, they could each pass an initial_q param to get_projects_for_macro. The projects function could build an initial_q with the neighborhood_id set and the my_projects function could build one with the _id matching the list of ids. Hopefully that will keep the get_projects_for_macro function simpler, e.g. only having one random sort logic.
    • You can check is_user_project instead of c.project.neighborhood.name == "Users" and c.project.name[:2] == u"u/":
     
  • Yaroslav Luzin - 2012-04-19

    created #40: [#4054] my_projects macro refactoring and small amendments (1cp)

     

    Related

    Tickets: #4054

  • Yaroslav Luzin - 2012-04-24

    Closed the ticket #40 and pushed changes into 42cc_4054

     
  • Dave Brondsema

    Dave Brondsema - 2012-04-24
    • status: open --> closed
    • qa: ᗫave ᙖrondsema
    • size: --> 0
    • milestone: forge-backlog --> forge-may-04
     
  • Jenny Steele - 2012-04-27
    • status: closed --> open
     
  • Jenny Steele - 2012-04-27

    I added the macro to my user project and nothing showed up. https://sourceforge.net/u/spiffk/wiki/Home/

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-03

    I cannot reproduce this production issue on a sandbox. If the macro were running and not selecting any projects, it says "No projects found". If the macro's userproject-wiki context constraint were failing, it'd show a literal `[[my_projects]``. Lastly, if there is text before or after the macro, it is not shown at all. Something is preventing the whole page from rendering.

    After [#4057] is live, we can look for matching logs more easily. Maybe there will be a clue there.

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-09
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-18
    • milestone: forge-jun-01 --> forge-backlog
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-18

    We don't need this macro right now for anything, so not a priority to fix.

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-22
    • qa: Dave Brondsema⍾ --> nobody
     

Log in to post a comment.