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