cool. -b
On Mon, Aug 24, 2015 at 6:55 AM, Barros Pena, Belen <[email protected]> wrote: > > > On 24/08/2015 13:42, "Smith, Elliot" <[email protected]> wrote: > >>On 21 August 2015 at 10:05, Barros Pena, Belen >><[email protected]> wrote: >> >>On 21/08/2015 00:34, "Brian Avery" <[email protected]> wrote: >> >>>I'm far from an expert in this, but it seems like basing logic on url >>>paths is kinda fragile (5759e6). >> >>> Are there better options? >> >>There are 2 options I can think of: >> >>1. Create separate templates, but that would require 4 of them (for all >>builds, all projects, landing and all other pages) and sounds like a >>nightmare to maintain >> >>2. Use a different element of the content for the conditional, although >>that sounds even more fragile than using the url, since the url is bound >>to be more stable than the content. >> >> >> >> >>For 2, it's possible to get the "url name" for the requested view, which >>should be more stable than the URL or other page content, e.g. >> >> >> {% if request.resolver_match.url_name == 'all-builds' %} > > Thanks, Elliot > > This sounds better to me, particularly because it means we don't need to > change the actual URL (I am bit concerned about what that could break). > > I will send a v2. > > Cheers > > Belén > >> >> >> >>NB request.resolver_match.url_name effectively does the reverse of >> >> >> url 'all-builds' >> >> >>Elliot >> >> >> >>There are probably others though: I just can't think of them :) This is >>Michael's code, so I can hold off until he comes back and see what he >>suggests. >> >>Thanks! >> >>Belén >> >>> >>>-b >>> >>>On Thu, Aug 20, 2015 at 8:48 AM, Barros Pena, Belen >>><[email protected]> wrote: >>>> bbarrosp/project-builds >>>> >>>> de40156a5c6286e62964f28499cdf2680008f808 >>>> bitbake: toastergui: adjust spacing in project pages >>>> >>>> 5759e617ff02d294557adacf8ef33a3272bbb91c >>>> bitbake: toastergui: fix global navigation >>>> >>>> >>>> Thanks! >>>> >>>> Belén >>>> >>>> >>>> >>>> -- >>>> _______________________________________________ >>>> toaster mailing list >>>> [email protected] >>>> >>https://lists.yoctoproject.org/listinfo/toaster >><https://lists.yoctoproject.org/listinfo/toaster> >> >>-- >>_______________________________________________ >>toaster mailing list >>[email protected] >>https://lists.yoctoproject.org/listinfo/toaster >> >> >> >> >> >> >> >> >> >>-- >>Elliot Smith >>Software Engineer >>Intel Open Source Technology Centre >> >> >> >> > -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
