Wiki source code of GitLab Commit Application
Last modified by René Vögeli on 2026/01/23 08:43
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | #if($request.title) | ||
| 3 | #if($request.title=="") | ||
| 4 | {{warning}}$services.localization.render('github.createnewgithubconfig.error.titlemissing'){{/warning}} | ||
| 5 | #else | ||
| 6 | #set($docname = $xwiki.getUniquePageName($doc.web, $request.title)) | ||
| 7 | #set($newdoc = $xwiki.getDocument("${doc.web}.${docname}")) | ||
| 8 | #set($ok = $newdoc.setTitle($request.title)) | ||
| 9 | #set($ok = $newdoc.setContent('{{include document="GitLab.Code.GitLabConfigSheet" /}}')) | ||
| 10 | #set($ok = $newdoc.setParent("GitLab.WebHome")) | ||
| 11 | #set($ok = $newdoc.newObject("GitLab.Code.GitLabConfigClass")) | ||
| 12 | #set($ok = $newdoc.save()) | ||
| 13 | $response.sendRedirect($newdoc.getURL()) | ||
| 14 | #end | ||
| 15 | #else | ||
| 16 | $services.localization.render('gitlab.description') | ||
| 17 | |||
| 18 | == $services.localization.render('gitlab.currentconfigs.title') == | ||
| 19 | |||
| 20 | #set($list = $services.query.hql(", BaseObject as obj where doc.fullName=obj.name and obj.className='GitLab.Code.GitLabConfigClass' and doc.fullName<>'GitLab.Code.GitLabConfigTemplate'").execute()) | ||
| 21 | #if($list.size()==0) | ||
| 22 | $services.localization.render('gitlab.currentconfigs.noconfigs') | ||
| 23 | #else | ||
| 24 | #foreach($item in $list) | ||
| 25 | #set($itemTitle = $xwiki.getDocument($item).getDisplayTitle()) | ||
| 26 | * [[$itemTitle>>$item]] | ||
| 27 | #end | ||
| 28 | #end | ||
| 29 | #end | ||
| 30 | |||
| 31 | == $services.localization.render('gitlab.createnewconfig') == | ||
| 32 | |||
| 33 | {{html}} | ||
| 34 | <form action=""> | ||
| 35 | $services.localization.render('gitlab.title'): | ||
| 36 | <input type="text" name="title" size="60" value="" /> | ||
| 37 | |||
| 38 | <input type="submit" value="$services.localization.render('gitlab.createnewconfig')" /> | ||
| 39 | </form> | ||
| 40 | {{/html}} | ||
| 41 | {{/velocity}} |