How can I hide some table-data rows?
Is it possible to hide some rows in a table-data from user-groups or everybody, so that only the page-editor can see them in edit-mode?
Do I have to create a report on the same page as the table-data object is? If so, how can I realized it, showing the table-data only on edit-mode and the report in printed?
Do I have to create a report on the same page as the table-data object is? If so, how can I realized it, showing the table-data only on edit-mode and the report in printed?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The best answer from the company
-
Hi Jan,
Late reply, but might still be useful. One way about it is to use both Scaffolding and Reporting on the same page. Something like this:
{hidden-data}
{table-data:Protected}
|| Access || Data ||
| {list-data:Access}
{list-option}all{list-option}
{list-option}editors{list-option}
{list-option}admins{list-option}
{list-data} | {text-data:Data} |
{table-data}
{hidden-data}
{hide-if:action=edit}
{report-table}
{local-reporter:data:Protected|matchAll=false}
{collection-filter:@self}
{text-filter:data:Access > reference:value|include=all}
{collection-filter}
{collection-filter:@self}
{text-filter:data:Access > reference:value|include=editors}
{user-filter:global:current user|space=@self:editor}
{collection-filter}
{collection-filter:@self}
{text-filter:data:Access > reference:value|include=admin}
{user-filter:global:current user|group=+confluence-administrator}
{collection-filter}
{local-reporter}
{report-column:title=Access}{report-info:data:Access}{report-column}
{report-column:title=Data}{report-info:data:Data|render=wiki}{report-column}
{report-table}
{hide-if}
The {hidden-data} will hide the Scaffolding table it from non-editors, and the {hide-if} will stop the table from being duplicated when you are editing.
The multiple {collection-filter} macros are basically providing a way to do grouped AND/OR tests. In this case, we turn the whole report into an OR by specifying 'matchAll=false', then (ab)use the {collection-filter} to do AND tests, combining the 'Access' data value with the 'global:current user's permissions/group membership.
Hope that helps someone.
The company says
this answers the question
-
Inappropriate?Can you just put the table on a separate page with different permissions? That's what I do.
I’m finally caffienated
-
I'm using a lot of live-templates and reports to have a working workflow.
It would be too much action to edit the information of one or two cols / rows doubletimes.
In some times I'm using the {hidden-data} marco, but this is only working with a value in a table-data cell. The whole col or row including a condition (if/else) you cannot hide out. That is something I would really prefer. -
Inappropriate?Hi Jan.
You can use {show-to} ... {hide-from} macros (if applicable). Another advice - use {table-plus} macro with columnTupes=H parameter. -
Dear Firat,
yes we use the table-plus marco. I tried it with columnTupes parameter but without a working result:
{table-plus:sortIcon=true:columnTupes=S,S,H}
{table-data:datentraeger}
|| Row1 || Row2 || Row3 ||
| {{{text-data:row1}}} | {{{text-data:row2}}} | {text-data:row3} |
{table-data}
{table-plus}
That doesn't work, you can see all 3 cols.
Confluence: 3.0.0_01
Table macro: 3.4.0 -
For hide last column try this:
{table-plus:sortIcon=true:columnTupes=S,S,S,H}
{table-data:datentraeger}
|| Row1 || Row2 || Row3 ||
| {{{text-data:row1}}} | {{{text-data:row2}}} | {text-data:row3} |
{table-data}
{table-plus}
I do not know why. Maybe this is a bug. ;) -
Thank you Firat but I'm sorry, that doesn't work. You can see all 3 cols again. :( -
Inappropriate?Hi Jan,
Late reply, but might still be useful. One way about it is to use both Scaffolding and Reporting on the same page. Something like this:
{hidden-data}
{table-data:Protected}
|| Access || Data ||
| {list-data:Access}
{list-option}all{list-option}
{list-option}editors{list-option}
{list-option}admins{list-option}
{list-data} | {text-data:Data} |
{table-data}
{hidden-data}
{hide-if:action=edit}
{report-table}
{local-reporter:data:Protected|matchAll=false}
{collection-filter:@self}
{text-filter:data:Access > reference:value|include=all}
{collection-filter}
{collection-filter:@self}
{text-filter:data:Access > reference:value|include=editors}
{user-filter:global:current user|space=@self:editor}
{collection-filter}
{collection-filter:@self}
{text-filter:data:Access > reference:value|include=admin}
{user-filter:global:current user|group=+confluence-administrator}
{collection-filter}
{local-reporter}
{report-column:title=Access}{report-info:data:Access}{report-column}
{report-column:title=Data}{report-info:data:Data|render=wiki}{report-column}
{report-table}
{hide-if}
The {hidden-data} will hide the Scaffolding table it from non-editors, and the {hide-if} will stop the table from being duplicated when you are editing.
The multiple {collection-filter} macros are basically providing a way to do grouped AND/OR tests. In this case, we turn the whole report into an OR by specifying 'matchAll=false', then (ab)use the {collection-filter} to do AND tests, combining the 'Access' data value with the 'global:current user's permissions/group membership.
Hope that helps someone.
The company says
this answers the question
Loading Profile...





EMPLOYEE