-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
appearance.jinja2
105 lines (100 loc) · 6.37 KB
/
appearance.jinja2
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<form class="form-horizontal">
<div class="control-group" title="{{ _('Name of this OctoPrint instance, will be shown in the navigation bar and broadcast on the network') }}">
<label class="control-label" for="settings-appearanceName">{{ _('Title') }}</label>
<div class="controls">
<input type="text" class="input-block-level" data-bind="value: appearance_name" id="settings-appearanceName">
</div>
</div>
<div class="control-group" title="{{ _('Personalize the color of the navigation bar - maybe to match your printer?') }}">
<label class="control-label" for="settings-appearanceColor">{{ _('Color') }}</label>
<div class="controls">
<select id="settings-appearanceColor" data-bind="value: appearance_color, options: appearance_available_colors, optionsText: 'name', optionsValue: 'key'">
</select>
</div>
</div>
<div class="control-group" title="{{ _('For acrylic printers ;)') }}">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: appearance_colorTransparent"> {{ _('Transparent Color') }}
</label>
</div>
</div>
<div class="control-group" title="">
<label class="control-label" for="settings-appearanceLanguages">{{ _('Language Packs') }}</label>
<div class="controls">
<button class="btn" data-bind="click: showTranslationManager">{{ _('Manage...') }}</button>
</div>
</div>
<div class="control-group" title="">
<label class="control-label" for="settings-appearanceDefaultLanguage">{{ _('Default Language') }}</label>
<div class="controls">
<select id="settings-appearanceDefaultLanguage" data-bind="options: locales,
optionsText: function(item) { return item.display + ((item.language != undefined && item.english != undefined) ? ' [' + item.language + ', ' + item.english + ']' : '') },
optionsValue: 'language',
value: appearance_defaultLanguage">
</select>
<span class="help-inline">{{ _('Changes to the default interface language will only become active after a reload of the page and only be active if not overridden by the user''s language settings.') }}</span>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: appearance_showFahrenheitAlso" id="settings-appearanceShowFahrenheitAlso"> {{ _('Show temperatures in Fahrenheit as well as Celsius') }}
</label>
</div>
</div>
</form>
<div id="settings_appearance_managelanguagesdialog" class="modal hide fade">
<div class="modal-header">
<a href="#" class="close" data-dismiss="modal" aria-hidden="true">×</a>
<h3>{{ _('Manage Language Packs...') }}</h3>
</div>
<div class="modal-body">
<h4>{{ _('Available Language Packs') }}</h4>
<div data-bind="visible: languagePacksAvailable()">
<div id="settings_appearance_managelanguagesdialog_list" data-bind="slimScrolledForeach: translations.paginatedItems" style="height: 300px">
<div class="entry">
<strong><a href="#" data-bind="toggleContent: { class: 'icon-caret-right icon-caret-down', parent: '.entry', container: '.packs' }"><i class="icon-caret-down"></i> <span data-bind="text: $root.languagePackDisplay($data)"></span></a></strong>
<div class="packs">
<!-- ko foreach: $data.packs -->
<div class="row-fluid">
<div class="span8 offset1">
<strong data-bind="text: display"></strong><br />
<small data-bind="visible: pack.last_update" class="muted">{{ _('Last update:') }} <span data-bind="text: formatDate($data.pack.last_update)"></span></small>
</div>
<div class="span3">
<button class="btn btn-block btn-small" data-bind="click: function() {$root.deleteLanguagePack($data.pack.locale, $data.identifier)}"><i class="icon-trash"></i> {{ _('Delete') }}</button>
</div>
</div>
<!-- /ko -->
</div>
</div>
</div>
</div>
<div id="settings_appearance_managelanguagesdialog_emptylist" data-bind="visible: !languagePacksAvailable()">
<div>
<p>
<strong>{{ _('No additional Language Packs are installed at the moment.') }}</strong>
</p>
</div>
</div>
<h4>{{ _('Upload additional Language Packs') }}</h4>
<form class="form-inline">
<div class="control-group row-fluid" data-bind="css: {error: invalidTranslationArchive}">
<div class="input-prepend span9">
<span class="btn fileinput-button">
<span>{{ _('Browse...') }}</span>
<input id="settings_appearance_managelanguagesdialog_upload" type="file" name="file" accept=".zip,.tar.gz,.tgz,.tar" data-url="{{ url_for("api.uploadLanguagePack") }}">
</span>
<span class="add-on add-on-limited text-left" data-bind="text: translationUploadFilename, attr: {title: translationUploadFilename}"></span>
</div>
<button id="settings_appearance_managelanguagesdialog_upload_start" class="btn btn-primary span3" data-bind="enable: enableTranslationUpload, css: {disabled: !enableTranslationUpload()}, click: function(){}">{{ _('Upload') }}</button>
</div>
<span class="help-block" data-bind="visible: invalidTranslationArchive">{{ _('This does not look like a valid language pack. Valid language packs should be either zip files or tarballs and have the extension ".zip", ".tar.gz", ".tgz" or ".tar"') }}</span>
</form>
<small>{{ _('Please note that you will have to reload the page in order for any newly added language packs to become available.') }}</small>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{{ _('Close') }}</button>
</div>
</div>