3ce825ba80bdf9ef27202f840e6487961c08c4fb.php
1.74 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
<?php
$themes = explode(",",env('themes'));
if($userCurrentTheme != ""){
if(!in_array($userCurrentTheme, $themes)){$userCurrentTheme = "Default";}
}else{ $userCurrentTheme = "Default"; }
?>
<?php if(isset($response)): ?>
<script>
simpleNotification("<?php echo e($response['type']); ?>","topRight","<?php echo e($response['message']); ?>");
<?php if($response['type'] == "success"): ?>
setTimeout(function(){ window.location.reload(); }, 1000);
<?php endif; ?>
</script>
<?php endif; ?>
<h4>Select Theme <span class="pull-right"><small>Current Theme - </small><?php echo e($userCurrentTheme); ?></span></h4>
<hr style="margin-bottom: 10px;">
<div class="row">
<?php foreach($themes as $theme): ?>
<div class="col-sm-3">
<div class="themeBox" style="<?php echo e($theme == $userCurrentTheme ? 'border:1px solid #f30;background-color: #ffe9e9' : ''); ?>">
<h4><?php echo e($theme); ?>
<?php if($theme == $userCurrentTheme): ?>
<span class="pull-right label label-primary btn-xs">Current Theme</span>
<?php else: ?>
<button class="pull-right btn btn-success btn-xs" onclick="changeTheme('<?php echo e($theme); ?>');return false;">Select Theme</button>
<?php endif; ?>
</h4>
<hr style="margin-top: 10px;margin-bottom: 5px;">
<div class="text-center">
<img src="<?php echo e(URL::to('assets/themes/'.$theme.'.png')); ?>" class="img-responsive" alt="" />
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<style>
.themeBox{margin: 10px;padding: 10px !important;border:1px solid #eee;border-radius: 5px;}
.themeBox:hover{background-color: #eee;}
</style>
<script type="text/javascript">
function changeTheme(value){
doAjax('setting/theme?name='+value,'','settingThemeArea','','singlethis','GET');
}
</script>