Set {workitems} table column width

Description
Spring
Posts: 14
Joined: Tue Nov 08, 2011 10:02 am

Set {workitems} table column width

Postby Spring » Mon Jan 23, 2012 9:45 am

Hello,

is it possible to set the column with of the table I get out of the {workitems} macro.

I have a workitems table with four colums and the column containing the information of a ritch text field is too big, so the last column is cut off.

vinicius.zavam
Posts: 20
Joined: Thu Feb 09, 2012 7:46 am
Location: Aachen, Deutschland
Contact:

Re: Set {workitems} table column width

Postby vinicius.zavam » Wed Feb 15, 2012 9:09 am

Hey,
I needed the same.
Here is some workaround I did by using pre-built table classes to use Polarion-like {workitems} macro table style.

Code: Select all

#set ($myquery = "project.id:playground AND type:task")
#set ($items = $trackerService.queryWorkItems($myquery, id))
<div>
<table class="itemsTable" style="width:100%;">
 <thead> <tr>
 <th width=15><b>01</th>
 <th width=85><b>02</th>
 <th width=50><b>03</th>
 </tr> </thead>
 <tbody>
 #foreach ($i in $items)
  <tr>
  <td> A </td>
  <td> B </td>
  <td> C </td>
  </tr>
 #end
</tbody> </table>
<div class="panelFooter" style="width:100%;"> QUERY: $myquery </i></div>
</div>


You may adapt to your needs and, for sure, you can use a better query and details (chic cells content, with images and whatever).
Things like links to workitem, custom fields and so... can be done by using wiki code or Polarion API.

If you like to use the {workitem} macro itself, to get pretty details (as cell content)...

Code: Select all

{workitem: $i.id}


You may use other wiki and API features to get a nicer and detailed table.

Code: Select all

{image:myimage.gif|20} $i.getCustomField("blablabla").name


I do know it's not exaaaaactly the thing you want, but... by viewing the SyntaxHelp wiki page or the Polarion Help document I couldn't get a better solution using the {workitems} or {table} macros. You may try, or not, to use {section}, {column} and {style} macros combined to get other pretty stuff, report page, ...
Vinícius Zavam
profiles.google.com/egypcio

Spring
Posts: 14
Joined: Tue Nov 08, 2011 10:02 am

Re: Set {workitems} table column width

Postby Spring » Mon Feb 20, 2012 5:40 pm

Thank you very much for the hint, I didn't think about that.

I just started working with the $trackerService today (building my own trace table).

The API calls are to complicated for most users and we don't have a own documentation space for selfmade stuff atm, so I think my company will stick to the macros and the good polarion syntax help pages.

vinicius.zavam
Posts: 20
Joined: Thu Feb 09, 2012 7:46 am
Location: Aachen, Deutschland
Contact:

Re: Set {workitems} table column width

Postby vinicius.zavam » Tue Feb 21, 2012 1:27 pm

you're welcome;
good luck.
Vinícius Zavam
profiles.google.com/egypcio


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Google [Bot], sologirlehd and 7 guests