forked from intersystems-community/cache-tort-git
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitprojectsettings.csp.xml
70 lines (67 loc) · 2.42 KB
/
gitprojectsettings.csp.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<CSP name="gitprojectsettings.csp" application="/csp/sys/" default="1"><![CDATA[
<html>
<head>
<title>Cache-Git Settings</title></head>
<STYLE type='text/css'>
.error {
color: red;
}
</STYLE>
<body>
<server>
set namespace = %request.Data("NSpace",1)
set oldNS=$znspace
znspace namespace
if $Data(%request.Data("gitsettings",1)) {
kill settings
for param="gitBinPath","defaultTemp","namespaceTemp","groupByFolder" {
set settings(param) = $Get(%request.Data(param,1))
}
do ##class(%SourceControl.Git.Utils).UpdateSettings(.settings)
}
set gitBinPath = ##class(%SourceControl.Git.Utils).GitBinPath()
set defaultTemp = ##class(%SourceControl.Git.Utils).DefaultTemp()
set namespaceTemp = ##class(%SourceControl.Git.Utils).TempFolder()
set groupByFolder = ##class(%SourceControl.Git.Utils).GroupByFolder()
znspace oldNS
set:defaultTemp="" defaultTemp = "c:\temp\"
</server>
<form method='post'>
<input type="hidden" name="NSpace" value="#(..EscapeHTML(namespace))#" />
<input type="hidden" name="gitsettings" value="1" />
<h1>Settings</h1>
<table>
<csp:if condition='$system.Version.GetOS()="Windows"'>
<tr>
<td>Path to tortoisegitproc.exe<br/>(e.g. c:\tortoisegit\bin\tortoisegitproc.exe)</td><td><input type="text" name="gitBinPath" size=40 value='#(..EscapeHTML(gitBinPath))#'/></td>
</tr>
<csp:if condition='$D(%request.Data("gitsettings",1)) && (##class(%SourceControl.Git.Utils).GitBinExists()=0)'>
<tr><td colspan='2' align=center class='error'>
file does not found
</td></tr>
</csp:if>
</csp:if>
<tr>
<td>Default path to temp folder<br/>(e.g. c:\temp)</td><td><input type="text" name="defaultTemp" size=40 value='#(..EscapeHTML(defaultTemp))#'/></td>
</tr>
<tr><th colspan="2">Settings for this namespace only</th>
</tr>
<tr>
<td>Temp folder for this namespace<br/>(e.g. c:\someproj\)</td><td><input type="text" name="namespaceTemp" size=40 value='#(..EscapeHTML(namespaceTemp))#'/></td>
</tr>
<!--
<tr>
<td>Group all items by folders</td><td><input type="checkbox" name="groupByFolder" size=40 #($case(groupByFolder,1:"checked",:""))#/></td>
</tr>
-->
</table>
<input type='submit' value = 'Save!'/>
</form>
<csp:if condition='$D(%request.Data("gitsettings",1)) && (##class(%SourceControl.Git.Utils).NeedSettings() = 0)'>
<em>Click cross in the upper-right corner to close the settings window.</em>
</csp:if>
</body>
</html>]]></CSP>
</Export>