-
Notifications
You must be signed in to change notification settings - Fork 156
/
jdiff_options.html
67 lines (63 loc) · 2.49 KB
/
jdiff_options.html
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
{# Copyright (C) 2009-2014 Edgewall Software
This software is licensed as described in the file COPYING, which
you should have received as part of this distribution. The terms
are also available at http://trac.edgewall.com/license.html.
This software consists of voluntary contributions made by many
individuals. For the exact contribution history, see the revision
history and logs, available at http://trac.edgewall.org/.
#}
{# Adds diff option fields (to be used inside a form)
Arguments:
- `diff`: the datastructure which contains diff options
#}
<label for="style">${_("View differences")}</label>
<select id="style" name="style">
<option ${{"selected": diff.style == 'inline'}|htmlattr}
value="inline">inline</option>
<option ${{'selected': diff.style == 'sidebyside'}|htmlattr}
value="sidebyside">side by side</option>
</select>
<div class="field">
# set radio_contextall_0
<input type="radio" name="contextall" value="0"
${{"checked": not diff.options.contextall}|htmlattr}/>
# endset
# set text_contextlines
<input type="text" name="contextlines" id="contextlines" size="2"
maxlength="3"
value="${'all' if diff.options.contextlines is lessthan(0) else
diff.options.contextlines}"/>
# endset
# trans radio = radio_contextall_0, text = text_contextlines
<label>${radio} Show</label>
<label>${text} lines around each change</label>
# endtrans
<br/>
<label><input type="radio" name="contextall" value="1"
${{"checked": diff.options.contextall}|htmlattr}/>
${_("Show the changes in full context")}</label>
</div>
<fieldset id="ignore">
# with options = diff.options
<legend>${_("Ignore:")}</legend>
<div class="field">
<input type="checkbox" id="ignoreblanklines" name="ignoreblanklines"
${{"checked": options.ignoreblanklines}|htmlattr} />
<label for="ignoreblanklines">${_("Blank lines")}</label>
</div>
<div class="field">
<input type="checkbox" id="ignorecase" name="ignorecase"
${{"checked": options.ignorecase}|htmlattr} />
<label for="ignorecase">${_("Case changes")}</label>
</div>
<div class="field">
<input type="checkbox" id="ignorewhitespace" name="ignorewhitespace"
${{"checked": options.ignorewhitespace}|htmlattr} />
<label for="ignorewhitespace">${_("White space changes")}</label>
</div>
# endwith
</fieldset>
<div class="buttons">
<input type="submit" name="update" value="${_("Update")}" />
</div>
## jinjacheck: "label select" OK