ALERT! This page is still a draft. The contents are right by the way! ALERT!

Most reviewers find hard to use the review form because is painful and error prone to edit tables via TWiki. An easy way of doing that with TWiki is by using the EditTable plugin, that lets you edit a table by simple clicking an edit button and fill the blanks smile

here's an example related to the review form, test it by clicking the edit button:

N Page Section Observations Is Addressed
1 -- -- See attached files for comments. DONE

And here's the code, you can copy and paste it and modify it to suit your needs:

%EDITTABLE{ format="| row, -1 | text | text | textarea, 20x60, test | checkbox, 1, %<nop>Y%   |" ,  headerislabel="on" , buttonrow="top" }%
| N %EDITCELL{ "label" }% | Page  %EDITCELL{ "label" }% | Section  %EDITCELL{ "label" }% | Observations  %EDITCELL{ "label" }% | Is Addressed %EDITCELL{ "label" }% |
| 1 | -- | -- | See attached files for comments. | %Y% |

Parameters explained

%EDITTABLE{ option1, option2, ..., optionN }%
creates the plugin. Each option is separated by commas.

Let's see what the options do:

 format="| row, -1 | text | text | textarea, 20x60, test | checkbox, 1, %<nop>Y%   |" 
the
format
option defines how the rows will look like and what kind of data they will contain. Each row style is separated by
|
. A wider description of each field can be found in the plugin guide (see references at the bottom of the page). Briefly,

row, -1
counts the rows with offset -1
text 
is a text field, 255 chars
textarea, 20x60, test
is long text, good for comments, with size 20x60px and default content "test"
 checkbox, 1, %<nop>Y% 
is a checkbox , default is checked==1, default content is the DONE simbol. <nop> is used to escape special symbols.

 buttonrow="top" 
puts all the buttons at the top of the table. Put it as the last paramenter or it will break formatting!

References

The complete EditTablePlugin documentation http://twiki.org/cgi-bin/view/Plugins.EditTablePlugin

-- FloridoPaganelli - 17-Nov-2010

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2011-02-23 - FloridoPaganelli
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EMI All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback