Wiki-Quellcode von Progress
Zuletzt geändert von Daniel Herrmann am 2026/03/08 12:48
Zeige letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | ## The core will make available the following variables: | ||
| 3 | ## - $name[String] = the name of the displayed field ('dependencies') | ||
| 4 | ## - $prefix[String] = a prefix for the form field ('TaskCode.TaskClass_0_') | ||
| 5 | ## - $object[com.xpn.xwiki.api.Object] = the displayed object | ||
| 6 | ## - $field[com.xpn.xwiki.api.PropertyClass] = the displayed property | ||
| 7 | ## - $type[String] = the intended display mode ('view', 'edit', 'hidden', 'search', etc.) | ||
| 8 | ## - $value[DBList in this case] = the property value | ||
| 9 | ## | ||
| 10 | {{html}} | ||
| 11 | #if($type=='view') | ||
| 12 | <div class="progress"> | ||
| 13 | <div class="progress-bar progress-bar-striped" role="progressbar" style="width: $!{value}%"> | ||
| 14 | #if($value && $value != '') | ||
| 15 | <span>$!{value}%</span> | ||
| 16 | #else | ||
| 17 | <span>0%</span> | ||
| 18 | #end | ||
| 19 | </div> | ||
| 20 | </div> | ||
| 21 | #else | ||
| 22 | <input class="form-control" id="TaskManager.TaskManagerClass_0_progress" name="TaskManager.TaskManagerClass_0_progress" type="number" min="0" max="100" oninput="validity.valid||(value='');" value="${value}" /> | ||
| 23 | #end | ||
| 24 | {{/html}} | ||
| 25 | {{/velocity}} |