diff --git a/app/Http/Requests/Bo/HistoricalMilestones/StoreHistoricalMilestoneRequest.php b/app/Http/Requests/Bo/HistoricalMilestones/StoreHistoricalMilestoneRequest.php
index 871fd88..3aa9004 100644
--- a/app/Http/Requests/Bo/HistoricalMilestones/StoreHistoricalMilestoneRequest.php
+++ b/app/Http/Requests/Bo/HistoricalMilestones/StoreHistoricalMilestoneRequest.php
@@ -41,7 +41,7 @@ class StoreHistoricalMilestoneRequest extends FormRequest
public function rules(): array
{
$rules = [
- 'year' => 'required|integer|min:1901|max:2155',
+ 'year' => 'required|integer|min:1900|max:2100',
'title' => 'required|string|between:3,255',
'text' => 'required|string|between:3,255',
'picture_alt' => 'required|string|between:3,255',
diff --git a/app/Models/HistoricalMilestone.php b/app/Models/HistoricalMilestone.php
index 2872194..c3823b6 100644
--- a/app/Models/HistoricalMilestone.php
+++ b/app/Models/HistoricalMilestone.php
@@ -3,6 +3,7 @@
namespace App\Models;
use App\Lib\Helpers\FileStorageHelper;
+use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -19,9 +20,12 @@ use Illuminate\Database\Eloquent\Model;
* @property integer $year Year of the historical milestone.
* @property-read \Carbon\Carbon $created_at Created date.
* @property-read \Carbon\Carbon $updated_at Updated date.
+ *
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class HistoricalMilestone extends Model
{
+ use ActivityLog;
use HasFactory;
/**
diff --git a/app/Models/JobVideo.php b/app/Models/JobVideo.php
index fe8e7c3..e75853c 100644
--- a/app/Models/JobVideo.php
+++ b/app/Models/JobVideo.php
@@ -2,6 +2,7 @@
namespace App\Models;
+use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -11,9 +12,12 @@ use Illuminate\Database\Eloquent\Model;
* @property string $video_id Id of the Youtube video.
* @property-read \Carbon\Carbon $created_at Created date.
* @property-read \Carbon\Carbon $updated_at Updated date.
+ *
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class JobVideo extends Model
{
+ use ActivityLog;
use HasFactory;
/**
diff --git a/app/Models/Logo.php b/app/Models/Logo.php
index c70fa0b..86d7e97 100644
--- a/app/Models/Logo.php
+++ b/app/Models/Logo.php
@@ -3,6 +3,7 @@
namespace App\Models;
use App\Lib\Helpers\FileStorageHelper;
+use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -15,10 +16,11 @@ use Illuminate\Database\Eloquent\Model;
* @property-read \Carbon\Carbon $updated_at Updated date.
*
* @property-read \App\Models\Site $sites Sites Many-to-many relationship.
-
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class Logo extends Model
{
+ use ActivityLog;
use HasFactory;
/**
diff --git a/app/Models/News.php b/app/Models/News.php
index cbe51a0..f6d9fff 100644
--- a/app/Models/News.php
+++ b/app/Models/News.php
@@ -29,6 +29,8 @@ use Illuminate\Support\Str;
* @property \Carbon\Carbon|null $unpublish_at Unpublication status update date.
* @property-read \Carbon\Carbon $created_at Created date.
* @property-read \Carbon\Carbon $updated_at Updated date.
+ *
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class News extends Model
{
diff --git a/app/Models/Section.php b/app/Models/Section.php
index 3256c96..891797e 100644
--- a/app/Models/Section.php
+++ b/app/Models/Section.php
@@ -6,6 +6,7 @@ use App\Enums\InputType;
use App\Enums\Sections\PageSectionEnum;
use App\Lib\Helpers\FileStorageHelper;
use App\Lib\Helpers\ToolboxHelper;
+use App\Traits\Models\ActivityLog;
use App\Traits\Models\MiniCrudModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -20,10 +21,11 @@ use Illuminate\Support\Str;
* @property-read \Carbon\Carbon $updated_at Updated date.
*
* @property-read \App\Models\StaticPage $page StaticPage Belongs to relationship.
-
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class Section extends Model
{
+ use ActivityLog;
use HasFactory;
use MiniCrudModel;
diff --git a/app/Models/Site.php b/app/Models/Site.php
index 29c60df..0e0a274 100644
--- a/app/Models/Site.php
+++ b/app/Models/Site.php
@@ -49,6 +49,7 @@ use Illuminate\Support\Str;
* @property-read \Carbon\Carbon $updated_at Updated date.
*
* @property-read \App\Models\Logo $logos Logos Many-to-many relationship.
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class Site extends Model
{
diff --git a/app/Models/Slide.php b/app/Models/Slide.php
index 2e5d20e..7d371e9 100644
--- a/app/Models/Slide.php
+++ b/app/Models/Slide.php
@@ -3,6 +3,7 @@
namespace App\Models;
use App\Lib\Helpers\FileStorageHelper;
+use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -21,9 +22,12 @@ use Illuminate\Database\Eloquent\Model;
* @property string $picture_title Title attribute of the image.
* @property-read \Carbon\Carbon $created_at Created date.
* @property-read \Carbon\Carbon $updated_at Updated date.
+ *
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class Slide extends Model
{
+ use ActivityLog;
use HasFactory;
/**
diff --git a/app/Models/StaticPage.php b/app/Models/StaticPage.php
index 204758e..e777ad2 100644
--- a/app/Models/StaticPage.php
+++ b/app/Models/StaticPage.php
@@ -18,6 +18,8 @@ use Illuminate\Support\Str;
* @property string $content WYSIWYG text content using ckeditor.
* @property-read \Illuminate\Support\Carbon $created_at Created date.
* @property-read \Illuminate\Support\Carbon $updated_at Updated date.
+ *
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class StaticPage extends Model
{
diff --git a/app/Models/Strip.php b/app/Models/Strip.php
index 50e3841..edfd857 100644
--- a/app/Models/Strip.php
+++ b/app/Models/Strip.php
@@ -16,6 +16,7 @@ use Illuminate\Database\Eloquent\Model;
* @property-read \Carbon\Carbon $updated_at Updated date.
*
* @property-read \App\Models\News $news News Belongs to relationship.
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class Strip extends Model
{
diff --git a/app/Models/Testimonial.php b/app/Models/Testimonial.php
index b08d0dd..eecf198 100644
--- a/app/Models/Testimonial.php
+++ b/app/Models/Testimonial.php
@@ -3,6 +3,7 @@
namespace App\Models;
use App\Lib\Helpers\FileStorageHelper;
+use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -16,9 +17,12 @@ use Illuminate\Database\Eloquent\Model;
* @property string $picture_title Title attribute of the image.
* @property-read \Carbon\Carbon $created_at Created date.
* @property-read \Carbon\Carbon $updated_at Updated date.
+ *
+ * @property-read \App\Models\ActivityLog $activityLogs Activities logs One-to-many relationship.
*/
class Testimonial extends Model
{
+ use ActivityLog;
use HasFactory;
/**
diff --git a/app/Models/User.php b/app/Models/User.php
index 8dc7ebd..9ae673d 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -112,16 +112,4 @@ class User extends Authenticatable
$model->password = Hash::make($model->password);
}
}
-
- // * RELATIONS
-
- /**
- * Activities logs One-to-many relationship.
- *
- * @return \Illuminate\Database\Eloquent\Relations\HasMany
- */
- public function activityLogs(): \Illuminate\Database\Eloquent\Relations\HasMany
- {
- return $this->hasMany(ActivityLog::class);
- }
}
diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php
index e3c0d38..8038f88 100644
--- a/app/Policies/UserPolicy.php
+++ b/app/Policies/UserPolicy.php
@@ -122,8 +122,9 @@ class UserPolicy
*/
public function changePublished(User $authUser, User $user): bool
{
- return $authUser->getRouteKey() !== $user->getRouteKey() and
+ return ($user->getRouteKey()) ? $authUser->getRouteKey() !== $user->getRouteKey() and
UserStaticRules::atLeastRole($authUser, RoleEnum::admin) and
- UserStaticRules::atLeastRole($authUser, $user->role);
+ UserStaticRules::atLeastRole($authUser, $user->role) :
+ UserStaticRules::atLeastRole($authUser, RoleEnum::admin);
}
}
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index e2e4129..63cc851 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -2,6 +2,8 @@
namespace App\Providers;
+use App\Models\News;
+use App\Models\Strip;
use App\Models\User;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
@@ -42,6 +44,8 @@ class RouteServiceProvider extends ServiceProvider
});
Route::model('user', User::class);
+ Route::model('strip', Strip::class);
+ Route::model('news', News::class);
}
/**
diff --git a/app/Traits/Models/ActivityLog.php b/app/Traits/Models/ActivityLog.php
index 67973e1..5b63f41 100644
--- a/app/Traits/Models/ActivityLog.php
+++ b/app/Traits/Models/ActivityLog.php
@@ -20,4 +20,16 @@ trait ActivityLog
{
static::observe(ModelObserver::class);
}
+
+ // * RELATIONS
+
+ /**
+ * Activities logs One-to-many relationship.
+ *
+ * @return \Illuminate\Database\Eloquent\Relations\HasMany
+ */
+ public function activityLogs(): \Illuminate\Database\Eloquent\Relations\HasMany
+ {
+ return $this->hasMany(ActivityLog::class);
+ }
}
diff --git a/database/.gitignore b/database/.gitignore
deleted file mode 100644
index 9b19b93..0000000
--- a/database/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.sqlite*
diff --git a/resources/lang/.gitkeep b/resources/lang/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/resources/lang/en.json b/resources/lang/en.json
deleted file mode 100644
index f0f6ed2..0000000
--- a/resources/lang/en.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "(and :count more error)": "(and :count more error)",
- "(and :count more errors)": "(and :count more errors)",
- "A fresh verification link has been sent to your email address.": "A fresh verification link has been sent to your email address.",
- "All rights reserved.": "All rights reserved.",
- "Before proceeding, please check your email for a verification link.": "Before proceeding, please check your email for a verification link.",
- "click here to request another": "click here to request another",
- "Confirm Password": "Confirm Password",
- "Dashboard": "Dashboard",
- "Email Address": "Email Address",
- "Forbidden": "Forbidden",
- "Forgot Your Password?": "Forgot Your Password?",
- "Go to page :page": "Go to page :page",
- "Hello!": "Hello!",
- "If you did not create an account, no further action is required.": "If you did not create an account, no further action is required.",
- "If you did not receive the email": "If you did not receive the email",
- "If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.",
- "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:",
- "Invalid JSON was returned from the route.": "Invalid JSON was returned from the route.",
- "Login": "Login",
- "Logout": "Logout",
- "Name": "Name",
- "Not Found": "Not Found",
- "of": "of",
- "Page Expired": "Page Expired",
- "Pagination Navigation": "Pagination Navigation",
- "Password": "Password",
- "Payment Required": "Payment Required",
- "Please click the button below to verify your email address.": "Please click the button below to verify your email address.",
- "Please confirm your password before continuing.": "Please confirm your password before continuing.",
- "Regards": "Regards",
- "Register": "Register",
- "Remember Me": "Remember Me",
- "Reset Password": "Reset Password",
- "Reset Password Notification": "Reset Password Notification",
- "results": "results",
- "Send Password Reset Link": "Send Password Reset Link",
- "Server Error": "Server Error",
- "Service Unavailable": "Service Unavailable",
- "Showing": "Showing",
- "The given data was invalid.": "The given data was invalid.",
- "The response is not a streamed response.": "The response is not a streamed response.",
- "The response is not a view.": "The response is not a view.",
- "This password reset link will expire in :count minutes.": "This password reset link will expire in :count minutes.",
- "to": "to",
- "Toggle navigation": "Toggle navigation",
- "Too Many Requests": "Too Many Requests",
- "Unauthorized": "Unauthorized",
- "Verify Email Address": "Verify Email Address",
- "Verify Your Email Address": "Verify Your Email Address",
- "Whoops!": "Whoops!",
- "You are logged in!": "You are logged in!",
- "You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account."
-}
diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php
deleted file mode 100644
index 6db4982..0000000
--- a/resources/lang/en/auth.php
+++ /dev/null
@@ -1,9 +0,0 @@
- 'These credentials do not match our records.',
- 'password' => 'The password is incorrect.',
- 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
-];
diff --git a/resources/lang/en/crud.php b/resources/lang/en/crud.php
deleted file mode 100644
index 04f9293..0000000
--- a/resources/lang/en/crud.php
+++ /dev/null
@@ -1,100 +0,0 @@
- [
- 'list' => 'list',
- 'view' => 'view',
- 'create' => 'create',
- 'duplicate' => 'duplicate',
- 'update' => 'update',
- 'delete' => 'delete',
- 'save' => 'save',
- 'edit' => 'edit',
- ],
-
- 'helpers' => [
- 'list' => 'List',
- 'list_all' => 'List all :model',
- 'create_model' => 'Create :model',
- 'view_model' => 'View :model',
- 'update_model' => 'Update :model',
- 'duplicate_model' => 'Duplicate :model',
- 'delete_model' => 'Delete :model',
- 'save_model' => 'Save :model',
- 'edit_model' => 'Edit :model',
- 'no_results' => 'No results for :models',
- 'publish' => 'Publish',
- 'unpublish' => 'Unpublish',
- 'seo_title' => 'Must give a precise description of the page, which is recommended for optimum
- positioning in search engines (
tag).',
- 'seo_description' => 'Must give a precise description of the page content ( description tag).',
- ],
-
- 'libs' => [
- 'toolbox' => [
- 'assertFieldIsUnique' => 'The :value for the :attribute field is already in use',
- 'assertNoInternalBoUrls' => ':attribute : It is forbidden to paste back-office uri into this field',
- 'assertNoInternalUrls' => ':attribute : It is forbidden to paste a url of :appname into this field',
- ]
- ],
-
- 'messages' => [
- 'has_been_created' => ':model has been created',
- 'cannot_be_created' => ':model cannot be created',
- 'has_been_updated' => ':model has been updated',
- 'cannot_be_updated' => ':model cannot be updated',
- 'has_been_deleted' => ':model has been deleted',
- 'cannot_be_deleted' => ':model cannot be deleted',
- 'order_changed' => 'The order has been changed!',
- 'order_not_changed' => 'The order hasn\'t been changed!',
- 'publish_status_saved' => 'Change of publication status successful!',
- 'right' => 'You don\'t have the rights to access this part !',
- 'theme_updated' => 'The theme has been updated !',
- 'user_unpublished' => 'You cannot unpublished your own account !',
- ],
-
- 'minicrud' => [
- 'visibility_label' => 'Visibility',
- 'visibility_helper' => 'Check to make it visible.',
- 'enum_select' => 'Select :enum from the list.',
- 'associated_enum' => 'Associated :enum',
- 'dimensions_must_be' => 'Must be :widthpx (width) by :heightpx (height).',
- 'picture_title_helper' => 'Useful for users, displayed by moving the mouse over the image',
- 'picture_title_label' => 'Title attribute of the image',
- 'picture_alt_helper' => 'Must describe your image for search engines and blind people (5 to 6 words)',
- 'picture_alt_label' => 'Alt attribute of the image',
- 'text_warning' => 'Proofread your content before publishing it',
- ],
-
- 'other' => [
- 'up' => 'Change the order of appearance upwards',
- 'down' => 'Change the order of appearance downwards',
- 'no_model_found' => 'No :model found|No :model found',
- 'publish' => 'Published',
- 'unpublish' => 'Unpublished',
- 'search_start' => 'Start search',
- 'search_delete' => 'Delete search',
- 'search_placeholder' => 'Your keywords here...',
- 'sort_ascending' => 'Sort :name in ascending order',
- 'sort_descending' => 'Sort :name in descending order',
- 'sort_delete' => 'Delete sorting',
- 'sort_arrow' => 'Here, the arrows are used to sort, not filter.',
- 'right' => 'You don\'t have the rights',
- ],
-
- 'meta' => [
- 'title' => [
- 'create' => '{*} Create a new :model',
- 'edit' => '{*} Edit an existing :model',
- 'show' => '{*} See an existing :model',
- ],
- // phpcs:disable Generic.Files.LineLength.TooLong
- 'description' => [
- 'index' => '{*} List of all the :model',
- 'create' => '{*} Creation of a new :model',
- 'edit' => '{*} Edition of an existing :model',
- 'show' => '{*} See informations of an existing :model déjà existant',
- ],
- // phpcs:enable
- ]
-];
diff --git a/resources/lang/en/enums.php b/resources/lang/en/enums.php
deleted file mode 100644
index 5d8e228..0000000
--- a/resources/lang/en/enums.php
+++ /dev/null
@@ -1,13 +0,0 @@
- [
- "light" => "light",
- "dark" => "dark",
- ],
- 'user-role' => [
- "conceptor" => "conceptor",
- "admin" => "admin",
- "visitor" => "visitor",
- ]
-];
diff --git a/resources/lang/en/http-statuses.php b/resources/lang/en/http-statuses.php
deleted file mode 100644
index 3346f78..0000000
--- a/resources/lang/en/http-statuses.php
+++ /dev/null
@@ -1,84 +0,0 @@
- 'Unknown Error',
- '100' => 'Continue',
- '101' => 'Switching Protocols',
- '102' => 'Processing',
- '200' => 'OK',
- '201' => 'Created',
- '202' => 'Accepted',
- '203' => 'Non-Authoritative Information',
- '204' => 'No Content',
- '205' => 'Reset Content',
- '206' => 'Partial Content',
- '207' => 'Multi-Status',
- '208' => 'Already Reported',
- '226' => 'IM Used',
- '300' => 'Multiple Choices',
- '301' => 'Moved Permanently',
- '302' => 'Found',
- '303' => 'See Other',
- '304' => 'Not Modified',
- '305' => 'Use Proxy',
- '307' => 'Temporary Redirect',
- '308' => 'Permanent Redirect',
- '400' => 'Bad Request',
- '401' => 'Unauthorized',
- '402' => 'Payment Required',
- '403' => 'Forbidden',
- '404' => 'Not Found',
- '405' => 'Method Not Allowed',
- '406' => 'Not Acceptable',
- '407' => 'Proxy Authentication Required',
- '408' => 'Request Timeout',
- '409' => 'Conflict',
- '410' => 'Gone',
- '411' => 'Length Required',
- '412' => 'Precondition Failed',
- '413' => 'Payload Too Large',
- '414' => 'URI Too Long',
- '415' => 'Unsupported Media Type',
- '416' => 'Range Not Satisfiable',
- '417' => 'Expectation Failed',
- '418' => 'I\'m a teapot',
- '419' => 'Session Has Expired',
- '421' => 'Misdirected Request',
- '422' => 'Unprocessable Entity',
- '423' => 'Locked',
- '424' => 'Failed Dependency',
- '425' => 'Too Early',
- '426' => 'Upgrade Required',
- '428' => 'Precondition Required',
- '429' => 'Too Many Requests',
- '431' => 'Request Header Fields Too Large',
- '444' => 'Connection Closed Without Response',
- '449' => 'Retry With',
- '451' => 'Unavailable For Legal Reasons',
- '499' => 'Client Closed Request',
- '500' => 'Internal Server Error',
- '501' => 'Not Implemented',
- '502' => 'Bad Gateway',
- '503' => 'Maintenance Mode',
- '504' => 'Gateway Timeout',
- '505' => 'HTTP Version Not Supported',
- '506' => 'Variant Also Negotiates',
- '507' => 'Insufficient Storage',
- '508' => 'Loop Detected',
- '509' => 'Bandwidth Limit Exceeded',
- '510' => 'Not Extended',
- '511' => 'Network Authentication Required',
- '520' => 'Unknown Error',
- '521' => 'Web Server is Down',
- '522' => 'Connection Timed Out',
- '523' => 'Origin Is Unreachable',
- '524' => 'A Timeout Occurred',
- '525' => 'SSL Handshake Failed',
- '526' => 'Invalid SSL Certificate',
- '527' => 'Railgun Error',
- '598' => 'Network Read Timeout Error',
- '599' => 'Network Connect Timeout Error',
- 'unknownError' => 'Unknown Error',
-];
diff --git a/resources/lang/en/models.php b/resources/lang/en/models.php
deleted file mode 100644
index a709346..0000000
--- a/resources/lang/en/models.php
+++ /dev/null
@@ -1,9 +0,0 @@
- [
- 'user' => 'user',
- 'activity_log' => 'activity log|activity logs',
- 'static_page' => 'static page|static pages',
- ]
-];
diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php
deleted file mode 100644
index ead9596..0000000
--- a/resources/lang/en/pagination.php
+++ /dev/null
@@ -1,12 +0,0 @@
- 'Next »',
- 'previous' => '« Previous',
- 'previous_page' => 'Previous page',
- 'next_page' => 'Next page',
- 'specific_page' => 'Go to page n°:id',
- 'paginate_list' => 'Number of elements per page',
-];
diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php
deleted file mode 100644
index f3b65ba..0000000
--- a/resources/lang/en/passwords.php
+++ /dev/null
@@ -1,11 +0,0 @@
- 'Your password has been reset.',
- 'sent' => 'We have emailed your password reset link.',
- 'throttled' => 'Please wait before retrying.',
- 'token' => 'This password reset token is invalid.',
- 'user' => 'We can\'t find a user with that email address.',
-];
diff --git a/resources/lang/en/recaptcha.php b/resources/lang/en/recaptcha.php
deleted file mode 100644
index 8a95f21..0000000
--- a/resources/lang/en/recaptcha.php
+++ /dev/null
@@ -1,6 +0,0 @@
- 'An error occurred when validating the form, please try again',
- 'not_enough_score' => 'You have not obtained a fairly high score when validation of the reCAPTCHA'
-];
diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php
deleted file mode 100644
index a2bcbb2..0000000
--- a/resources/lang/en/validation.php
+++ /dev/null
@@ -1,240 +0,0 @@
- 'The :attribute must be accepted.',
- 'accepted_if' => 'The :attribute must be accepted when :other is :value.',
- 'active_url' => 'The :attribute is not a valid URL.',
- 'after' => 'The :attribute must be a date after :date.',
- 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
- 'alpha' => 'The :attribute may only contain letters.',
- 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
- 'alpha_num' => 'The :attribute may only contain letters and numbers.',
- 'array' => 'The :attribute must be an array.',
- 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
- 'before' => 'The :attribute must be a date before :date.',
- 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
- 'between' => [
- 'array' => 'The :attribute must have between :min and :max items.',
- 'file' => 'The :attribute must be between :min and :max kilobytes.',
- 'numeric' => 'The :attribute must be between :min and :max.',
- 'string' => 'The :attribute must be between :min and :max characters.',
- ],
- 'boolean' => 'The :attribute field must be true or false.',
- 'can' => 'The :attribute field contains an unauthorized value.',
- 'confirmed' => 'The :attribute confirmation does not match.',
- 'current_password' => 'The password is incorrect.',
- 'date' => 'The :attribute is not a valid date.',
- 'date_equals' => 'The :attribute must be a date equal to :date.',
- 'date_format' => 'The :attribute does not match the format :format.',
- 'decimal' => 'The :attribute field must have :decimal decimal places.',
- 'declined' => 'The :attribute must be declined.',
- 'declined_if' => 'The :attribute must be declined when :other is :value.',
- 'different' => 'The :attribute and :other must be different.',
- 'digits' => 'The :attribute must be :digits digits.',
- 'digits_between' => 'The :attribute must be between :min and :max digits.',
- 'dimensions' => 'The :attribute has invalid image dimensions.',
- 'distinct' => 'The :attribute field has a duplicate value.',
- 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
- 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
- 'email' => 'The :attribute must be a valid email address.',
- 'ends_with' => 'The :attribute must end with one of the following: :values.',
- 'enum' => 'The selected :attribute is invalid.',
- 'exists' => 'The selected :attribute is invalid.',
- 'file' => 'The :attribute must be a file.',
- 'filled' => 'The :attribute field is required.',
- 'gt' => [
- 'array' => 'The :attribute must have more than :value items.',
- 'file' => 'The :attribute must be greater than :value kilobytes.',
- 'numeric' => 'The :attribute must be greater than :value.',
- 'string' => 'The :attribute must be greater than :value characters.',
- ],
- 'gte' => [
- 'array' => 'The :attribute must have :value items or more.',
- 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
- 'numeric' => 'The :attribute must be greater than or equal :value.',
- 'string' => 'The :attribute must be greater than or equal :value characters.',
- ],
- 'image' => 'The :attribute must be an image.',
- 'in' => 'The selected :attribute is invalid.',
- 'in_array' => 'The :attribute field does not exist in :other.',
- 'integer' => 'The :attribute must be an integer.',
- 'ip' => 'The :attribute must be a valid IP address.',
- 'ipv4' => 'The :attribute must be a valid IPv4 address.',
- 'ipv6' => 'The :attribute must be a valid IPv6 address.',
- 'json' => 'The :attribute must be a valid JSON string.',
- 'lowercase' => 'The :attribute field must be lowercase.',
- 'lt' => [
- 'array' => 'The :attribute must have less than :value items.',
- 'file' => 'The :attribute must be less than :value kilobytes.',
- 'numeric' => 'The :attribute must be less than :value.',
- 'string' => 'The :attribute must be less than :value characters.',
- ],
- 'lte' => [
- 'array' => 'The :attribute must not have more than :value items.',
- 'file' => 'The :attribute must be less than or equal :value kilobytes.',
- 'numeric' => 'The :attribute must be less than or equal :value.',
- 'string' => 'The :attribute must be less than or equal :value characters.',
- ],
- 'mac_address' => 'The :attribute must be a valid MAC address.',
- 'max' => [
- 'array' => 'The :attribute may not have more than :max items.',
- 'file' => 'The :attribute may not be greater than :max kilobytes.',
- 'numeric' => 'The :attribute may not be greater than :max.',
- 'string' => 'The :attribute may not be greater than :max characters.',
- ],
- 'max_digits' => 'The :attribute field must not have more than :max digits.',
- 'mimes' => 'The :attribute must be a file of type: :values.',
- 'mimetypes' => 'The :attribute must be a file of type: :values.',
- 'min' => [
- 'array' => 'The :attribute must have at least :min items.',
- 'file' => 'The :attribute must be at least :min kilobytes.',
- 'numeric' => 'The :attribute must be at least :min.',
- 'string' => 'The :attribute must be at least :min characters.',
- ],
- 'min_digits' => 'The :attribute field must have at least :min digits.',
- 'missing' => 'The :attribute field must be missing.',
- 'missing_if' => 'The :attribute field must be missing when :other is :value.',
- 'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
- 'missing_with' => 'The :attribute field must be missing when :values is present.',
- 'missing_with_all' => 'The :attribute field must be missing when :values are present.',
- 'multiple_of' => 'The :attribute must be a multiple of :value.',
- 'not_in' => 'The selected :attribute is invalid.',
- 'not_regex' => 'The :attribute format is invalid.',
- 'numeric' => 'The :attribute must be a number.',
- 'password' => [
- 'letters' => 'The :attribute field must contain at least one letter.',
- 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
- 'numbers' => 'The :attribute field must contain at least one number.',
- 'symbols' => 'The :attribute field must contain at least one symbol.',
- 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
- ],
- 'present' => 'The :attribute field must be present.',
- 'prohibited' => 'The :attribute field is prohibited.',
- 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
- 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
- 'prohibits' => 'The :attribute field prohibits :other from being present.',
- 'regex' => 'The :attribute format is invalid.',
- 'required' => 'The :attribute field is required.',
- 'required_array_keys' => 'The :attribute field must contain entries for: :values.',
- 'required_if' => 'The :attribute field is required when :other is :value.',
- 'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
- 'required_unless' => 'The :attribute field is required unless :other is in :values.',
- 'required_with' => 'The :attribute field is required when :values is present.',
- 'required_with_all' => 'The :attribute field is required when :values is present.',
- 'required_without' => 'The :attribute field is required when :values is not present.',
- 'required_without_all' => 'The :attribute field is required when none of :values are present.',
- 'same' => 'The :attribute and :other must match.',
- 'size' => [
- 'array' => 'The :attribute must contain :size items.',
- 'file' => 'The :attribute must be :size kilobytes.',
- 'numeric' => 'The :attribute must be :size.',
- 'string' => 'The :attribute must be :size characters.',
- ],
- 'starts_with' => 'The :attribute must start with one of the following: :values',
- 'string' => 'The :attribute must be a string.',
- 'timezone' => 'The :attribute must be a valid zone.',
- 'ulid' => 'The :attribute field must be a valid ULID.',
- 'unique' => 'The :attribute has already been taken.',
- 'uploaded' => 'The :attribute failed to upload.',
- 'uppercase' => 'The :attribute field must be uppercase.',
- 'url' => 'The :attribute format is invalid.',
- 'uuid' => 'The :attribute must be a valid UUID.',
- 'attributes' => [
- 'address' => 'address',
- 'age' => 'age',
- 'amount' => 'amount',
- 'area' => 'area',
- 'available' => 'available',
- 'birthday' => 'birthday',
- 'body' => 'body',
- 'city' => 'city',
- 'content' => 'content',
- 'country' => 'country',
- 'created_at' => 'created at',
- 'creator' => 'creator',
- 'current_password' => 'current password',
- 'date' => 'date',
- 'date_of_birth' => 'date of birth',
- 'day' => 'day',
- 'deleted_at' => 'deleted at',
- 'description' => 'description',
- 'district' => 'district',
- 'duration' => 'duration',
- 'email' => 'email',
- 'excerpt' => 'excerpt',
- 'filter' => 'filter',
- 'first_name' => 'first name',
- 'gender' => 'gender',
- 'group' => 'group',
- 'hour' => 'hour',
- 'image' => 'image',
- 'last_name' => 'last name',
- 'lesson' => 'lesson',
- 'line_address_1' => 'line address 1',
- 'line_address_2' => 'line address 2',
- 'message' => 'message',
- 'middle_name' => 'middle name',
- 'minute' => 'minute',
- 'mobile' => 'mobile',
- 'month' => 'month',
- 'name' => 'name',
- 'national_code' => 'national code',
- 'number' => 'number',
- 'password' => 'password',
- 'password_confirmation' => 'password confirmation',
- 'phone' => 'phone',
- 'photo' => 'photo',
- 'postal_code' => 'postal code',
- 'price' => 'price',
- 'province' => 'province',
- 'recaptcha_response_field' => 'recaptcha response field',
- 'remember' => 'remember',
- 'restored_at' => 'restored at',
- 'result_text_under_image' => 'result text under image',
- 'role' => 'role',
- 'second' => 'second',
- 'sex' => 'sex',
- 'short_text' => 'short text',
- 'size' => 'size',
- 'state' => 'state',
- 'street' => 'street',
- 'student' => 'student',
- 'subject' => 'subject',
- 'teacher' => 'teacher',
- 'terms' => 'terms',
- 'test_description' => 'test description',
- 'test_locale' => 'test locale',
- 'test_name' => 'test name',
- 'text' => 'text',
- 'time' => 'time',
- 'title' => 'title',
- 'updated_at' => 'updated at',
- 'username' => 'username',
- 'year' => 'year',
- ],
-
- 'youtube_id' => ':attribute must be a valid Youtube video ID',
- 'vimeo_id' => ':attribute must be a valid Vimeo video ID',
-
- 'custom' => [
- 'of_the' => [
- 'male' => 'of the ',
- 'female' => 'of the ',
- 'vowel' => 'of the '
- ],
- 'event' => 'event',
- 'model' => 'target element',
- 'order' => 'order',
- 'publication' => 'publication',
- 'activated' => 'activated',
- 'target' => 'target',
- 'static_page_type' => 'static page type',
- 'seo_title' => 'SEO title',
- 'seo_description' => 'SEO description',
- 'video_id' => 'ID of the video',
- 'youtube_video_id' => 'ID od the youtube video',
- 'vimeo_video_id' => 'ID of the vimeo video',
- ],
-];
diff --git a/resources/lang/en/vue.php b/resources/lang/en/vue.php
deleted file mode 100644
index b513341..0000000
--- a/resources/lang/en/vue.php
+++ /dev/null
@@ -1,38 +0,0 @@
- [
- 'choose_a_file' => 'Choose a file',
- 'change_source_picture' => 'Edit Source Image',
- 'view_source_picture' => 'View image',
- 'resize_source_picture' => 'Resize image',
- 'resized_source_picture' => 'Image resized',
- 'preview_picture' => 'Image preview',
- 'change_picture_before_import' => 'Image modification before import',
- 'close_window' => 'Close the window',
- 'close_and_validate' => 'Validate the content and close the window',
- 'close_window_without_validation' => 'Close the window without validating the content',
- 'zoom_in' => 'Zoom in',
- 'zoom_out' => 'Zoom out',
- 'move_left' => 'Move left',
- 'move_right' => 'Move right',
- 'move_up' => 'Move up',
- 'move_down' => 'Move down',
- 'mirror_horizontal' => 'Horizontal mirror',
- 'mirror_vertical' => 'Vertical mirror',
- 'rotation' => 'Rotation',
- 'rotate_rewind' => 'Counter-clockwise rotation',
- 'rotate' => 'Clockwise rotation',
- 'degres' => ':deg degrees',
- 'validate' => 'Validate',
- 'preview' => 'Preview',
- ],
- 'WordCounterComponent' => [
- 'words' => 'Words',
- 'characters' => 'Characters'
- ],
- 'PasswordVisibility' => [
- 'hide' => 'Hide the password',
- 'show' => 'Show the password',
- ]
-];
diff --git a/resources/lang/fr/crud.php b/resources/lang/fr/crud.php
index 8aa5dc7..db9a397 100644
--- a/resources/lang/fr/crud.php
+++ b/resources/lang/fr/crud.php
@@ -2,16 +2,15 @@
return [
'actions' => [
- 'list' => 'liste',
- 'view' => 'voir',
- 'create' => 'créer',
+ 'list' => 'liste',
+ 'view' => 'voir',
+ 'create' => 'créer',
'duplicate' => 'dupliquer',
- 'update' => 'éditer',
- 'delete' => 'supprimer',
- 'save' => 'sauvegarder',
- 'edit' => 'mettre à jour',
+ 'update' => 'éditer',
+ 'delete' => 'supprimer',
+ 'save' => 'sauvegarder',
+ 'edit' => 'mettre à jour',
],
-
'helpers' => [
'list' => 'Liste',
'list_all' => 'Lister tous les :model',
@@ -22,14 +21,7 @@ return [
'delete_model' => 'Supprimer :model',
'save_model' => 'Sauvegarder :model',
'edit_model' => 'Mettre à jour :model',
- 'no_results' => 'Aucun résultat pour :model',
- 'publish' => 'Publié',
- 'unpublish' => 'Dépublié',
- 'seo_title' => 'Doit décrire précisément la page, recommandation pour un positionnement
- optimal dans les moteurs de recherche (balise ).',
- 'seo_description' => 'Doit décrire précisément le contenu de la page (balise description).',
],
-
'libs' => [
'toolbox' => [
'assertFieldIsUnique' => 'La :valeur du champ :attribut est déjà utilisée',
@@ -37,7 +29,6 @@ return [
'assertNoInternalUrls' => ':attribute : Il est interdit de coller une url de :appname dans ce champ.',
]
],
-
'messages' => [
'has_been_created' => ':model a été créé',
'cannot_be_created' => ':model ne peut être créé',
@@ -52,27 +43,25 @@ return [
'theme_updated' => 'Le thème a été mis à jour !',
'user_unpublished' => 'Vous ne pouvez pas désactiver votre propre compte !',
],
-
'minicrud' => [
'visibility_label' => 'Visibilité',
'visibility_helper' => 'Cocher pour rendre visible.',
'enum_select' => 'Sélectionnez :enum dans la liste.',
'associated_enum' => 'Associé :enum',
'dimensions_must_be' => 'Doit être :widthpx (largeur) par :heightpx (hauteur).',
- 'picture_title_helper' => 'Utile pour les utilisateurs, s\'affiche en passant la souris sur l\'image',
+ 'picture_title_helper' => 'Utile pour les utilisateurs, s\'affiche en passant la souris sur l\'image.',
'picture_title_label' => 'Attribut du titre de l\'image',
- 'picture_alt_helper' => 'Doit décrire votre image pour les moteurs de recherche et les aveugles (5 à 6 mots)',
+ 'picture_alt_helper' => 'Doit décrire votre image pour les moteurs de recherche et les
+ aveugles (5 à 6 mots).',
'picture_alt_label' => 'Attribut Alt de l\'image',
- 'text_warning' => 'Relisez votre contenu avant de le publier',
+ 'text_warning' => 'Relisez votre contenu avant de le publier.',
],
-
'pagination' => [
"previous" => "Page précédente",
"next" => "Page suivante",
"specific_page" => "Accéder à la page n°:id",
'paginate_list' => 'Nombre d\'éléments par page',
],
-
'other' => [
'up' => 'Modifier l\'ordre d\'apparition vers le haut',
'down' => 'Modifier l\'ordre d\'apparition vers le bas',
@@ -88,20 +77,18 @@ return [
'sort_arrow' => 'Ici, les flèches sont utilisées pour trier et non pour filtrer',
'right' => 'Vous n\'avez pas les droits',
],
-
'meta' => [
'title' => [
'create' => '{0} Création d\'un :model|{1} Création d\'une :model',
'edit' => '{0} Edition d\'un :model|{1} Edition d\'une :model',
'show' => '{0} Visualisation d\'un :model|{1} Visualisation d\'une :model',
],
- // phpcs:disable Generic.Files.LineLength.TooLong
'description' => [
'index' => '{0} Liste de tous les :model|{1} Liste de toutes les :model',
- 'create' => '{0} Création d\'un tout nouveau :model|{1} Création d\'une toute nouvelle :model|{2} Création d\'un tout nouvel :model',
+ 'create' => '{0} Création d\'un tout nouveau :model|{1} Création d\'une toute nouvelle
+ :model|{2} Création d\'un tout nouvel :model',
'edit' => '{0} Edition d\'un :model déjà existant|{1} Edition d\'une :model déjà existante',
'show' => '{0} Visualisation d\'un :model déjà existant|{1} Visualisation d\'une :model déjà existante',
],
- // phpcs:enable
]
];
diff --git a/resources/lang/fr/recaptcha.php b/resources/lang/fr/recaptcha.php
index 690105e..997485e 100644
--- a/resources/lang/fr/recaptcha.php
+++ b/resources/lang/fr/recaptcha.php
@@ -1,6 +1,6 @@
'Une erreur s\'est produite lors de la validation du formulaire, veuillez réessayer',
+ 'error' => 'Une erreur s\'est produite lors de la validation du formulaire, veuillez réessayer',
'not_enough_score' => 'Vous n\'avez pas obtenu un score assez élevé lors de la validation du reCAPTCHA'
];
diff --git a/resources/lang/fr/validation.php b/resources/lang/fr/validation.php
index 8fd24b5..1a72446 100644
--- a/resources/lang/fr/validation.php
+++ b/resources/lang/fr/validation.php
@@ -12,7 +12,8 @@ return [
'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.',
'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.',
'array' => 'Le champ :attribute doit être un tableau.',
- 'ascii' => 'Le champ :attribute ne doit contenir que des caractères alphanumériques et des symboles codés sur un octet.',
+ 'ascii' => 'Le champ :attribute ne doit contenir que des caractères alphanumériques et des
+ symboles codés sur un octet.',
'before' => 'Le champ :attribute doit être une date antérieure au :date.',
'before_or_equal' => 'Le champ :attribute doit être une date antérieure ou égale au :date.',
'between' => [
@@ -108,7 +109,8 @@ return [
'mixed' => 'Le champ :attribute doit contenir au moins une majuscule et une minuscule.',
'numbers' => 'Le champ :attribute doit contenir au moins un chiffre.',
'symbols' => 'Le champ :attribute doit contenir au moins un symbole.',
- 'uncompromised' => 'La valeur du champ :attribute est apparue dans une fuite de données. Veuillez choisir une valeur différente.',
+ 'uncompromised' => 'La valeur du champ :attribute est apparue dans une fuite de données. Veuillez
+ choisir une valeur différente.',
],
'present' => 'Le champ :attribute doit être présent.',
'prohibited' => 'Le champ :attribute est interdit.',
@@ -141,6 +143,8 @@ return [
'uppercase' => 'Le champ :attribute doit être en majuscules.',
'url' => 'Le format de l\'URL de :attribute n\'est pas valide.',
'uuid' => 'Le champ :attribute doit être un UUID valide',
+ 'youtube_id' => ':attribute doit être un ID de vidéo Youtube valide',
+ 'vimeo_id' => ':attribute doit être un ID de vidéo Vimeo valide',
'attributes' => [
'address' => 'adresse',
'age' => 'âge',
@@ -214,29 +218,24 @@ return [
'username' => 'nom d\'utilisateur',
'year' => 'année',
],
-
- 'youtube_id' => ':attribute doit être un ID de vidéo Youtube valide',
- 'vimeo_id' => ':attribute doit être un ID de vidéo Vimeo valide',
-
'custom' => [
'of_the' => [
'male' => 'du ',
'female' => 'de la ',
'vowel' => 'de l\''
],
- 'event' => 'évènement',
- 'model' => 'élément ciblé',
- 'order' => 'ordre',
- 'publication' => 'publication',
- 'activated' => 'activé',
- 'target' => 'cible',
- 'static_page_type' => 'type de page',
- 'seo_title' => 'titre SEO',
- 'seo_description' => 'description SEO',
- 'video_id' => 'ID de la vidéo',
- 'youtube_video_id' => 'ID de la vidéo youtube',
- 'vimeo_video_id' => 'ID de la vidéo viméo',
-
+ 'event' => 'évènement',
+ 'model' => 'élément ciblé',
+ 'order' => 'ordre',
+ 'publication' => 'publication',
+ 'activated' => 'activé',
+ 'target' => 'cible',
+ 'static_page_type' => 'type de page',
+ 'seo_title' => 'titre SEO',
+ 'seo_description' => 'description SEO',
+ 'video_id' => 'ID de la vidéo',
+ 'youtube_video_id' => 'ID de la vidéo youtube',
+ 'vimeo_video_id' => 'ID de la vidéo viméo',
'alt_attribute' => 'attribut alt',
'description_2' => 'deuxième niveau de description',
'description' => 'description',
@@ -271,7 +270,7 @@ return [
'button_label' => 'label du bouton',
'button_new_tab' => 'ouverture du lien du bouton dans un nouvel onglet',
'button_status' => 'status du bouton',
- 'button_url' => 'lien du bouton',
+ 'button_url' => 'Le lien du bouton doit être une url valide.',
'button' => 'bouton',
'url' => 'url',
'youtube_video' => 'vidéo YouTube',
@@ -280,6 +279,9 @@ return [
'job' => 'métier',
'type' => 'type',
'person' => 'personne',
-
+ 'seo_title' => 'Doit décrire précisément la page, recommandation pour un positionnement
+ optimal dans les moteurs de recherche (balise ).',
+ 'seo_description' => 'Doit décrire précisément le contenu de la page (balise description).',
+ 'required_fields' => '* Champs obligatoires',
],
];
diff --git a/resources/ts/bo/components/ImageInputComponent.vue b/resources/ts/bo/components/ImageInputComponent.vue
index 2a22063..445e887 100644
--- a/resources/ts/bo/components/ImageInputComponent.vue
+++ b/resources/ts/bo/components/ImageInputComponent.vue
@@ -121,9 +121,7 @@
v-if="intOriginalFile"
class="form-text text-body-secondary"
>
- {{ humanFileSize(intOriginalFile.size) }}
- {{ `hauteur ${intOriginalFileDimensions.height}px` }}
- {{ `largeur ${intOriginalFileDimensions.width}px` }}
+ {{ `Poids: ${humanFileSize(intOriginalFile.size)}, largeur: ${intOriginalFileDimensions.width}px, hauteur: ${intOriginalFileDimensions.height}px.` }}
diff --git a/resources/ts/bo/components/WordCounterComponent.vue b/resources/ts/bo/components/WordCounterComponent.vue
index 6b66f89..19abb51 100644
--- a/resources/ts/bo/components/WordCounterComponent.vue
+++ b/resources/ts/bo/components/WordCounterComponent.vue
@@ -106,6 +106,8 @@ export default defineComponent({