-
-
Notifications
You must be signed in to change notification settings - Fork 315
Expand file tree
/
Copy pathnavigation.tpl
More file actions
163 lines (139 loc) · 8.58 KB
/
Copy pathnavigation.tpl
File metadata and controls
163 lines (139 loc) · 8.58 KB
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
{include file='header.tpl'}
<body id="page-top">
<!-- Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
{include file='sidebar.tpl'}
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main content -->
<div id="content">
<!-- Topbar -->
{include file='navbar.tpl'}
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">{$NAVIGATION}</h1>
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{$PANEL_INDEX}">{$DASHBOARD}</a></li>
<li class="breadcrumb-item active">{$CONFIGURATION}</li>
<li class="breadcrumb-item active">{$NAVIGATION}</li>
</ol>
</div>
<!-- Update Notification -->
{include file='includes/update.tpl'}
<div class="card shadow mb-4">
<div class="card-body">
<!-- Success and Error Alerts -->
{include file='includes/alerts.tpl'}
<form action="" method="post">
<div class="card shadow border-left-primary">
<div class="card-body">
<h5><i class="fa fa-info-circle"></i> {$INFO}</h5>
<p>{$NAVBAR_ORDER_INSTRUCTIONS}</p>
<p>{$NAVBAR_ICON_INSTRUCTIONS}</p>
</div>
</div>
<br />
{foreach from=$NAV_ITEMS key=key item=item}
<strong>{$item.title|escape}</strong>
<div class="form-group">
<div class="row">
<div class="col-md-6">
<label for="input{$item.title|escape}">{$NAVBAR_ORDER}</label>
<input type="number" min="1" class="form-control"
id="input{$item.title|escape}"
name="inputOrder[{if isset($item.custom) && is_numeric($item.custom)}{$item.custom}{else}{$key}{/if}]"
value="{$item.order|escape}">
</div>
<div class="col-md-6">
<label for="input{$item.title|escape}Icon">{$NAVBAR_ICON}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text icon-picker"
id="nav-icon-picker-{if isset($item.custom) && is_numeric($item.custom)}{$item.custom}{else}{$key}{/if}"
style="cursor: pointer;"
>
<i class="fa fa-plus"></i>
</span>
</div>
<input type="text" class="form-control" id="input{$item.title|escape}Icon"
name="inputIcon[{if isset($item.custom) && is_numeric($item.custom)}{$item.custom}{else}{$key}{/if}]"
value="{$item.icon|escape}"
placeholder="fa-solid fa-house">
</div>
</div>
</div>
</div>
{if isset($item.items) && count($item.items)}
<br>
<strong>{$item.title|escape} » {$DROPDOWN_ITEMS}</strong>
<br />
{foreach from=$item.items key=dropdown_key item=dropdown_item}
<strong>{$dropdown_item.title|escape}</strong>
<div class="form-group">
<div class="row">
<div class="col-md-6">
<label for="input{$dropdown_item.title|escape}">{$NAVBAR_ORDER}</label>
<input type="number" min="1" class="form-control"
id="input{$dropdown_item.title|escape}"
name="inputOrder[{if isset($dropdown_item.custom) && is_numeric($dropdown_item.custom)}{$dropdown_item.custom}{else}{$dropdown_key}{/if}]"
value="{$dropdown_item.order|escape}">
</div>
<div class="col-md-6">
<label for="input{$dropdown_item.title|escape}Icon">{$NAVBAR_ICON}</label>
<input type="text" class="form-control"
id="input{$dropdown_item.title|escape}Icon"
name="inputIcon[{if isset($dropdown_item.custom) && is_numeric($dropdown_item.custom)}{$dropdown_item.custom}{else}{$dropdown_key}{/if}]"
value="{$dropdown_item.icon|escape}">
</div>
</div>
</div>
{/foreach}
{/if}
{/foreach}
<hr>
<div class="form-group">
<label for="dropdown_name">{$DROPDOWN_NAME}</label>
<input type="text" class="form-control" id="dropdown_name" name="dropdown_name"
value="{$DROPDOWN_NAME_VALUE}">
</div>
<div class="form-group">
<input type="hidden" name="token" value="{$TOKEN}">
<input type="submit" value="{$SUBMIT}" class="btn btn-primary">
</div>
</form>
</div>
</div>
<!-- Spacing -->
<div style="height:1rem;"></div>
<!-- End Page Content -->
</div>
<!-- End Main Content -->
</div>
{include file='footer.tpl'}
<!-- End Content Wrapper -->
</div>
<!-- End Wrapper -->
</div>
{include file='scripts.tpl'}
<script>
$(document).ready(function () {
$('.icon-picker').each(function () {
const id = $(this).attr('id').replace('nav-icon-picker-', '');
new UniversalIconPicker('#nav-icon-picker-' + id, {
allowEmpty: false,
iconLibraries: [
'fomantic-ui.min.json',
'font-awesome.min.json',
],
onSelect: (icon) => {
document.getElementsByName('inputIcon[' + id + ']')[0].value = icon.iconClass;
}
});
});
});
</script>
</body>
</html>