Difference between revisions of "Extension talk:ListView.php"

From Organic Design wiki
m (typo)
(Semantci Drilldown)
 
Line 20: Line 20:
  
 
There will be two classes to the extension, a parser function class which handles the parser function allowing links to specific saved queries, and a special page class (similar to [[Extension:Selenium.php]]) which allows users to construct a query resulting in a matrix of resulting articles using specific templates using the same key/value parameters.
 
There will be two classes to the extension, a parser function class which handles the parser function allowing links to specific saved queries, and a special page class (similar to [[Extension:Selenium.php]]) which allows users to construct a query resulting in a matrix of resulting articles using specific templates using the same key/value parameters.
 +
 +
== Related extensions ==
 +
*[http://discoursedb.org/wiki/Special:BrowseData Semantic Drilldown] allows selection of articles by category and property in category-page format. Using this extension would mean list-view would not be required to handle the actual selecting and filtering of results. It would only need to allow the changing of the view to ajax-editable list format
  
 
== Usage notes ==
 
== Usage notes ==
Line 43: Line 46:
 
*Allow kinds of list other than articles such as revisions or emails
 
*Allow kinds of list other than articles such as revisions or emails
  
==See also==
+
== See also ==
 
* Excel pivot tables
 
* Excel pivot tables
 
* The set of [http://biom1.univ-lyon1.fr/library/base/html/tapply.html tapply], [http://biom1.univ-lyon1.fr/library/base/html/apply.html apply], sapply, and [http://biom1.univ-lyon1.fr/library/base/html/lapply.html lapply] functions in R
 
* The set of [http://biom1.univ-lyon1.fr/library/base/html/tapply.html tapply], [http://biom1.univ-lyon1.fr/library/base/html/apply.html apply], sapply, and [http://biom1.univ-lyon1.fr/library/base/html/lapply.html lapply] functions in R

Latest revision as of 22:55, 13 June 2008

This extension aims to provide an editable matrix of content, it is designed to be a Specialpage which allows users to query and select a group of articles and display the resulting aspects in common as a matrix using table markup. Additional functionality will allow specific rows in the table to be easily edited using Ajax functionality.

List-view.jpg

This extension will provide a parser function which can display either a link to a stored query, or the view as list tab (wrapped in a <div id="p-cactions" class="portlet">...</div>) which links to the stored query.

The matrix [math]\mathbf{A}:=(a_{i,j})_{i=1,\ldots,m;\,\,j=1,\ldots,n}[/math], is an m by n matrix where the n-columns are variables and the m-rows are observations.the first column is a vector of article names (using [[ link syntax) to create link associations. The next column are generally key/value pairs where the name of the column is the key, and the value is the vector of common elements in the query. The key/value pairs generally come from templates which the articles have in common.

[math]\mathbf{A} = \begin{bmatrix} a_{11} & a_{12} & \ldots & a_{1n} \\ a_{21} & a_{22} & \ldots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \\ \end{bmatrix}[/math]

The sortable list will be a matrix similar in format to Special:Recentchanges where the rows represent all the articles in the list or query, and the columns are the parameter values used in the templates the articles all share in common.

The list needs to be defined using a query mechanism, something like (property, condition, value) triplets separated by AND/OR logicals.

There will be two classes to the extension, a parser function class which handles the parser function allowing links to specific saved queries, and a special page class (similar to Extension:Selenium.php) which allows users to construct a query resulting in a matrix of resulting articles using specific templates using the same key/value parameters.

Related extensions

  • Semantic Drilldown allows selection of articles by category and property in category-page format. Using this extension would mean list-view would not be required to handle the actual selecting and filtering of results. It would only need to allow the changing of the view to ajax-editable list format

Usage notes

  • This list will be able to be constructed using a special page allowing operations to be performed on them all. Ajax functionality will allow edit operations to be performed all from the matrix of results using a pager mechanism.
  • If all the articles in the list share a particular template in common and that template is a member of Category:Record templates, then the template will be used to render the content of each row, and an edit link will be supplied which allows the row to be edited inline AJAX'ly if the same name as the template has a corresponding form article in the Form namespace.
  • The edit link for each row reveals the form and hides the record
  • When the form is submitted, the response is the updated row which replaces and reveals the current record and hides the form.
  • A cancel button in the form hides the form and reveals the record without any AJAX update
  • Clicking edit on another row cancels existing edit views

Dev notes

  • Each row should be able to contain many forms since there are many kinds of template/form which would be common to many diverse kinds of records (and there could be one or more of each) for example time, location, transaction, person/people etc.
  • The AJAX request uses SimpleForms1.0's method of updating templates from POST vars
  • Maybe this should handle the new edit method instead of SF1.0 since it has to be able to construct the new structure of POST vars (so why not be the one to process them too?)
  • Instead of Form namespace, we could have both Edit and Select since often a particular record type will require not only a specific form for editing, but also a specific way of querying its properties.

Initial templates

  • Transaction
  • Worklog
  • Asset

Feature Ideas

  • Allow kinds of list other than articles such as revisions or emails

See also