Исходный код вики Инструкции пользователей
Редактировал(а) Coluns 10.02.2023
Последние авторы
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | (% class="box" %) | ||
3 | ((( | ||
4 | Реестр документов **Инструкция пользователя** | ||
5 | Вы можете сортировать и фильтровать таблицу по своему усмотрению. | ||
6 | Для создания новой инструкции, нажмите на кнопку внизу. | ||
7 | ))) | ||
8 | |||
9 | ## Кнопка добавления новой записи | ||
10 | #if("$!request.docName" != '') | ||
11 | ## Запрос на создание нового экземпляра | ||
12 | #set($targetDocReference = $services.model.createDocumentReference('', $!{request.spaceName}, $!{request.docName})) | ||
13 | $response.sendRedirect($xwiki.getURL($targetDocReference, 'inline', "template=${escapetool.url($request.template)}&parent=${escapetool.url($request.parent)}")) | ||
14 | ## Остановить обработку, так как мы уже отправили редирект. | ||
15 | #stop | ||
16 | #end | ||
17 | |||
18 | {{html}} | ||
19 | <form action="" id="newdoc" method="post"> | ||
20 | <div> | ||
21 | Новая инструкция: <input type="text" name="docName" value="Введите название..." class="withTip" size="50"/> | ||
22 | <input type="hidden" name="parent" value="${doc.fullName}"/> | ||
23 | <input type="hidden" name="template" value="CompanyDocumentation.UserInstructions.Code.UserInstructionsTemplate"/> | ||
24 | <input type="hidden" name="spaceName" value="Инструкции пользователей"/> | ||
25 | <span class="buttonwrapper"><input type="submit" value="Создать"button"/></span> | ||
26 | </div> | ||
27 | </form> | ||
28 | {{/html}} | ||
29 | {{/velocity}} | ||
30 | {{velocity}} | ||
31 | ##отображение таблицы | ||
32 | #set ($columnsProperties = { | ||
33 | 'doc.title': {"link":"view"}, | ||
34 | 'doc.location': {"html":true}, | ||
35 | 'doc.date': {}, | ||
36 | 'doc.author': {"link":"author"}, | ||
37 | '_actions': {"sortable":false,"filterable":false,"html":true,"actions":["edit","delete"]} | ||
38 | }) | ||
39 | #set ($options = { | ||
40 | 'className': 'CompanyDocumentation.UserInstructions.Code.UserInstructionsClass', | ||
41 | 'translationPrefix': 'userinstructions.livetable.', | ||
42 | 'tagCloud': true, | ||
43 | 'rowCount': 15, | ||
44 | 'maxPages': 10, | ||
45 | 'selectedColumn': 'doc.title', | ||
46 | 'defaultOrder': 'asc' | ||
47 | }) | ||
48 | #set ($columns = ['doc.title', 'doc.location', 'doc.date', 'doc.author', '_actions']) | ||
49 | #livetable('userinstructions' $columns $columnsProperties $options) | ||
50 | {{/velocity}} | ||
51 |