Skip to content

Commit

Permalink
Added one extra input for menu description
Browse files Browse the repository at this point in the history
  • Loading branch information
naval-mantra committed Apr 17, 2018
1 parent 5de1146 commit 3fde5c0
Show file tree
Hide file tree
Showing 88 changed files with 95 additions and 788 deletions.
2 changes: 1 addition & 1 deletion Modules/Core/Config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
'admin-assets' => [
// Css
'bootstrap.css' => ['theme' => 'vendor/bootstrap/dist/css/bootstrap.min.css'],
'font-awesome.css' => ['cdn' => 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'],
'font-awesome.css' => ['theme' => 'vendor/font-awesome/css/font-awesome.min.css'],
'alertify.core.css' => ['theme' => 'css/vendor/alertify/alertify.core.css'],
'alertify.default.css' => ['theme' => 'css/vendor/alertify/alertify.default.css'],
'dataTables.bootstrap.css' => ['theme' => 'vendor/datatables.net-bs/css/dataTables.bootstrap.min.css'],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddDescriptionColumnToMenuitemsTranslationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('menu__menuitem_translations', function (Blueprint $table) {
$table->string('description')->after('uri')->nullable()->default(null);
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('menu__menuitem_translations', function (Blueprint $table) {
$table->dropColumn('description');
});
}
}
3 changes: 2 additions & 1 deletion Modules/Menu/Entities/Menuitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Menuitem extends Model
{
use Translatable, NestableTrait;

public $translatedAttributes = ['title', 'uri', 'url', 'status', 'locale'];
public $translatedAttributes = ['title', 'uri', 'url', 'status', 'locale', 'description'];
protected $fillable = [
'menu_id',
'page_id',
Expand All @@ -27,6 +27,7 @@ class Menuitem extends Model
'link_type',
'locale',
'class',
'description'
];
protected $table = 'menu__menuitems';

Expand Down
2 changes: 1 addition & 1 deletion Modules/Menu/Entities/MenuitemTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

class MenuitemTranslation extends Model
{
public $fillable = ['title', 'uri', 'url', 'status', 'locale'];
public $fillable = ['title', 'uri', 'url', 'status', 'locale', 'description'];
protected $table = 'menu__menuitem_translations';
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
{!! Form::text("{$lang}[url]", old("{$lang}[url]"), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.url')]) !!}
{!! $errors->first("{$lang}[url]", '<span class="help-block">:message</span>') !!}
</div>
<div class="form-group{{ $errors->has("{$lang}[description]") ? ' has-error' : '' }}">
{!! Form::label("{$lang}[description]", trans('menu::menu.form.description')) !!}
{!! Form::text("{$lang}[description]", old("{$lang}[description]"), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.description')]) !!}
{!! $errors->first("{$lang}[description]", '<span class="help-block">:message</span>') !!}
</div>

<div class="checkbox">
<label for="{{$lang}}[status]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
{!! Form::text("{$lang}[url]", old("{$lang}[url]", $old), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.url')]) !!}
{!! $errors->first("{$lang}[url]", '<span class="help-block">:message</span>') !!}
</div>
<div class="form-group{{ $errors->has("{$lang}[description]") ? ' has-error' : '' }}">
{!! Form::label("{$lang}[description]", trans('menu::menu.form.description')) !!}
<?php $old = $menuItem->hasTranslation($lang) ? $menuItem->translate($lang)->description : '' ?>
{!! Form::text("{$lang}[description]", old("{$lang}[description]", $old), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.description')]) !!}
{!! $errors->first("{$lang}[description]", '<span class="help-block">:message</span>') !!}
</div>
<div class="checkbox">
<?php $old = $menuItem->hasTranslation($lang) ? $menuItem->translate($lang)->status : false ?>
<label for="{{$lang}}[status]">
Expand Down
2 changes: 1 addition & 1 deletion Modules/Menu/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"php": ">=7.0.0",
"composer/installers": "~1.0",
"nwidart/laravel-menus": "~1.0",
"typicms/nestablecollection": "1.1"
"typicms/nestablecollection": "1.1.1"
},
"require-dev": {
"phpunit/phpunit": "~6.0",
Expand Down
24 changes: 0 additions & 24 deletions Modules/Translation/Resources/lang/core/es/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
'reset' => 'Reiniciar',
'update and back' => 'Actualizar y regresar',
],
'save' => 'Guardar',
'confirm' => 'Confirmar',
'move' => 'Mover',
'breadcrumb' => [
'home' => 'Inicio',
],
Expand All @@ -50,7 +47,6 @@
'available keyboard shortcuts' => 'Atajos de teclado disponibles en esta página',
'view website' => 'Ver sitio',
'complete your profile' => 'Complete su perfil',
'profile' => 'Perfil',
'sign out' => 'Salir',
],
'messages' => [
Expand All @@ -62,24 +58,4 @@
'back' => 'Atrás',
'back to index' => 'Regresar a :name',
'permission denied' => 'Permiso denegado. (permiso requerido: ":permission")',
'list resource' => 'Lista :name',
'create resource' => 'Crear :name',
'edit resource' => 'Editar :name',
'destroy resource' => 'Eliminar :name',
'error token mismatch' => 'Tu session se ha terminado, por favor envia el formulario nuevamente.',
'error 404' => '404',
'error 404 title' => 'Oops! Lo sentimos esta páginapágina no fue encontrada.',
'error 404 description' => 'La página que estas buscando no fue encontrada.',
'error 500' => '500',
'error 500 title' => 'Oops! Algo salió mal',
'error 500 description' => 'El Administrador ha sido notificado.',
'delete cancelled' => 'Eliminar cancelado.',
'unauthorized' => 'No autorizado',
'unauthorized-access' => 'No tienes los permisos apropiados para acceder a esa página.',
'unauthenticated' => 'No autenticado',
'unauthenticated-access' => 'Debes iniciar sesión para acceder a esta página',
'something went wrong' => 'Whoops! Algo salió mal.',
'mark as online' => 'Marcar como Activo',
'mark as offline' => 'Marcar como Inactivo',
'back to backend' => 'Regresar a la Administración',
];
1 change: 0 additions & 1 deletion Modules/Translation/Resources/lang/core/es/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

return [
'site-name' => 'Nombre del Sitio',
'site-name-mini' => 'Nombre del Sitio Minimizado',
'site-description' => 'Descripción del sitio',
'template' => 'Plantilla del sitio',
'google-analytics' => 'Código de Google Analytics',
Expand Down
1 change: 0 additions & 1 deletion Modules/Translation/Resources/lang/core/es/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

return [
'content' => 'Contenido',
'show group' => 'Mostrar Grupo barra lateral',
];
39 changes: 5 additions & 34 deletions Modules/Translation/Resources/lang/core/pl/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@
],
'tab' => [
'english' => 'Angielski',
'french' => 'Francuski',
'french' => 'Francusku',
'dutch' => 'Holenderski',
'italian' => 'Włoski',
'greek' => 'Grecki',
'spanish' => 'Hiszpański',
'polish' => 'Polski',
'portuguese' => 'Portugalski',
'arabic' => 'Arabski',
'macedonian' => 'Мacedoński',
'turkish' => 'Turecki',
'czech' => 'Czeski',
'swedish' => 'Szwedzki',
'korean' => 'Koreański',
'czech' => 'Czech',
'korean' => 'Korean',
],
'button' => [
'cancel' => 'Anuluj',
Expand All @@ -34,9 +29,6 @@
'reset' => 'Resetuj',
'update and back' => 'Aktualizuj i wróć',
],
'save' => 'Zapisz',
'confirm' => 'Zatwierdź',
'move' => 'Przenieś',
'breadcrumb' => [
'home' => 'Dom',
],
Expand All @@ -50,8 +42,7 @@
'available keyboard shortcuts' => 'Dostępne skróty klawiszowe na tej stronie',
'view website' => 'Zobacz stronę',
'complete your profile' => 'Uzupełnij swój profil',
'profile' => 'Profil',
'sign out' => 'Wyloguj się',
'sign out' => 'Wypisz się',
],
'messages' => [
'resource created' => ':name poprawnie utworzony.',
Expand All @@ -61,25 +52,5 @@
],
'back' => 'Powrót',
'back to index' => 'Powrót do :name',
'permission denied' => 'Brak uprawnień. (wymagane uprawnienie: ":permission")',
'list resource' => 'Wyświetlanie :name',
'create resource' => 'Tworzenie :name',
'edit resource' => 'Edycja :name',
'destroy resource' => 'Usuwanie :name',
'error token mismatch' => 'Twoja sesja wygasła, wyślij formularz ponownie.',
'error 404' => '404',
'error 404 title' => 'Oops! Nie ma takiej strony',
'error 404 description' => 'Strona, której szukasz, nie została znaleziona.',
'error 500' => '500',
'error 500 title' => 'Oops! Coś poszło nie tak',
'error 500 description' => 'Powiadomiliśmy o tym administratora.',
'delete cancelled' => 'Usuwanie anulowane',
'unauthorized' => 'Nieautoryzowany',
'unauthorized-access' => 'Nie masz wystarczających uprawnień aby zobaczyć tę stronę.',
'unauthenticated' => 'Nieuwierzytelniony',
'unauthenticated-access' => 'Musisz się zalogować aby zobaczyć tę stronę.',
'something went wrong' => 'Oops! Coś poszło nie tak.',
'mark as online' => 'Oznacz jako online',
'mark as offline' => 'Oznacz jako offline',
'back to backend' => 'Powrót do panelu',
'permission denied' => 'Brak dostępu. (wymagane pozwolenie: ":permission")',
];
5 changes: 2 additions & 3 deletions Modules/Translation/Resources/lang/core/pl/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

return [
'site-name' => 'Nazwa strony',
'site-name-mini' => 'Krótka nazwa strony',
'site-description' => 'Opis strony',
'template' => 'Szablon strony',
'analytics-script' => 'Skrypt Google Analytics',
'locales' => 'Język strony',
'google-analytics' => 'Kod Google Analytics',
'locales' => 'Lokalizacje strony',
];
1 change: 0 additions & 1 deletion Modules/Translation/Resources/lang/core/pl/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

return [
'content' => 'Zawartość',
'show group' => 'Pokaż grupę paska bocznego',
];
10 changes: 0 additions & 10 deletions Modules/Translation/Resources/lang/dashboard/es/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,4 @@
'add widget to dashboard' => 'Agregar widget al escritorio',
'reset not needed' => 'El escritorio no necesita restaurarse',
'dashboard reset' => 'El escritorio ha sido restaurado',
'list resource' => 'ver escritorio',
'edit resource' => 'Actualizar Escritorio',
'reset resource' => 'Reiniciar Escritorio',
'welcome-title' => 'Titulo de bienvenida',
'welcome-description' => 'Descripción de bienvenida',
'welcome-enabled' => 'Habilitar la caja de bienvenida?',
'configure your website' => 'Configurar tu sitio web',
'add pages' => 'Agregar página',
'add menus' => 'Agregar menus',
];

21 changes: 0 additions & 21 deletions Modules/Translation/Resources/lang/dashboard/pl/dashboard.php

This file was deleted.

11 changes: 0 additions & 11 deletions Modules/Translation/Resources/lang/media/es/folders.php

This file was deleted.

9 changes: 0 additions & 9 deletions Modules/Translation/Resources/lang/media/es/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,4 @@
'insert' => 'Insertar este archivo',
'file picker' => 'Selector de archivo',
'Browse' => 'Examinar...',
'upload file' => 'Subir un archivo',
'remove media' => 'Quitar Multiemdia',
'list resource' => 'Lista multimedia',
'create resource' => 'Crear multimedia',
'edit resource' => 'Editar multimedia',
'destroy resource' => 'Eliminar multimedia',
'file too large' => 'Archivo es muy pesado. debe ser menor a :size MB.',
'some files not moved' => 'Algunos archivos no fueron movidos.',
'files moved successfully' => 'archivos fueron movidos con éxito.',
];
3 changes: 0 additions & 3 deletions Modules/Translation/Resources/lang/media/es/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
return [
'file updated' => 'Archivo actualizado',
'file deleted' => 'Archivo eliminado',
'folder updated' => 'Carpeta actualizada',
'folder deleted' => 'Carpeta eliminada',
'selected items deleted' => 'Los Archivo(s) selecionados fueron eliminado',
];
11 changes: 0 additions & 11 deletions Modules/Translation/Resources/lang/media/pl/folders.php

This file was deleted.

44 changes: 0 additions & 44 deletions Modules/Translation/Resources/lang/media/pl/media.php

This file was deleted.

9 changes: 0 additions & 9 deletions Modules/Translation/Resources/lang/media/pl/messages.php

This file was deleted.

1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/de/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Hauptmenü (für das Frontend-Routing)',
'description' => 'Menu Description (Can be used to provide extra information)',
],
'navigation' => [
'back to index' => 'Zurück zur Übersicht',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/en/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Primary menu (used for front-end routing)',
'description' => 'Menu Description (Can be used to provide extra information)',
],
'navigation' => [
'back to index' => 'Go back to the menu index',
Expand Down
Loading

0 comments on commit 3fde5c0

Please sign in to comment.