diff --git a/app/Item.php b/app/Item.php index dc16a6b9..9aebc88b 100644 --- a/app/Item.php +++ b/app/Item.php @@ -143,16 +143,22 @@ class Item extends Model if(isset($this->class) && !empty($this->class)) { $app = new $this->class; } else { - $details = $this->getconfig(); - if($details === false) return false; - - $class = $details->type; - $app = new $class; - + return false; } return (bool)($app instanceof \App\EnhancedApps); } + public function enabled() + { + if($this->enhanced()) { + $config = $this->getconfig(); + if($config) { + return (bool) $config->enabled; + } + } + return false; + } + public function getconfig() { if(!isset($this->description) || empty($this->description)) return false; diff --git a/public/css/app.css b/public/css/app.css index 94e157e0..978fdd97 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -789,19 +789,7 @@ body { height: 51px; } -.module-actions { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.module-actions .input { +.toggleinput { display: -webkit-box; display: -ms-flexbox; display: flex; @@ -817,10 +805,22 @@ body { padding: 0 20px; } -.module-actions .input label.name { +.toggleinput label.name { margin-top: 6px; } +.module-actions { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + .module-actions .button { font-size: 18px; color: #515564; @@ -1174,7 +1174,8 @@ a.settinglink { #sapconfig h2, .newblock h2 { background: #f2f3f6; - padding: 18px 25px; + padding: 2px 25px; + height: 60px; margin-left: -15px; width: calc(100% + 30px); /* margin-right: -30px; */ @@ -1183,6 +1184,15 @@ a.settinglink { font-size: 18px; color: #5b5b5b; font-weight: 500; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; } #sapconfig .items, .newblock .items { diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 01fb9221..0cb73164 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=22a39cc94a111a82ce68", + "/css/app.css": "/css/app.css?id=2d647cf8beb1a6515945", "/js/app.js": "/js/app.js?id=8dc4a6ea723d0df7469d" } \ No newline at end of file diff --git a/resources/assets/sass/_app.scss b/resources/assets/sass/_app.scss index fd30c47e..46c79957 100644 --- a/resources/assets/sass/_app.scss +++ b/resources/assets/sass/_app.scss @@ -449,24 +449,27 @@ body { .homesearch { height: 51px; } + +.toggleinput { + display: flex; + flex-direction: column-reverse; + line-height: 1; + font-size: 9px; + font-weight: 400; + text-transform: uppercase; + color: #ababab; + padding: 0 20px; + label.name { + margin-top: 6px; + } +} + + .module-actions { display: flex; justify-content:space-between; align-items: center; - .input { - display: flex; - flex-direction: column-reverse; - line-height: 1; - font-size: 9px; - font-weight: 400; - text-transform: uppercase; - color: #ababab; - padding: 0 20px; - label.name { - margin-top: 6px; - } - } .button { font-size: 18px; @@ -780,7 +783,8 @@ div.create { width: 100%; h2 { background: #f2f3f6; - padding: 18px 25px; + padding: 2px 25px; + height: 60px; margin-left: -15px; width: calc(100% + 30px); /* margin-right: -30px; */ @@ -789,6 +793,9 @@ div.create { font-size: 18px; color: #5b5b5b; font-weight: 500; + display: flex; + justify-content: space-between; + align-items: center; } .items { display: flex; diff --git a/resources/views/item.blade.php b/resources/views/item.blade.php index 2b2d543e..c0e1640a 100644 --- a/resources/views/item.blade.php +++ b/resources/views/item.blade.php @@ -7,7 +7,7 @@ @endif
{{ $app->title }}
- @if($app->enhanced()) + @if($app->enabled())
@endif
diff --git a/resources/views/items/enable.blade.php b/resources/views/items/enable.blade.php new file mode 100644 index 00000000..8cdd7fec --- /dev/null +++ b/resources/views/items/enable.blade.php @@ -0,0 +1,12 @@ +
+ + {!! Form::hidden('config[enabled]', '0') !!} + +
diff --git a/resources/views/items/form.blade.php b/resources/views/items/form.blade.php index 82782bd1..2b337602 100644 --- a/resources/views/items/form.blade.php +++ b/resources/views/items/form.blade.php @@ -2,7 +2,7 @@
{{ __('app.apps.add_application') }}
-
+
{!! Form::hidden('pinned', '0') !!}