From: Vincent Vanwaelscappel Date: Wed, 1 Apr 2020 14:43:28 +0000 (+0200) Subject: wip #3544 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ba70ba4a8ce6d89359fb5369a26eef689dbb65a2;p=extranet.git wip #3544 @2 --- diff --git a/_doc/logo.pdf b/_doc/logo.pdf new file mode 100644 index 0000000..be7be92 Binary files /dev/null and b/_doc/logo.pdf differ diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 6ead4a3..87a5adb 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -39,7 +39,6 @@ class Kernel extends HttpKernel \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, - \Cubist\Backpack\app\Middleware\EmailObfuscate::class, ], 'api' => [ diff --git a/config/backpack/base.php b/config/backpack/base.php index 9376826..9b230d6 100644 --- a/config/backpack/base.php +++ b/config/backpack/base.php @@ -11,47 +11,160 @@ return [ | */ - // Project name. Shown in the breadcrumbs and a few other places. - 'project_name' => 'Extranet', - // Menu logos - 'logo_lg' => 'Cubedesigners', - 'logo_mini' => 'CD', + // Date & Datetime Format Syntax: https://carbon.nesbot.com/docs/#api-localization + 'default_date_format' => 'D MMM YYYY', + 'default_datetime_format' => 'D MMM YYYY, HH:mm', + + // Direction, according to language + // (left-to-right vs right-to-left) + 'html_direction' => 'ltr', + + // ---- + // HEAD + // ---- + + // Project name. Shown in the window title. + 'project_name' => 'Extranet Cubedesigners', + + // When clicking on the admin panel's top-left logo/name, + // where should the user be redirected? + // The string below will be passed through the url() helper. + // - default: '' (project root) + // - alternative: 'admin' (the admin's dashboard) + 'home_link' => '', + + // Content of the HTML meta robots tag to prevent indexing and link following + 'meta_robots_content' => 'noindex, nofollow', + + // ------ + // STYLES + // ------ + + // CSS files that are loaded in all pages, using Laravel's asset() helper + 'styles' => [ + 'packages/backpack/base/css/bundle.css', + 'packages/featherlight/featherlight.min.css', + 'packages/cubist/extranet/css/style.css', + + // Here's what's inside the bundle: + // 'packages/@digitallyhappy/backstrap/css/style.min.css', + // 'packages/animate.css/animate.min.css', + // 'packages/noty/noty.css', + + // Load the fonts separately (so that you can replace them at will): + 'packages/source-sans-pro/source-sans-pro.css', + 'packages/line-awesome/css/line-awesome.min.css', + + // Example (the fonts above, loaded from CDN instead) + // 'https://maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome-font-awesome.min.css', + // 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic', + + // Example (load font-awesome instead of line-awesome): + // 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css', + + ], + + // CSS files that are loaded in all pages, using Laravel's mix() helper + 'mix_styles' => [ // file_path => manifest_directory_path + // 'css/app.css' => '', + ], + + // ------ + // HEADER + // ------ + + // Menu logo. You can replace this with an tag if you have a logo. + 'project_logo' => 'Extranet Cubedesigners', + + // Show / hide breadcrumbs on admin panel pages. + 'breadcrumbs' => true, + + // Horizontal navbar classes. Helps make the admin panel look similar to your project's design. + 'header_class' => 'app-header border-0 navbar navbar-color', + // For background colors use: bg-dark, bg-primary, bg-secondary, bg-danger, bg-warning, bg-success, bg-info, bg-blue, bg-light-blue, bg-indigo, bg-purple, bg-pink, bg-red, bg-orange, bg-yellow, bg-green, bg-teal, bg-cyan, bg-white + // For links to be visible on different background colors use: "navbar-dark", "navbar-light", "navbar-color" + + // ---- + // BODY + // ---- + + // Body element classes. + 'body_class' => 'app aside-menu-fixed sidebar-lg-show', + // Try sidebar-hidden, sidebar-fixed, sidebar-compact, sidebar-lg-show + + // Sidebar element classes. + 'sidebar_class' => 'sidebar sidebar-pills bg-light', + // Remove "sidebar-transparent" for standard sidebar look + // Try "sidebar-light" or "sidebar-dark" for dark/light links + // You can also add a background class like bg-dark, bg-primary, bg-secondary, bg-danger, bg-warning, bg-success, bg-info, bg-blue, bg-light-blue, bg-indigo, bg-purple, bg-pink, bg-red, bg-orange, bg-yellow, bg-green, bg-teal, bg-cyan + + // ------ + // FOOTER + // ------ + + // Footer element classes. + 'footer_class' => 'app-footer d-print-none', + // hide it with d-none + // change background color with bg-dark, bg-primary, bg-secondary, bg-danger, bg-warning, bg-success, bg-info, bg-blue, bg-light-blue, bg-indigo, bg-purple, bg-pink, bg-red, bg-orange, bg-yellow, bg-green, bg-teal, bg-cyan, bg-white // Developer or company name. Shown in footer. - 'developer_name' => '', + 'developer_name' => 'Cubedesigners', - // Developer website. Link in footer. - 'developer_link' => 'http://www.cubedesigners.com', + // Developer website. Link in footer. Type false if you want to hide it. + 'developer_link' => 'https://www.cubedesigners.fr', - // Show powered by Laravel Backpack in the footer? + // Show powered by Laravel Backpack in the footer? true/false 'show_powered_by' => false, - // The AdminLTE skin. Affects menu color and primary/secondary colors used throughout the application. - 'skin' => 'skin-blue', - // Options: skin-black, skin-blue, skin-purple, skin-red, skin-yellow, skin-green, skin-blue-light, skin-black-light, skin-purple-light, skin-green-light, skin-red-light, skin-yellow-light + // ------- + // SCRIPTS + // ------- - // Date & Datetime Format Syntax: https://github.com/jenssegers/date#usage - // (same as Carbon) - 'default_date_format' => 'j F Y', - 'default_datetime_format' => 'j F Y H:i', + // JS files that are loaded in all pages, using Laravel's asset() helper + 'scripts' => [ + // Backstrap includes jQuery, Bootstrap, CoreUI, PNotify, Popper + 'packages/backpack/base/js/bundle.js', + 'packages/featherlight/featherlight.min.js', + 'packages/cubist/extranet/js/bundle.js', - // Content of the HTML meta robots tag to prevent indexing and link following - 'meta_robots_content' => 'noindex, nofollow', - // Overlays - CSS files that change the look and feel of the admin panel - 'overlays' => [ - 'vendor/backpack/base/backpack.bold.css', - 'vendor/backpack/base/backpack.content.is.king.css', + // examples (everything inside the bundle, loaded from CDN) + // 'https://code.jquery.com/jquery-3.4.1.min.js', + // 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', + // 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js', + // 'https://unpkg.com/@coreui/coreui/dist/js/coreui.min.js', + // 'https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js', + // 'https://unpkg.com/sweetalert/dist/sweetalert.min.js', + // 'https://cdnjs.cloudflare.com/ajax/libs/noty/3.1.4/noty.min.js' + + // examples (VueJS or React) + // 'https://unpkg.com/vue@2.4.4/dist/vue.min.js', + // 'https://unpkg.com/react@16/umd/react.production.min.js', + // 'https://unpkg.com/react-dom@16/umd/react-dom.production.min.js', + ], + + // JS files that are loaded in all pages, using Laravel's mix() helper + 'mix_scripts' => [// file_path => manifest_directory_path + // 'js/app.js' => '', ], + // ------------- + // CACHE-BUSTING + // ------------- + + // All JS and CSS assets defined above have this string appended as query string (?v=string). + // If you want to manually trigger cachebusting for all styles and scripts, + // append or prepent something to the string below, so that it's different. + 'cachebusting_string' => \PackageVersions\Versions::getVersion('backpack/crud'), + /* |-------------------------------------------------------------------------- | Registration Open |-------------------------------------------------------------------------- | | Choose whether new users/admins are allowed to register. - | This will show up the Register button in the menu and allow access to the + | This will show the Register button on the login page and allow access to the | Register functions in AuthController. | | By default the registration is open only on localhost. @@ -95,7 +208,7 @@ return [ 'middleware_class' => [ App\Http\Middleware\CheckIfAdmin::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - // \Backpack\Base\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class, + // \Backpack\CRUD\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class, ], // Alias for that middleware @@ -123,6 +236,22 @@ return [ // - example_method_name (specify the method on the User model that returns the URL) 'avatar_type' => 'gravatar', + /* + |-------------------------------------------------------------------------- + | Theme (User Interface) + |-------------------------------------------------------------------------- + */ + // Change the view namespace in order to load a different theme than the one Backpack provides. + // You can create child themes yourself, by creating a view folder anywhere in your resources/views + // and choosing that view_namespace instead of the default one. Backpack will load a file from there + // if it exists, otherwise it will load it from the default namespace ("backpack::"). + + 'view_namespace' => 'backpack::', + + // EXAMPLE: if you create a new folder in resources/views/vendor/myname/mypackage, + // your namespace would be the one below. IMPORTANT: in this case the namespace ends with a dot. + // 'view_namespace' => 'vendor.myname.mypackage.', + /* |-------------------------------------------------------------------------- | File System diff --git a/config/backpack/crud.php b/config/backpack/crud.php index ccc4408..7114ca9 100644 --- a/config/backpack/crud.php +++ b/config/backpack/crud.php @@ -8,94 +8,146 @@ return [ |-------------------------------------------------------------------------- */ - /* - |------------ - | CREATE & UPDATE - |------------ - */ - // Where do you want to redirect the user by default, after a CRUD entry is saved in the Add or Edit forms? - 'default_save_action' => 'save_and_back', //options: save_and_back, save_and_edit, save_and_new + // -------------------------- + // Default operation settings + // -------------------------- + 'operations' => [ - // When the user chooses "save and back" or "save and new", show a bubble - // for the fact that the default save action has been changed? - 'show_save_action_change' => true, //options: true, false + /* + * List Operation + */ + 'list' => [ + // Define the size/looks of the content div for all CRUDs + // To override per view use $this->crud->setListContentClass('class-string') + 'contentClass' => 'col-md-12', - // When using tabbed forms (create & update), what kind of tabs would you like? - 'tabs_type' => 'horizontal', //options: horizontal, vertical + // enable the datatables-responsive plugin, which hides columns if they don't fit? + // if not, a horizontal scrollbar will be shown instead + 'responsiveTable' => true, - // How would you like the validation errors to be shown? - 'show_grouped_errors' => true, - 'show_inline_errors' => true, + // stores pagination and filters in localStorage for two hours + // whenever the user tries to see that page, backpack loads the previous pagination and filtration + 'persistentTable' => true, - // Here you may override the css-classes for the content section of the create view globally - // To override per view use $this->crud->setCreateContentClass('class-string') - 'create_content_class' => 'col-md-8 col-md-offset-2', + // the time the table will be persisted in minutes + // after this the table info is cleared from localStorage. + // use false to never force localStorage clear. (default) + // keep in mind: User can clear his localStorage whenever he wants. - // Here you may override the css-classes for the content section of the edit view globally - // To override per view use $this->crud->setEditContentClass('class-string') - 'edit_content_class' => 'col-md-8 col-md-offset-2', + 'persistentTableDuration' => false, - // Here you may override the css-classes for the content section of the revisions timeline view globally - // To override per view use $this->crud->setRevisionsTimelineContentClass('class-string') - 'revisions_timeline_content_class' => 'col-md-10 col-md-offset-1', + // How many items should be shown by default by the Datatable? + // This value can be overwritten on a specific CRUD by calling + // $this->crud->setDefaultPageLength(50); + 'defaultPageLength' => 10, - /* - |------------ - | READ - |------------ - */ + // A 1D array of options which will be used for both the displayed option and the value, or + // A 2D array in which the first array is used to define the value options and the second array the displayed options + // If a 2D array is used, strings in the right hand array will be automatically run through trans() + 'pageLengthMenu' => [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'backpack::crud.all']], - // LIST VIEW (table view) + // How important is it for the action buttons to be visible? + // - 0 - most important + // - 1 - as important as bulk buttons + // - 2-3 - more important than the rest of the columns + // - 4 - less important than most columns + 'actionsColumnPriority' => 1, + ], - // enable the datatables-responsive plugin, which hides columns if they don't fit? - // if not, a horizontal scrollbar will be shown instead - 'responsive_table' => true, + /* + * Create Operation + */ + 'create' => [ + // Define the size/looks of the content div for all CRUDs + // To override per view use $this->crud->setCreateContentClass('class-string') + 'contentClass' => 'col-md-8 bold-labels', - // stores pagination and filters in localStorage for two hours - // whenever the user tries to see that page, backpack loads the previous pagination and filtration - 'persistent_table' => false, + // When using tabbed forms (create & update), what kind of tabs would you like? + 'tabsType' => 'horizontal', //options: horizontal, vertical - // How many items should be shown by default by the Datatable? - // This value can be overwritten on a specific CRUD by calling - // $this->crud->setDefaultPageLength(50); - 'default_page_length' => 25, + // How would you like the validation errors to be shown? + 'groupedErrors' => true, + 'inlineErrors' => true, - // A 1D array of options which will be used for both the displayed option and the value, or - // A 2D array in which the first array is used to define the value options and the second array the displayed options - // If a 2D array is used, strings in the right hand array will be automatically run through trans() - 'page_length_menu' => [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'backpack::crud.all']], + // when the page loads, put the cursor on the first input? + 'autoFocusOnFirstField' => true, - // Here you may override the css-class for the content section of the list view globally - // To override per view use $this->crud->setListContentClass('class-string') - 'list_content_class' => 'col-md-12', + // Where do you want to redirect the user by default, save? + // options: save_and_back, save_and_edit, save_and_new + 'defaultSaveAction' => 'save_and_back', - // SHOW (PREVIEW) + // When the user chooses "save and back" or "save and new", show a bubble + // for the fact that the default save action has been changed? + 'showSaveActionChange' => true, //options: true, false - // Here you may override the css-classes for the content section of the show view globally - // To override per view use $this->crud->setShowContentClass('class-string') - 'show_content_class' => 'col-md-8 col-md-offset-2', + // Before saving the entry, how would you like the request to be stripped? + // - false - ONLY save inputs that have fields (safest) + // - [x, y, z] - save ALL inputs, EXCEPT the ones given in this array + 'saveAllInputsExcept' => false, + // 'saveAllInputsExcept' => ['_token', '_method', 'http_referrer', 'current_tab', 'save_action'], + ], - /* - |------------ - | DELETE - |------------ - */ + /* + * Update Operation + */ + 'update' => [ + // Define the size/looks of the content div for all CRUDs + // To override per view use $this->crud->setEditContentClass('class-string') + 'contentClass' => 'col-md-8 bold-labels', - /* - |------------ - | REORDER - |------------ - */ + // When using tabbed forms (create & update), what kind of tabs would you like? + 'tabsType' => 'horizontal', //options: horizontal, vertical - // Here you may override the css-classes for the content section of the reorder view globally - // To override per view use $this->crud->setReorderContentClass('class-string') - 'reorder_content_class' => 'col-md-8 col-md-offset-2', + // How would you like the validation errors to be shown? + 'groupedErrors' => true, + 'inlineErrors' => true, - /* - |------------ - | DETAILS ROW - |------------ - */ + // when the page loads, put the cursor on the first input? + 'autoFocusOnFirstField' => true, + + // Where do you want to redirect the user by default, save? + // options: save_and_back, save_and_edit, save_and_new + 'defaultSaveAction' => 'save_and_back', + + // When the user chooses "save and back" or "save and new", show a bubble + // for the fact that the default save action has been changed? + 'showSaveActionChange' => true, //options: true, false + + // Before saving the entry, how would you like the request to be stripped? + // - false - Save ONLY inputs that have a field (safest, default); + // - [x, y, z] - Save ALL inputs, EXCEPT the ones given in this array; + 'saveAllInputsExcept' => false, + // 'saveAllInputsExcept' => ['_token', '_method', 'http_referrer', 'current_tab', 'save_action'], + ], + + /* + * Show Operation + */ + 'show' => [ + // Define the size/looks of the content div for all CRUDs + // To override per Controller use $this->crud->setShowContentClass('class-string') + 'contentClass' => 'col-md-8', + ], + + /* + * Reorder Operation + */ + 'reorder' => [ + // Define the size/looks of the content div for all CRUDs + // To override per Controller use $this->crud->setReorderContentClass('class-string') + 'contentClass' => 'col-md-8 col-md-offset-2', + ], + + /* + * Revisions Operation + */ + 'revisions' => [ + // Define the size/looks of the content div for all CRUDs + // To override per view use $this->crud->setRevisionsTimelineContentClass('class-string') + 'timelineContentClass' => 'col-md-12', + ], + + ], /* |------------------- @@ -103,7 +155,7 @@ return [ |------------------- */ - 'show_translatable_field_icon' => true, + 'show_translatable_field_icon' => true, 'translatable_field_icon_position' => 'right', // left or right 'locales' => [ @@ -313,7 +365,7 @@ return [ // "ga" => "Irish", // "it_IT" => "Italian (Italy)", // "it_CH" => "Italian (Switzerland)", - // 'it' => 'Italian', + 'it' => 'Italian', // "ja_JP" => "Japanese (Japan)", // "ja" => "Japanese", // "kea_CV" => "Kabuverdianu (Cape Verde)", @@ -418,7 +470,7 @@ return [ // "pa" => "Punjabi", // "ro_MD" => "Romanian (Moldova)", // "ro_RO" => "Romanian (Romania)", - // 'ro' => 'Romanian', + 'ro' => 'Romanian', // "rm_CH" => "Romansh (Switzerland)", // "rm" => "Romansh", // "rof_TZ" => "Rombo (Tanzania)", diff --git a/public/packages/cubist/extranet/css/style.css b/public/packages/cubist/extranet/css/style.css new file mode 100644 index 0000000..61330ad --- /dev/null +++ b/public/packages/cubist/extranet/css/style.css @@ -0,0 +1,15 @@ +.app-header { + flex: 0 0 70px; + background-color: #28292D; +} +.app-header .navbar-brand { + width: 220px; + padding: 20px 15px; +} +.app-header .navbar-toggler { + display: none; +} +.help-block { + opacity: 0.5; +} +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/public/packages/cubist/extranet/css/style.css.map b/public/packages/cubist/extranet/css/style.css.map new file mode 100644 index 0000000..b004830 --- /dev/null +++ b/public/packages/cubist/extranet/css/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["style.less"],"names":[],"mappings":"AAAA;EACI,cAAA;EACA,yBAAA;;AAFJ,WAII;EACI,YAAA;EACA,kBAAA;;AANR,WASI;EACI,aAAA;;AAIR;EACI,YAAA","file":"style.css"} \ No newline at end of file diff --git a/public/packages/cubist/extranet/css/style.less b/public/packages/cubist/extranet/css/style.less new file mode 100644 index 0000000..d578fd6 --- /dev/null +++ b/public/packages/cubist/extranet/css/style.less @@ -0,0 +1,17 @@ +.app-header{ + flex: 0 0 70px; + background-color: #28292D; + + .navbar-brand{ + width: 220px; + padding: 20px 15px; + } + + .navbar-toggler{ + display: none; + } +} + +.help-block{ + opacity: 0.5; +} diff --git a/public/packages/cubist/extranet/js/bundle.js b/public/packages/cubist/extranet/js/bundle.js new file mode 100644 index 0000000..e69de29 diff --git a/public/svg/logo.svg b/public/svg/logo.svg new file mode 100644 index 0000000..7d8c893 --- /dev/null +++ b/public/svg/logo.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +