summaryrefslogtreecommitdiffstats
path: root/templates/sysconfig/_page.html
blob: c86c4b14d4c4561e94e9f2c6026c3a26422bafbe (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
<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 class="slx-table">
						{{#configs}}
						<tr class="slx-pointer" data-modlist="{{modlist}}" onclick="showmod(this, 'bold')" onmouseover="showmod(this, 'fade')" onmouseout="showmod(this, 'reset')">
							<td>{{config}}</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>
								<button class="btn btn-danger btn-xs" name="del" value="{{configid}}"><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</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 class="slx-table">
						{{#modules}}
						<tr>
							<td data-id="{{moduleid}}" class="modrow">{{module}}</td>
							<td>
								<button class="btn btn-default btn-xs" name="list" value="{{moduleid}}"><span class="glyphicon glyphicon-eye-open"></span> {{lang_show}}</button>
								<!-- a class="btn btn-default btn-xs"><span class="glyphicon glyphicon-edit"></span> Bearbeiten</a -->
							</td>
							<td>
								<button class="btn btn-danger btn-xs" name="del" value="{{moduleid}}"><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</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>