Forum OpenACS Development: List builder

Collapse
Posted by Lars Pind on
Hi all,

I've been wanting to write a list-builder for a while now.

What I'm thinking is something akin to a templatable version of ad_table, with a few extra features, as a counterpart to the form builder.

It would let you output lists in either google-style or table-style, complete with pagination, sorting, filtering, browsing, searching, checkboxes next to each row, reordering interface, etc. (all optional, of course).

The idea would be to (a) make app development more productive, and (b) make table interface and interaction design more consistent across the system.

Is this something that anyone else has thought about, and/or have ideas or opinions about?

/Lars

Collapse
3: Re: List builder (response to 1)
Posted by Dave Bauer on
Lars,

This sounds great. I had been thinking the same thing. My idea was to allow an adp template to change the layout similar to form builder.

Unfortunately this is a far as I got.

Collapse
2: Re: List builder (response to 1)
Posted by Lars Pind on
Additional features that we can add later:

1. custom user filters

2. custom display formats (choose style - google/tbable, columns and their ordering, filter and sort, etc.)

3. Cut/Copy/Paste links for items, which would interact with an OACS-wide clipboard. ShareNet and Intra.Net have concepts like this.

This could grow and grow, adding key user interface enhancements across the site.

/Lars

Collapse
4: Re: List builder (response to 1)
Posted by Lars Pind on
Dave, Yes, that's what I was thinking as well.

/Lars

Collapse
5: Re: List builder (response to 1)
Posted by Jun Yamog on

Yes this would really be useful. Although not really directly related, CCM has something similar which is the DataTable. One thing what I like about it is that I can pass in a query to it and it makes the table.

It would be nice if we can also have a best practice to make use of this and how to change the look. In the form builder we can pass a style="mycustomform". How do we customize the look of each * builder, in package instace, and sub site level.

Right now forms is at acs-templating/resources... and if you have your own custom form you have to put it in there. Maybe list builder can set where is is to best place them?

I am thinking of

[acsroot]/www/templates
               \--forms
               \--lists
               \--tables
               \--etp
               \--acs-subsite

I am inclined to use www/ so we can serve images, css, etc. related files out. Of course we can probably serve that by rp_internal redirect or something. Will there be any security problems when putting it in www/ ? But then how is it best to handle this. We have a template path search?

I guess my thoughts is looking on how we can customize say the list builder on a subsite level, better yet on a package instance level. And this way of doing things is something like the best practice and is uniform on this * builders.

Collapse
6: Re: List builder (response to 1)
Posted by Robert Locke on
Actually, though nowhere near as flexible and full-featured as Lars' proposal, we already have the beginnings of a list builder in the OpenACS.

Just use the templating system to create a "grid"-style form, generate "inform" widgets, then set "has_submit" to 1 so that you don't get any submit button. Something like:

template::form create list -has_submit 1
template::element create list foo -widget inform -value hello
template::element create list bar -widget inform -value there
set headers {Foo Bar}
set title {A List}

then in your *.adp:

<formtemplate id=list style=grid cols=2 headers=@headers@ title=@title@></formtemplate>

This would actually work and might give some ideas for a list/table builder.

Collapse
7: Re: List builder (response to 1)
Posted by Lars Pind on
Jun,

First, you don't have to put your form templates under acs-templating. Yes, it's not exactly elegant, but this works:

<formtemplate ... style="../../../package-key/www/template-file"></formtemplate>

Second, it's good to be able to have different themes on different subsites, but it should be used sparingly. One of my goals is to increase consistency across the system.

One distinction that we may want to make is that you can have different layouts, i.e., grid, list, table, whatnot; and then, for each layout, you can have several different graphic designs for each theme, but they all share the same layout, and they're all useful for the same purpose.

/Lars

Collapse
8: Re: List builder (response to 1)
Posted by Lars Pind on
Robert,

Interesting, thanks, I'd never actually figured out how to use the grid thing.

/Lars

Collapse
9: Re: List builder (response to 1)
Posted by Caroline Meeks on
Sounds great Lars,

On my wish list is an ad_table that optionally takes advantage of DHTML/Javascript features for client side sorting if the user is using a newer browser.

Here is a random example from a google search:

http://simplythebest.net/scripts/javascript_117.html#

This is especially important/useful for portlets.