[OFBiz] Dev - UI Idea
Adrian Crum
adrianc at hlmksw.com
Wed Mar 30 10:14:26 EST 2005
I put the "Printable" link in the application's tab bar (header.ftl)
just to the left of the Logout button. That way it is always available.
I modified our main decorator to eliminate the main application menu
(the application tabs) when printable=Y. Then each page has conditional
logic to remove non-essential information when printable=Y.
I'm not sure how screen widgets would work either. We're just using them
to grab bsh and ftl files from different places.
bjfree at free-man.net wrote:
> I like the idea,
> not sure how to implement the coding for the page.
> No sure if their would be a way to pass this to the screen widget and have
> it do a different decorator but same content.
>
>
> -----Original Message-----
> From: Adrian Crum [mailto:adrianc at hlmksw.com]
> Sent: Wednesday, March 30, 2005 1:53 AM
> To: OFBiz Project Development Discussion (High Traffic)
> Subject: [OFBiz] Dev - UI Idea
>
>
> I've implemented an idea here that I thought I would share with the
> group and see if there is any interest in including it in the project.
>
> When I visit websites, I really like the ability on some pages to click
> on a "Printable Version" link and have a stripped down version of the
> page appear - so that it can be printed.
>
> We implemented that here in OFBiz using two strategies: 1. Have all
> pages test for a printable=Y request parameter and suppress
> non-printable content when it exists, 2. Edit pages so that a Printable
> Version link is available.
>
> In FTL it looks like this:
>
> -----------------------------------------------------------
> <#assign currentURL = request.getRequestURL()>
> <#assign queryString = "?" + request.getQueryString()?default("")>
> ...
> ...
> <#if queryString?contains("&printable=Y")>
> <a
> href="${currentURL}${queryString?replace("&printable=Y","")}">Normal
> Version</a>
> <#else>
> <a href="${currentURL}${queryString}&printable=Y">Printable Version</a>
> </#if>
> ...
> ...
> <#if !printable?exists>
> <br>Non-printable content<br>
> </#if>
> -----------------------------------------------------------
>
> All we need to do is agree on whether or not the project will support
> the printable request parameter, then each developer can accomodate it
> as changes are made to the project. In other words, there is no need to
> do any major rewriting of existing code - just include it as changes are
> submitted or in future work.
>
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/dev
>
> _______________________________________________
> Dev mailing list
> Dev at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/dev
>
More information about the Dev
mailing list