forked from szerko/Respond2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.php
147 lines (102 loc) · 4.19 KB
/
theme.php
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
<?php
include 'app.php'; // import php files
$authUser = new AuthUser(); // get auth user
$authUser->Authenticate('Admin');
Utilities::SetLanguage($authUser->Language); // set language
?>
<!DOCTYPE html>
<html lang="<?php print str_replace('_', '-', $authUser->Language) ?>">
<head>
<title><?php print _("Themes"); ?>—<?php print $authUser->SiteName; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- include css -->
<?php include 'modules/css.php'; ?>
</head>
<body data-currpage="theme">
<?php include 'modules/menu.php'; ?>
<!-- messages -->
<input id="msg-resetting" value="<?php print _("Resetting..."); ?>" type="hidden">
<input id="msg-reset" value="<?php print _("Theme successfully reset"); ?>" type="hidden">
<input id="msg-applying" value="<?php print _("Applying..."); ?>" type="hidden">
<input id="msg-applied" value="<?php print _("Theme successfully applied"); ?>" type="hidden">
<section class="main">
<nav>
<a class="show-menu"><i class="fa fa-bars fa-lg"></i></a>
<ul>
<li class="static active"><a href="theme"><?php print _("Themes"); ?></a></li>
</ul>
</nav>
<div id="themesList" class="image-list" data-bind="foreach: themes">
<div class="image-item" data-bind="css:{active: ($parent.theme()==id())}">
<h2 data-bind="text: name"></h2>
<img data-bind="attr:{'src': 'themes/'+id()+'/logo.png'}">
<div class="secondary inactive-button" data-bind="click: $parent.showApplyDialog"><?php print _("Apply Theme"); ?></div>
<div class="active-button" data-bind="click: $parent.showResetDialog"><?php print _("Reset Theme"); ?></div>
</div>
</div>
<!-- /.list -->
</section>
<!-- /.main -->
<div class="modal fade" id="applyDialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3><?php print _("Apply Theme"); ?></span></h3>
</div>
<div class="modal-body">
<p>
<?php print _("Confirm you want to apply:"); ?> <strong id="applyName">theme</strong>
</p>
<p>
<?php print _("This will completely change the look and feel of your site and remove any custom changes you made to the layout and styles of the site."); ?>
</p>
</div>
<div class="modal-footer">
<button class="secondary-button" data-dismiss="modal"><?php print _("Close"); ?></button>
<button class="primary-button" data-bind="click: applyTheme"><?php print _("Apply Theme"); ?></button>
</div>
<!-- /.modal-footer -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal-body -->
</div>
<!-- /.modal -->
<div class="modal fade" id="resetDialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3><?php print _("Reset Theme"); ?></span></h3>
</div>
<div class="modal-body">
<p>
<?php print _("Confirm you want to reset:"); ?> <strong id="resetName">theme</strong>
</p>
<p>
<?php print _("This will override any custom changes you made to the Layout or Styles for the site."); ?>
</p>
</div>
<div class="modal-footer">
<button class="secondary-button" data-dismiss="modal"><?php print _("Close"); ?></button>
<button class="primary-button" data-bind="click: resetTheme"><?php print _("Reset Theme"); ?></button>
</div>
<!-- /.modal-footer -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal-body -->
</div>
<!-- /.modal -->
</body>
<!-- include js -->
<?php include 'modules/js.php'; ?>
<script type="text/javascript" src="js/viewModels/models.js?v=<?php print VERSION; ?>"></script>
<script type="text/javascript" src="js/viewModels/themeModel.js?v=<?php print VERSION; ?>"></script>
</html>