> == Proposed fix ==
> Many changes! 3.0 goodness. View and see.
> e.g. https://dogfood.launchpad.net/ubuntu/+source/amarok
Looks great, thanks for working on this!
> == Implementation details ==
> The old page was tough to render, this one is no different. The hard part is
> the table of the versions in each series.
>
> Most of the logic is done in the view class, which pumps out rows of
> dictionaries that the template then throws on the page. It uses 3 different
> types of row:
> * a distro series header
> * package details
> * blank row
>
> The type of row is determined by boolean dictionary properties in each row
> returned by view/version_table. I couldn't think of a better way of doing
> this since all the knowledge of how to render stuff is in the view.
>
> The package detail rows also have a JS expander that does an XHR call to get
> more data. This is the same XHR call that the PPA page does to open rows
> there. I had to tweak the JS a little to make it work outside of an archive
> context. It does this by coding the archive url in the template as a
> +
> +
> +
Do you think this is better...
?
> @@ -40,61 +64,165 @@
> +
+ tal:define="newbugs context/new_bugtasks/count;
> + open_questions view/open_questions/count">
> + This package has
> +
new bug
> + and
open question.
Thanks for using the new bugs-stat class! But ouch! this run-on TAL is really
hard to read. Can you reformat it to make the code easier on the eyes?
> +
*actual publishing details may vary in this distribution, these are just the package defaults.
Wrap line?
(By now my eyes are melting at all the TAL)
=== modified file 'lib/lp/soyuz/templates/archive-macros.pt'
--- lib/lp/soyuz/templates/archive-macros.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/archive-macros.pt 2009-08-25 17:05:15 +0000
> @@ -64,9 +64,18 @@
> }
> };
>
> + /*
> + * If a page wants to use this outside of an archive context then it
> + * car define LP.client.cache['archive_context'], which should be a
s/car/can/
> + * full or relative URL to the context archive page required.
> + */
> + var base_url = (typeof(LP.client.cache['archive_context_url']) != "undefined") ? LP.client.cache['archive_context_url'] : '';
Wrap line?
> + if (base_url !== ''){
Space between ) and {
> + base_url += '/'
> + }
> var pub_id = container.get('id').replace(
> '-container', '').replace('pub', '');
> - var uri = '+sourcepub/' + pub_id + '/+listing-archive-extra';
> + var uri = base_url + '+sourcepub/' + pub_id + '/+listing-archive-extra';
> Y.io(uri, config);
> }
>