← Back to team overview

schooltool-developers team mailing list archive

Flourish sorting for reportLink directives

 

Hello guys.

Basically, so far, we (cough I...) have been using names for sorting reportLink directives in flourish. This lead me to:

name="group_a_id_cards_pdf"
name="c_student_competency_section_report"
name="b_virginia_section_report"

and so on...

So at first I thought that just adding "before" and "after" for the directive handler would do it, but later I discovered that these are old viewlets and the viewlet manager in flourish adapts old viewlets as ViewletProxy objects, reseting both attributes.

So in this revision:

http://bazaar.launchpad.net/~replaceafill/schooltool/report_link_sorting/revision/3569

I added a more specific adapter for IReportLinkViewlet objects that basically restores the "old" attribute.

I tested the change, removing the previous name hacks and it seems to work.

Maybe it would be simpler to just add a flourish:reportLink handler that produces flourish viewlets? This of course means we'd have to change all the existing registrations.

Could you please review it and let me know what you think?

Thanks!

Douglas