On 06/16/2010 04:15 PM, Aleks87 wrote:
Marius Dumitru Florea wrote:
Yes, that helped me. Thx!
My new Code:
#######################################################################
{{velocity}}
#set($collist = ["doc.name", "doc.space", "doc.date",
"doc.creator",
"doc.author", "_actions"])
#set($colprops = {
"doc.name" : { "type" : "text" ,
"size" : 30, "link"
:
"view"},
"doc.space" : { "type" : "hidden",
"link" : "space"},
"doc.date" : { "type" : "date" },
"doc.creator" : { "type" : "text",
"link" :
"creator"},
"doc.author" : { "type" : "text",
"link" : "author"},
"_actions" : {"actions":
["edit","delete","rename"]}
})
#set($options = { "topFilters":'<input type="hidden"
size="${colprop.size}"
name="doc.space" value="Projects-KnowHow" />',
"translationPrefix" : "xe.index.",
"rowCount": 10,
"selectedColumn": "doc.date",
"defaultOrder" : "desc"
})
#livetable("allprojectspages" $collist $colprops $options)
{{/velocity}}
#######################################################################
and a screenshot:
http://xwiki.475771.n2.nabble.com/file/n5186389/list-forum.jpg
And now I have 3 questions:
1) Why does the third column call
"xe.index.doc.creator "? "doc.author"
also calls "Last Author"
The creator is the user that created the page, while the author is the
last user that edited the page. They can be two different users.
There's no "xe.index.doc.creator" translation key in the default
translation file, but you can add it following
http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplica…
I'll leave the other two questions for someone who knows the live table
component better.
Hope this helps,
Marius
2) "NewPage" is a page created by me
(in the "Project-KnowHow" space) to
test the LiveTable and it works. But I don't want to see "WebHome" and
"List". Can I sort them out? Is there such a commanding?
3) Is there an easy way to make the "Actions" column visible for all
registered users? Yes I know that in the
http://code.xwiki.org/xwiki/bin/view/Macros/LiveTableMacro LiveTableMacro
Description is written:
"_actions A special column to display a list of actions that can be
performed by administrators on the matched documents."
But it would be nice...otherwise all users have to open eg. "NewPage"
before
they can edit it.
Maybe I can give Admin rights only for this page?
---
All this points are little minor flaws. But it would be nice to fix them.
Thx for help
Aleks
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
1)
I have found the "displayName" option!
With
"doc.creator" : { "type" : "text", "displayName"
: "Author" },
I can call the column as I want.
2)
I have not found a way to hide the pages "WebHome" and "List".
But while I was creating the Todo App I had the idea to create a
KnowHowClass with one Text Area object. With the Livetable className option
I can display all my pages that are using this Text Area object.
code: #set($options = { "className":"XWiki.KnowHowClass", .....}
In the creating a Todo App guide
TODO they use a html code to create a new Todo.
I use this html code to create a new page that automatically will be shown
in my Livetable.
But there is another problem now. I can only change this new page in the
inline mode. But I want to change it by clicking on the "Edit" button. Is
this possible? What do I have to do for that? Or am I on the wrong way?
PS. I don't know html but I can see that the code says something about
"inline"^^