Skip to content

Commit

Permalink
Merge pull request #519 from navalkishore30/3.0
Browse files Browse the repository at this point in the history
Description field added for extra convenience.
  • Loading branch information
nWidart authored Apr 19, 2018
2 parents 07f036e + 9a29f51 commit b19cafd
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 1 deletion.
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');
});
}
}
1 change: 1 addition & 0 deletions Modules/Menu/Entities/Menuitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
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' => 'Menü Beschreibung (Kann für zusätzliche Informationen verwendet werden)',
],
'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
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/es/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Menú principal (usado para rutas del sitio)',
'description' => 'Descripción del menú (Se puede usar para proporcionar información adicional)',
],
'navigation' => [
'back to index' => 'Regresar',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/fr/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Menu principal (utilisé pour le routage frontal)',
'description' => 'Description du menu (peut être utilisé pour fournir des informations supplémentaires)',
],
'navigation' => [
'back to index' => 'Retour vers l\'index des menus',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/it/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Menu primario (usato per il routing front-end)',
'description' => 'Descrizione del menu (può essere usato per fornire informazioni extra)',
],
'navigation' => [
'back to index' => 'Indietro all\'indice dei menu',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/ko/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => '주 메뉴 (프론트엔드 라우팅에 사용됨)',
'description' => '메뉴 설명 (추가 정보를 제공하는 데 사용할 수 있음)',
],
'navigation' => [
'back to index' => '메뉴 목록으로 돌아가기',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/nl/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Primair menu (gebruikt voor front-end routing)',
'description' => 'Menu Beschrijving (kan worden gebruikt om extra informatie te geven)',
],
'navigation' => [
'back to index' => 'Ga terug naar het menu overzicht',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/pl/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Menu główne (używane jako nawigacja na stronie głównej)',
'description' => 'Opis menu (może być wykorzystany do dostarczenia dodatkowych informacji)',
],
'navigation' => [
'back to index' => 'Powrót do zarządzania menu',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/pt/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Menu principal (usado para as rotas do site)',
'description' => 'Menu Descrição (pode ser usado para fornecer informações extras)',
],
'navigation' => [
'back to index' => 'Voltar para a listagem',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/ru/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Начальное меню (используется для маршрутизации внешнего интерфейса)',
'description' => 'Описание меню (может использоваться для предоставления дополнительной информации)',
],
'navigation' => [
'back to index' => 'Вернуться к списку меню',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/tr/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => 'Birincil menü (frond-end yönlendirmesi için kullanılır)',
'description' => 'Menü Açıklama (Ek bilgi sağlamak için kullanılabilir)',
],
'navigation' => [
'back to index' => 'Menüye geri dön',
Expand Down
1 change: 1 addition & 0 deletions Modules/Translation/Resources/lang/menu/zh/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'uri' => 'URI',
'url' => 'URL',
'primary' => '主菜单 (用于前台导航)',
'description' => '菜单说明(可用于提供额外的信息)',
],
'navigation' => [
'back to index' => '返回菜单首页',
Expand Down
Binary file modified Themes/Adminlte/assets/img/blur-background04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Themes/Adminlte/assets/img/blur-background08.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Themes/Adminlte/assets/img/blur-background09.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.

0 comments on commit b19cafd

Please sign in to comment.