summaryrefslogtreecommitdiffstats
path: root/templates/sysconfig/_page.html
blob: 02c0cecdf15ed140c6ca4329030c079efdc9f0c7 (plain) (blame)
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<div class="row">
	<div class="col-md-6">
		<div class="panel panel-default">
			<div class="panel-heading">
				{{lang_availableSystem}}
				<a class="btn btn-default" data-toggle="modal" data-target="#help-config"><span class="glyphicon glyphicon-question-sign"></span></a>
			</div>
			<div class="panel-body">
				<form method="post" action="?do=SysConfig">
					<input type="hidden" name="token" value="{{token}}">
					<input type="hidden" name="action" value="config">
					<table id="conftable" class="slx-table" style="max-width:100px !important">
						{{#configs}}
						<tr class="slx-pointer" data-modlist="{{modlist}}" onclick="showmod(this, 'bold')" onmouseover="showmod(this, 'fade')" onmouseout="showmod(this, 'reset')">
							<td class="modrow slx-width-ignore slx-nowrap"><div class="slx-dyn-ellipsis">{{config}}</div></td>
							<td>
								{{^current}}
								<button class="btn btn-primary btn-xs" name="activate" value="{{configid}}">
									<span class="glyphicon glyphicon-flag"></span>
									{{lang_activate}}
								</button>
								{{/current}}
								{{#current}}
								<span class="btn btn-success btn-xs">
									<span class="glyphicon glyphicon-ok"></span>
									{{lang_active}}
								</span>
								{{/current}}
							</td>
							<td class="slx-nowrap">
								<button
									{{#needrebuild}}
									class="btn btn-primary btn-xs"
									{{/needrebuild}}
									{{^needrebuild}}
									class="btn btn-default btn-xs"
									{{/needrebuild}}
									name="rebuild" value="{{configid}}" title="{{lang_rebuild}}"><span class="glyphicon glyphicon-refresh"></span></button>
							</td>
							<td>
								<button class="btn btn-danger btn-xs" name="del" value="{{configid}}" title="{{lang_delete}}"><span class="glyphicon glyphicon-trash"></span></button>
							</td>
						</tr>
						{{/configs}}
					</table>
					{{^configs}}
					<div class="alert alert-warning">
						{{lang_systemConfigurationNotFound}}
					</div>
					{{^modules}}
					<div class="alert alert-danger">
						{{lang_systemConfigurationAlert}}
					</div>
					{{/modules}}
					{{/configs}}
				</form>
			</div>
			<div class="panel-footer">			
				<a class="btn btn-primary" href="?do=SysConfig&amp;action=addconfig">{{lang_newConfiguration}}</a>
			</div>
		</div>
	</div>

	<div class="col-md-6">
		<div class="panel panel-default">
			<div class="panel-heading">
				{{lang_availableModules}}
				<a class="btn btn-default" data-toggle="modal" data-target="#help-module"><span class="glyphicon glyphicon-question-sign"></span></a>
			</div>
			<div class="panel-body">
				<form method="post" action="?do=SysConfig">
					<input type="hidden" name="token" value="{{token}}">
					<input type="hidden" name="action" value="module">
					<table id="modtable" class="slx-table" style="max-width:100px !important">
						{{#modules}}
						<tr>
							<td class="badge slx-nowrap">{{moduletype}}</td>
							<td data-id="{{moduleid}}" class="modrow slx-width-ignore slx-nowrap"><div class="slx-dyn-ellipsis">{{module}}</div></td>
							<td class="slx-nowrap">
								{{#iscustom}}
								<button class="btn btn-default btn-xs" name="list" value="{{moduleid}}" title="{{lang_show}}"><span class="glyphicon glyphicon-eye-open"></span></button>
								<!-- a class="btn btn-default btn-xs"><span class="glyphicon glyphicon-edit"></span> Bearbeiten</a -->
								<button class="btn btn-default btn-xs" name="download" value="{{moduleid}}" title="{{lang_download}}"><span class="glyphicon glyphicon-download-alt"></span></button>
								{{/iscustom}}
							</td>
							<td class="slx-nowrap">
								<button
									{{#needrebuild}}
									class="btn btn-primary btn-xs"
									{{/needrebuild}}
									{{^needrebuild}}
									class="btn btn-default btn-xs"
									{{/needrebuild}}
									name="rebuild" value="{{moduleid}}" title="{{lang_rebuild}}"><span class="glyphicon glyphicon-refresh"></span></button>
								<button class="btn btn-danger btn-xs" name="del" value="{{moduleid}}" title="{{lang_delete}}"><span class="glyphicon glyphicon-trash"></span></button>
							</td>
						</tr>
						{{/modules}}
					</table>
					{{^modules}}
					<div class="alert alert-warning">{{lang_configurationModuleNotFound}}</div>
					{{/modules}}
				</form>
			</div>
			<div class="panel-footer">
				<a class="btn btn-primary" href="?do=SysConfig&amp;action=addmodule">{{lang_newModule}}</a>
			</div>
		</div>
	</div>
</div>

<div class="modal fade" id="help-config" tabindex="-1" role="dialog">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">{{lang_systemConfiguration}}</div>
			<div class="modal-body">
				{{lang_helpSystemConfiguration}}
			</div>
			<div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
		</div>
	</div>
</div>

<div class="modal fade" id="help-module" tabindex="-1" role="dialog">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">{{lang_moduleConfiguration}}</div>
			<div class="modal-body">
				{{lang_helpModuleConfiguration}}
			</div>
			<div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
		</div>
	</div>
</div>

<script type="text/javascript"><!--
	var boldItem = false;
	function showmod(e, action) {
		var list = $(e).attr('data-modlist');
		list = list.split(',');
		if (action === 'bold') {
			$(boldItem).removeClass("slx-bold");
			if (boldItem === e) {
				action = 'fade';
				boldItem = false;
			}
		} else if (boldItem !== false) {
			return;
		}
		$('.modrow').each(function () {
			var elem = $(this);
			elem.removeClass("slx-fade slx-bold");
			if (action === 'reset')
				return;
			if (action === 'bold' && list.indexOf(elem.attr('data-id')) !== -1)
				elem.addClass("slx-bold");
			if (list.indexOf(elem.attr('data-id')) === -1)
				elem.addClass("slx-fade");
		});
		if (action === 'bold') {
			boldItem = e;
			$(e).addClass("slx-bold");
		}
	}
// --></script>