diff --git a/app/CMS/Widgets/Menu/Menu.php b/app/CMS/Widgets/Menu/Menu.php index 21cf66e9..2758f783 100644 --- a/app/CMS/Widgets/Menu/Menu.php +++ b/app/CMS/Widgets/Menu/Menu.php @@ -1,13 +1,15 @@ whereIn('id', $ids) ->whereIn('status', $allowedStatuses) + ->where('moduleHandler', '!=', Article::class) ->get(); $used = []; foreach ($pages as $page) { diff --git a/app/CMS/Widgets/Menu/Presenters/Menu.php b/app/CMS/Widgets/Menu/Presenters/Menu.php index 7a1ccb02..c5617773 100644 --- a/app/CMS/Widgets/Menu/Presenters/Menu.php +++ b/app/CMS/Widgets/Menu/Presenters/Menu.php @@ -1,4 +1,5 @@ getOverview(); + $pages = $content->getOverview() + ->get(); $widget->settings = new \stdClass(); $widget->settings->links = []; diff --git a/resources/assets/sass/admin/_common/items-list.scss b/resources/assets/sass/admin/_common/items-list.scss index dcd99ce7..7b1a00f4 100644 --- a/resources/assets/sass/admin/_common/items-list.scss +++ b/resources/assets/sass/admin/_common/items-list.scss @@ -1,386 +1,377 @@ @import "../imports"; - - /* ******************************************* * Item List general styles ********************************************** */ .item-list { - list-style: none; - padding: 0; - margin: 0; - margin-bottom: 0; - line-height: $item-list-line-height; - - @include media(lg) { - font-size: 1rem; - } + list-style: none; + padding: 0; + margin: 0; + line-height: $item-list-line-height; - @include media(md) { - font-size: 0.95rem; - } + @include media(lg) { + font-size: 1rem; + } - @include media-down(sm) { - font-size: 1.05rem; - } + @include media(md) { + font-size: 0.95rem; + } - display: flex; - flex-flow: column nowrap; + @include media-down(sm) { + font-size: 1.05rem; + } - &.striped { - & > li { - border-bottom: 1px solid $item-list-color-border; - } + display: flex; + flex-flow: column nowrap; - & > li:nth-child(2n + 1) { - background-color: lighten($color-divider, 12%); + &.striped { + & > div { + border-bottom: 1px solid $item-list-color-border; + } - @include media-down(sm) { - background-color: lighten($color-divider, 11%); - } - } + & > div:nth-child(2n + 1) { + background-color: lighten($color-divider, 12%); - .item-list-footer { - border-bottom: none; - } - } + @include media-down(sm) { + background-color: lighten($color-divider, 11%); + } + } + + .item-list-footer { + border-bottom: none; + } + } } - /* ******************************************* * Item general styles ********************************************** */ - .item-list { - .item { - display: flex; - flex-direction: column; - } + .item { + display: flex; + flex-direction: column; + } - .item-row { - display: flex; - align-items: stretch; - flex-direction: row; - justify-content: space-between; - flex-wrap: wrap; - min-width: 100%; + .item-row { + display: flex; + align-items: stretch; + flex-direction: row; + justify-content: space-between; + flex-wrap: wrap; + min-width: 100%; - &.nowrap { - flex-wrap: nowrap; - } - } + &.nowrap { + flex-wrap: nowrap; + } + } - .item-col { - align-items: center; - display: flex; - padding: $item-list-padding-y $item-list-padding-x $item-list-padding-y 0; - flex-basis: 0; - flex-grow: $item-list-col-grow; - flex-shrink: $item-list-col-shrink; - margin-left: auto; - margin-right: auto; - min-width: 0; + .item-col { + align-items: center; + display: flex; + padding: $item-list-padding-y $item-list-padding-x $item-list-padding-y 0; + flex-basis: 0; + flex-grow: $item-list-col-grow; + flex-shrink: $item-list-col-shrink; + margin-left: auto; + margin-right: auto; + min-width: 0; - &.fixed { - flex-grow: 0; - flex-shrink: 0; - flex-basis: auto; - } + &.fixed { + flex-grow: 0; + flex-shrink: 0; + flex-basis: auto; + } - &.pull-left { - margin-right: auto; - } + &.pull-left { + margin-right: auto; + } - &.pull-right { - margin-left: auto; - } + &.pull-right { + margin-left: auto; + } - & > div { - width: 100%; - } + & > div { + width: 100%; + } - &:last-child { - padding-right: 0; - } - } + &:last-child { + padding-right: 0; + } + } - .no-overflow { - overflow: hidden; - } + .no-overflow { + overflow: hidden; + } - .no-wrap { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + .no-wrap { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } - /* ******************************************* * Item components ********************************************** */ - .item-list { - /******************************************** - * Header - *********************************************/ + /******************************************** + * Header + *********************************************/ - .item-list-header { - .item-col.item-col-header { - span { - color: #999; - font-size: 0.8rem; - font-weight: 700 !important; - } - } - } + .item-list-header { + .item-col.item-col-header { + span { + color: #999; + font-size: 0.8rem; + font-weight: 700 !important; + } + } + } - /******************************************** - * Heading - *********************************************/ + /******************************************** + * Heading + *********************************************/ - .item-heading { - font-size: 0.9rem; - display: none; - color: #666; - font-weight: 700; - padding-right: $item-list-padding-x; + .item-heading { + font-size: 0.9rem; + display: none; + color: #666; + font-weight: 700; + padding-right: $item-list-padding-x; - @include media-down(sm) { - display: block; - } + @include media-down(sm) { + display: block; + } - @include media(sm) { - width: 100%; - } + @include media(sm) { + width: 100%; + } - @include media(xs) { - width: 40%; - } - } + @include media(xs) { + width: 40%; + } + } - /******************************************** - * Checkbox - *********************************************/ + /******************************************** + * Checkbox + *********************************************/ - .item-col.item-col-check { - flex-basis: 20px + $item-list-padding-x; + .item-col.item-col-check { + flex-basis: 20px + $item-list-padding-x; - @include media-down(sm) { - order: -8; - } - } + @include media-down(sm) { + order: -8; + } + } - .item-check { - margin-bottom: 0; + .item-check { + margin-bottom: 0; - .checkbox + span { - padding-right: 0; + .checkbox + span { + padding-right: 0; - &:before { - width: 20px; - } - } - } + &:before { + width: 20px; + } + } + } - /******************************************** - * Image - *********************************************/ + /******************************************** + * Image + *********************************************/ - .item-col.item-col-img { - display: flex; - flex-basis: 60px + $item-list-padding-x; + .item-col.item-col-img { + display: flex; + flex-basis: 60px + $item-list-padding-x; - &.xs{ - flex-basis: 30px + $item-list-padding-x; - } + &.xs { + flex-basis: 30px + $item-list-padding-x; + } - &.sm { - flex-basis: 40px + $item-list-padding-x; - } + &.sm { + flex-basis: 40px + $item-list-padding-x; + } - &.lg { - flex-basis: 90px + $item-list-padding-x; - } + &.lg { + flex-basis: 90px + $item-list-padding-x; + } - &.xl { - flex-basis: 110px + $item-list-padding-x; - } + &.xl { + flex-basis: 110px + $item-list-padding-x; + } - a { - width: 100%; - // display: flex; - } - } + a { + width: 100%; + // display: flex; + } + } - .item-img { - flex-grow: 1; - align-self: stretch; - background-color: #efefef; - padding-bottom: 100%; - width: 100%; - height: 0; + .item-img { + flex-grow: 1; + align-self: stretch; + background-color: #EFEFEF; + padding-bottom: 100%; + width: 100%; + height: 0; - @include bg-cover(); - } + @include bg-cover(); + } - /******************************************** - * Title - *********************************************/ + /******************************************** + * Title + *********************************************/ - .item-col.item-col-title { + .item-col.item-col-title { - @include media-down(sm) { - order: -4; - } + @include media-down(sm) { + order: -4; + } - a { - display: block; - } - } + a { + display: block; + } + } - .item-title { - margin: 0; - font-size: inherit; - line-height: inherit; - font-weight: 600; - } + .item-title { + margin: 0; + font-size: inherit; + line-height: inherit; + font-weight: 600; + } - /******************************************** - * Stats - *********************************************/ + /******************************************** + * Stats + *********************************************/ - .item-stats { - height: $item-list-line-height; - } + .item-stats { + height: $item-list-line-height; + } - /******************************************** - * Actions - *********************************************/ + /******************************************** + * Actions + *********************************************/ - .item-col.item-col-actions-dropdown { - flex-basis: 30px + $item-list-padding-x; - text-align: center; - padding-left: 0 !important; + .item-col.item-col-actions-dropdown { + flex-basis: 30px + $item-list-padding-x; + text-align: center; + padding-left: 0 !important; - @include media-down(sm) { - order: -3; + @include media-down(sm) { + order: -3; - flex-basis: 30px + $item-list-padding-x !important; - padding-right: $item-list-padding-x; - } - } + flex-basis: 30px + $item-list-padding-x !important; + padding-right: $item-list-padding-x; + } + } - .item-actions-dropdown { - position: relative; - font-size: 1.1rem; + .item-actions-dropdown { + position: relative; + font-size: 1.1rem; - &.active { - .item-actions-block { - max-width: 120px; - } + &.active { + .item-actions-block { + max-width: 120px; + } - .item-actions-toggle-btn { - color: $color-primary; + .item-actions-toggle-btn { + color: $color-primary; - .active { - display: block; - } + .active { + display: block; + } - .inactive { - display: none; - } - } - } + .inactive { + display: none; + } + } + } - .item-actions-toggle-btn { - color: lighten($color-text-light, 10); - font-size: 1.2rem; - cursor: pointer; - width: 100%; - line-height: 30px; - text-align: center; - text-decoration: none; + .item-actions-toggle-btn { + color: lighten($color-text-light, 10); + font-size: 1.2rem; + cursor: pointer; + width: 100%; + line-height: 30px; + text-align: center; + text-decoration: none; - .active { - display: none; - } - } + .active { + display: none; + } + } - .item-actions-block { - height: 30px; - max-width: 0px; - line-height: 30px; - overflow: hidden; - position: absolute; - top: 0; - right: 100%; - background-color: $color-divider; - border-radius: 3px; - transition: all 0.15s ease-in-out; + .item-actions-block { + height: 30px; + max-width: 0px; + line-height: 30px; + overflow: hidden; + position: absolute; + top: 0; + right: 100%; + background-color: $color-divider; + border-radius: 3px; + transition: all 0.15s ease-in-out; - &.direction-right { - right: auto; - left: 100%; - } + &.direction-right { + right: auto; + left: 100%; + } + .item-actions-list { + padding: 0; + list-style: none; + white-space: nowrap; + padding: 0 5px; - .item-actions-list { - padding: 0; - list-style: none; - white-space: nowrap; - padding: 0 5px; + li { + display: inline-block; + padding: 0; + } - li{ - display: inline-block; - padding: 0; - } + a { + display: block; + padding: 0 5px; - a { - display: block; - padding: 0 5px; + &.edit { + color: #38424C; + } - &.edit { - color: #38424C; - } + &.check { + color: #40B726; + } - &.check { - color: #40B726; - } + &.remove { + color: #DB0E1E; + } + } + } + } - &.remove { - color: #DB0E1E; - } - } - } - } + } - } - - /******************************************** - * Something else? - *********************************************/ + /******************************************** + * Something else? + *********************************************/ } - /* ******************************************* * Adjustments ********************************************** */ // Item which is located inside card inside item-list .card > .item-list .item > .item-row { - padding: 0 $card-padding-x; + padding: 0 $card-padding-x; - @include media(xl) { - padding: 0 $card-padding-x-xl; - } + @include media(xl) { + padding: 0 $card-padding-x-xl; + } - @include media-down(sm) { - padding: 0 $card-padding-x-sm; - } + @include media-down(sm) { + padding: 0 $card-padding-x-sm; + } } \ No newline at end of file diff --git a/resources/assets/sass/admin/app/items/list/items-list.scss b/resources/assets/sass/admin/app/items/list/items-list.scss index bd9eb441..c5fff005 100644 --- a/resources/assets/sass/admin/app/items/list/items-list.scss +++ b/resources/assets/sass/admin/app/items/list/items-list.scss @@ -1,5 +1,9 @@ @import "../../../imports"; +.item-list { + +} + .items-list-page { .title-search-block { @@ -313,12 +317,7 @@ text-align: left; } - } - - } } - - } \ No newline at end of file diff --git a/resources/views/admin/content/overview.blade.php b/resources/views/admin/content/overview.blade.php index 24d5f3b9..0bdb21bb 100644 --- a/resources/views/admin/content/overview.blade.php +++ b/resources/views/admin/content/overview.blade.php @@ -22,132 +22,140 @@ @endif @if (count($pages) > 0) -
-
-
-
@lang('admin/contents.title')
-
@lang('admin/contents.status')
-
@lang('admin/contents.moduleName')
-
@lang('admin/contents.createdAt')
-
@lang('admin/contents.actions')
-
- @foreach($pages as $page) -
-
- - @if(!view()->exists(template_name($page->template, false))) - - @else - @if(!empty($page->titlePhoto)) - {{$page->title}} - @else - {{$page->title}} - @endif - @endif - +
+
+
+
+
+
@lang('admin/contents.title')
+
@lang('admin/contents.status')
+
@lang('admin/contents.moduleName')
+
@lang('admin/contents.createdAt')
+
@lang('admin/contents.actions')
-
- - {{$page->title}} - + @foreach($pages as $page) +
+ +
+ + {{$page->title}} + - @if($page->isHomepage) @lang('admin/contents.homepage') @endif -
-
+ @if($page->isHomepage) @lang('admin/contents.homepage') @endif +
+
{{$statuses[$page->status]}} -
- -
@date($page->created_at)
-
-
- +
+ +
@date($page->created_at)
+
+
+ - + - -
-
-
  • - - -
  • -
    - -
    + @endforeach
    - @endforeach +
    + +
    -
    - {!! $pages->render() !!} -
    @else