From: Hamatoma Date: Wed, 10 Apr 2024 07:43:30 +0000 (+0200) Subject: 0.1.5 Phrases: Übersetzung X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=f60cfa03c7b0688f517ef739e66a65df16ddb7ae;p=gadeku.git 0.1.5 Phrases: Übersetzung - Phrases: - neues Attribut phrase_id: zeigt auf deutschen Satz - Übersetzungen in andere Sprachen - Words: Löschen nur wenn Admin - Falsche Id von "Deutsch (Deutschland)" bei sproperty scope "localization" --- diff --git a/CHANGELOG.md b/CHANGELOG.md index c9c0dfe..6bf25ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# V 0.1.5 Phrases: Übersetzung + +# Added: +- Phrases: + - neues Attribut phrase_id: zeigt auf deutschen Satz + - Übersetzungen in andere Sprachen +- Words: Löschen nur wenn Admin + +# Changed +- Falsche Id von "Deutsch (Deutschland)" bei sproperty scope "localization" + + # V 0.1.4 Korrekturen Verb # Changed diff --git a/app/Helpers/DbHelperLocal.php b/app/Helpers/DbHelperLocal.php new file mode 100644 index 0000000..c1cbc9d --- /dev/null +++ b/app/Helpers/DbHelperLocal.php @@ -0,0 +1,10 @@ +all(); if (count($fields) === 0) { $word = Word::find($noun->word_id); - $phrase = DB::select('select id, phrase from phrases where word_id=? and language_scope=1201', [$word->id])[0]; + $phrase = DB::select('select id, phrase from phrases where word_id=? and language_scope=1202', [$word->id])[0]; $plural = Word::find($noun->plural_id); $fields = [ 'noun' => $word->word, @@ -203,12 +203,12 @@ class NounController extends Controller 'wordtype_scope' => 2001, 'verifiedby_id' => null, 'owner_id' => auth()->id(), - 'language_scope' => 1201 + 'language_scope' => 1202 ]); $phrase = Phrase::create([ 'phrase' => $fields['usage'], 'word_id' => $word->id, - 'language_scope' => 1201, + 'language_scope' => 1202, 'owner_id' => auth()->id() ]); $plural = Word::create([ @@ -216,7 +216,7 @@ class NounController extends Controller 'wordtype_scope' => 2001, 'verifiedby_id' => null, 'owner_id' => auth()->id(), - 'language_scope' => 1201 + 'language_scope' => 1202 ]); Noun::create(['word_id' => $word->id, 'plural_id' => $plural->id, 'genus_scope' => $fields['genus_scope']]); } diff --git a/app/Http/Controllers/PhraseController.php b/app/Http/Controllers/PhraseController.php index c2e4174..3a01dd0 100644 --- a/app/Http/Controllers/PhraseController.php +++ b/app/Http/Controllers/PhraseController.php @@ -40,7 +40,7 @@ class PhraseController extends Controller $optionsPhrase = DbHelper::comboboxDataOfTable('words', 'name', 'id', $fields['phrase_id'], __('')); $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner_id'], __('')); $optionsVerifiedby = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['verifiedby_id'], __('')); - $context = new ContextLaraKnife($request, $fields); + $context = new ContextLaraKnife($request, $fields); $rc = view('phrase.create', [ 'context' => $context, 'optionsLanguage' => $optionsLanguage, @@ -48,7 +48,7 @@ class PhraseController extends Controller 'optionsPhrase' => $optionsPhrase, 'optionsOwner' => $optionsOwner, 'optionsVerifiedby' => $optionsVerifiedby, - ]); + ]); } return $rc; } @@ -61,30 +61,34 @@ class PhraseController extends Controller $rc = redirect('/phrase-index'); } else { $fields = $request->all(); - if (count($fields) === 0) { + if (count($fields) === 1){ $fields = [ 'phrase' => '', - 'language_scope' => '', - 'word_id' => '', - 'phrase_id' => '', - 'owner_id' => '', - 'verifiedby_id' => '' - ]; + 'language' => $request->language, + 'lastLanguage' => '', + 'translation' => '' + ]; + } elseif (count($fields) === 0) { + $fields = [ + 'phrase' => '', + 'language' => SProperty::idOfLocalization(), + 'lastLanguage' => '', + 'translation' => '' + ]; } - $optionsLanguage = SProperty::optionsByScope('language', $phrase->language_scope, ''); - $optionsWord = DbHelper::comboboxDataOfTable('words', 'name', 'id', $fields['word_id'], __('')); - $optionsPhrase = DbHelper::comboboxDataOfTable('words', 'name', 'id', $fields['phrase_id'], __('')); - $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner_id'], __('')); - $optionsVerifiedby = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['verifiedby_id'], __('')); - $context = new ContextLaraKnife($request, null, $phrase); + if ($fields['lastLanguage'] != $fields['language']){ + $phraseTranslation = Phrase::where(['language_scope' => $fields['language'], 'phrase_id' => $phrase->id])->first(); + if ($phraseTranslation != null){ + $fields['translation'] = $phraseTranslation->phrase; + } + } + $fields['lastLanguage'] = $fields['language']; + $optionsLanguage = SProperty::optionsByScope('localization', $fields['language'], ''); + $context = new ContextLaraKnife($request, $fields, $phrase); $rc = view('phrase.edit', [ 'context' => $context, 'optionsLanguage' => $optionsLanguage, - 'optionsWord' => $optionsWord, - 'optionsPhrase' => $optionsPhrase, - 'optionsOwner' => $optionsOwner, - 'optionsVerifiedby' => $optionsVerifiedby, - ]); + ]); } return $rc; } @@ -108,46 +112,36 @@ class PhraseController extends Controller } else { $sql = 'SELECT t0.*,' . 't1.name as language_scope, ' - . 't2.name as word_id, ' - . 't3.name as phrase_id, ' - . 't4.name as owner_id, ' - . 't5.name as verifiedby_id ' + . 't2.name as owner_id, ' + . 't3.name as verifiedby_id ' . ' FROM phrases t0' . ' LEFT JOIN sproperties t1 ON t1.id=t0.language_scope' - . ' LEFT JOIN sproperties t2 ON t2.id=t0.word_id' - . ' LEFT JOIN sproperties t3 ON t3.id=t0.phrase_id' - . ' LEFT JOIN sproperties t4 ON t4.id=t0.owner_id' - . ' LEFT JOIN sproperties t5 ON t5.id=t0.verifiedby_id' - ; + . ' LEFT JOIN sproperties t2 ON t2.id=t0.owner_id' + . ' LEFT JOIN sproperties t3 ON t3.id=t0.verifiedby_id' + ; $parameters = []; $fields = $request->all(); if (count($fields) == 0) { $fields = [ - 'language' => '', - 'word' => '', - 'phrase' => '', - 'owner' => '', - 'verifiedby' => '', - 'phrase' => '', - '_sortParams' => 'id:asc' - . ';phrase:desc' + 'language' => '', + 'word' => '', + 'phrase' => '', + 'owner' => '', + 'verifiedby' => '', + '_sortParams' => 't0.phrase:asc;t0.id:desc' ]; } else { $conditions = []; ViewHelper::addConditionComparism($conditions, $parameters, 'language_scope', 'language'); - ViewHelper::addConditionComparism($conditions, $parameters, 'word_id', 'word'); - ViewHelper::addConditionComparism($conditions, $parameters, 'phrase_id', 'phrase'); ViewHelper::addConditionComparism($conditions, $parameters, 'owner_id', 'owner'); ViewHelper::addConditionComparism($conditions, $parameters, 'verifiedby_id', 'verifiedby'); - ViewHelper::addConditionPattern($conditions, $parameters, 'phrase'); + ViewHelper::addConditionPattern($conditions, $parameters, 'phrase', 'text'); $sql = DbHelper::addConditions($sql, $conditions); } $sql = DbHelper::addOrderBy($sql, $fields['_sortParams']); $pagination = new Pagination($sql, $parameters, $fields); $records = $pagination->records; $optionsLanguage = SProperty::optionsByScope('language', $fields['language'], 'all'); - $optionsWord = DbHelper::comboboxDataOfTable('words', 'name', 'id', $fields['word'], __('')); - $optionsPhrase = DbHelper::comboboxDataOfTable('words', 'name', 'id', $fields['phrase'], __('')); $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner'], __('')); $optionsVerifiedby = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['verifiedby'], __('')); $context = new ContextLaraKnife($request, $fields); @@ -155,8 +149,6 @@ class PhraseController extends Controller 'context' => $context, 'records' => $records, 'optionsLanguage' => $optionsLanguage, - 'optionsWord' => $optionsWord, - 'optionsPhrase' => $optionsPhrase, 'optionsOwner' => $optionsOwner, 'optionsVerifiedby' => $optionsVerifiedby, 'pagination' => $pagination @@ -167,24 +159,23 @@ class PhraseController extends Controller * Returns the validation rules. * @return array The validation rules. */ - private function rules(bool $isCreate=false): array + private function rules(bool $isCreate = false): array { $rc = [ 'phrase' => 'required', - 'language_scope' => 'required', - 'word_id' => 'required', - 'phrase_id' => 'required', - 'owner_id' => 'required', - 'verifiedby_id' => 'required' + 'translation' => 'required', ]; + if ($isCreate){ + $rc['language'] = 'required'; + } return $rc; } public static function routes() { Route::get('/phrase-index', [PhraseController::class, 'index'])->middleware('auth'); Route::post('/phrase-index', [PhraseController::class, 'index'])->middleware('auth'); - Route::get('/phrase-create', [PhraseController::class, 'create'])->middleware('auth'); - Route::put('/phrase-store', [PhraseController::class, 'store'])->middleware('auth'); + //Route::get('/phrase-create', [PhraseController::class, 'create'])->middleware('auth'); + //Route::put('/phrase-store', [PhraseController::class, 'store'])->middleware('auth'); Route::post('/phrase-edit/{phrase}', [PhraseController::class, 'edit'])->middleware('auth'); Route::get('/phrase-edit/{phrase}', [PhraseController::class, 'edit'])->middleware('auth'); Route::post('/phrase-update/{phrase}', [PhraseController::class, 'update'])->middleware('auth'); @@ -199,21 +190,18 @@ class PhraseController extends Controller if ($request->btnSubmit === 'btnCancel') { $rc = redirect('/phrase-index')->middleware('auth'); } else { + $fields = $request->all(); $optionsLanguage = SProperty::optionsByScope('language', $phrase->language_scope, ''); - $optionsWord = DbHelper::comboboxDataOfTable('words', 'name', 'id', $fields['word_id'], __('')); - $optionsPhrase = DbHelper::comboboxDataOfTable('words', 'name', 'id', $fields['phrase_id'], __('')); $optionsOwner = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['owner_id'], __('')); $optionsVerifiedby = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['verifiedby_id'], __('')); $context = new ContextLaraKnife($request, null, $phrase); $rc = view('phrase.show', [ 'context' => $context, 'optionsLanguage' => $optionsLanguage, - 'optionsWord' => $optionsWord, - 'optionsPhrase' => $optionsPhrase, 'optionsOwner' => $optionsOwner, 'optionsVerifiedby' => $optionsVerifiedby, 'mode' => 'delete' - ]); + ]); } return $rc; } @@ -231,11 +219,12 @@ class PhraseController extends Controller $rc = back()->withErrors($validator)->withInput(); } else { $validated = $validator->validated(); - $validated['phrase'] = strip_tags($validated['phrase']); + $validated['phrase'] = strip_tags($validated['phrase']); + $validated['translation'] = strip_tags($validated['translation']); Phrase::create($validated); } } - if ($rc == null){ + if ($rc == null) { $rc = redirect('/phrase-index'); } return $rc; @@ -246,19 +235,50 @@ class PhraseController extends Controller public function update(Phrase $phrase, Request $request) { $rc = null; - if ($request->btnSubmit === 'btnStore') { + if ($request->btnSubmit === 'btnInternal'){ + // Language combobox has been changed: + $url = "/phrase-edit/$phrase->id?language=" . $request->language; + $rc = redirect($url); + } elseif ($request->btnSubmit === 'btnStore') { + $id = $phrase->id; $fields = $request->all(); $validator = Validator::make($fields, $this->rules(false)); if ($validator->fails()) { + $errors = $validator->errors(); $rc = back()->withErrors($validator)->withInput(); } else { $validated = $validator->validated(); $validated['phrase'] = strip_tags($validated['phrase']); - $phrase->update($validated); + $validated['translation'] = strip_tags($validated['translation']); + // Phrase has been changed? + $phraseDb = Phrase::find($id); + if ($phrase->phrase !== $phraseDb->phrase) { + // Invalidate all verifications: + DB::update("update phrases set validatedby_id=None where phrase_id=$id;"); + // Store new phrase: + $phrase->update(['phrase' => $validated['phrase'], 'verifiedby_id' => null]); + } + // Does translation already exists? + $phraseTranslation = Phrase::where(['language_scope' => $fields['language'], 'phrase_id' => $phrase->id])->first(); + if ($phraseTranslation == null) { + // Store the new record: + Phrase::create([ + 'phrase_id' => $id, + 'phrase' => $validated['translation'], + 'owner_id' => auth()->id(), + 'language_scope' => $fields['language'] + ]); + } else { + // Update only if changed: + if ($phraseTranslation->phrase !== $validated['translation']){ + $phraseTranslation->update(['phrase' => $validated['translation'], 'verifiedby_id' => null]); + } + } + $rc = redirect("/phrase-edit/$phrase->id?language=" . $fields['language']); } } - if ($rc == null){ - $rc = redirect('/phrase-index'); + if ($rc == null) { + $rc = redirect("/phrase-index"); } return $rc; } diff --git a/app/Http/Controllers/VerbController.php b/app/Http/Controllers/VerbController.php index 17539e8..77b3eef 100644 --- a/app/Http/Controllers/VerbController.php +++ b/app/Http/Controllers/VerbController.php @@ -69,7 +69,7 @@ class VerbController extends Controller if (count($fields) === 0) { ViewHelper::adaptCheckbox($fields, 'transitive'); $word = Word::find($verb->word_id); - $phrase = DB::select('select id, phrase from phrases where word_id=? and language_scope=1201', [$word->id])[0]; + $phrase = DB::select('select id, phrase from phrases where word_id=? and language_scope=1202', [$word->id])[0]; $fields = [ 'noun' => $word->word, 'word_id' => $verb->word_id, @@ -240,12 +240,12 @@ class VerbController extends Controller 'wordtype_scope' => 2002, 'verifiedby_id' => null, 'owner_id' => auth()->id(), - 'language_scope' => 1201 + 'language_scope' => 1202 ]); $phrase = Phrase::create([ 'phrase' => $fields['usage'], 'word_id' => $word->id, - 'language_scope' => 1201, + 'language_scope' => 1202, 'owner_id' => auth()->id() ]); $validated['word_id'] = $word->id; diff --git a/app/Models/Phrase.php b/app/Models/Phrase.php index a89e81e..da77f90 100644 --- a/app/Models/Phrase.php +++ b/app/Models/Phrase.php @@ -16,6 +16,7 @@ class Phrase extends Model 'phrase', 'language_scope', 'word_id', + 'phrase_id', 'baselanguage_id', 'owner_id', 'verifiedby_id' diff --git a/composer.lock b/composer.lock index 4565f1b..71b1ec6 100644 --- a/composer.lock +++ b/composer.lock @@ -1082,16 +1082,16 @@ }, { "name": "laravel/framework", - "version": "v11.2.0", + "version": "v11.3.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "a1750156b671f37cba702380107e2d22161c31e3" + "reference": "cbcb0ee3da8c5f98497d9a282609732251a7dd1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/a1750156b671f37cba702380107e2d22161c31e3", - "reference": "a1750156b671f37cba702380107e2d22161c31e3", + "url": "https://api.github.com/repos/laravel/framework/zipball/cbcb0ee3da8c5f98497d9a282609732251a7dd1e", + "reference": "cbcb0ee3da8c5f98497d9a282609732251a7dd1e", "shasum": "" }, "require": { @@ -1283,20 +1283,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-04-02T14:01:33+00:00" + "time": "2024-04-09T15:19:11+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.17", + "version": "v0.1.18", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5" + "reference": "3b5e6b03f1f1175574b5a32331d99c9819da9848" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", - "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", + "url": "https://api.github.com/repos/laravel/prompts/zipball/3b5e6b03f1f1175574b5a32331d99c9819da9848", + "reference": "3b5e6b03f1f1175574b5a32331d99c9819da9848", "shasum": "" }, "require": { @@ -1338,9 +1338,9 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.17" + "source": "https://github.com/laravel/prompts/tree/v0.1.18" }, - "time": "2024-03-13T16:05:43+00:00" + "time": "2024-04-04T17:41:50+00:00" }, { "name": "laravel/serializable-closure", @@ -1721,16 +1721,16 @@ }, { "name": "league/flysystem", - "version": "3.26.0", + "version": "3.27.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "072735c56cc0da00e10716dd90d5a7f7b40b36be" + "reference": "4729745b1ab737908c7d055148c9a6b3e959832f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/072735c56cc0da00e10716dd90d5a7f7b40b36be", - "reference": "072735c56cc0da00e10716dd90d5a7f7b40b36be", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4729745b1ab737908c7d055148c9a6b3e959832f", + "reference": "4729745b1ab737908c7d055148c9a6b3e959832f", "shasum": "" }, "require": { @@ -1795,7 +1795,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.26.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.27.0" }, "funding": [ { @@ -1807,7 +1807,7 @@ "type": "github" } ], - "time": "2024-03-25T11:49:53+00:00" + "time": "2024-04-07T19:17:50+00:00" }, { "name": "league/flysystem-local", diff --git a/database/migrations/2024_04_09_190303_add_phrases_phrase_id.php b/database/migrations/2024_04_09_190303_add_phrases_phrase_id.php new file mode 100644 index 0000000..b5df4d3 --- /dev/null +++ b/database/migrations/2024_04_09_190303_add_phrases_phrase_id.php @@ -0,0 +1,26 @@ +foreignId('phrase_id')->nullable()->references('id')->on('phrases'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +}; diff --git a/lang/de_DE.json b/lang/de_DE.json index 2c4b024..11e4e36 100644 --- a/lang/de_DE.json +++ b/lang/de_DE.json @@ -18,6 +18,7 @@ "Change of a Menu Item": "\u00c4ndern einer Men\u00fceintrags", "Change of a Note": "\u00c4ndern einer Notiz", "Change of a Noun": "\u00c4nderung eines Nomens", + "Change of a Phrase": "\u00c4nderung eines Satzes", "Change of a Role": "\u00c4ndern einer Rolle", "Change of a Scoped Property": "\u00c4ndern einer bereichsbasierten Eigenschaft", "Change of a Term": "\u00c4ndern eines Termins", @@ -42,6 +43,7 @@ "Deletion of a Noun": "L\u00f6schen eines Nomens", "Deletion of a Scoped Property": "L\u00f6schen einer bereichsbasierten Eigenschaft", "Deletion of a Verb": "L\u00f6schen eines Verbs", + "Deletion of a Word": "L\u00f6schen eines Wortes", "Deletion of an User": "L\u00f6schen eines Benutzers", "Description": "Beschreibung", "Displaying an User": "Anzeige eines Benutzers", @@ -67,6 +69,7 @@ "Insert Position": "Einf\u00fcgeposition", "Italian (Italy)": "Italienisch (Italien)", "Label": "Beschriftung", + "Language": "Sprache", "Lines per Page": "Zeilen je Seite", "Link": "Verweis", "Localization": "Lokalisierung", @@ -85,6 +88,8 @@ "Participle": "Partizip", "Password": "Passwort", "Password forgotten?": "Passwort vergessen?", + "Phrase": "Satz", + "Phrases": "S\u00e4tze", "Please use the following link and change your password:": "Bitte benutze den folgenden Verweis und \u00e4ndere dein Passwort", "Preposition": "Pr\u00e4position", "Privacy": "Datenschutz", @@ -116,6 +121,7 @@ "Title": "Titel", "To": "Bis", "Total": "Gesamt", + "Translation": "\u00dcbersetzung", "Usage": "Verwendung", "User": "Benutzer", "Users": "Benutzer", diff --git a/resources/lang/sources/gadeku.de.json b/resources/lang/sources/gadeku.de.json index d3398be..2a3f002 100644 --- a/resources/lang/sources/gadeku.de.json +++ b/resources/lang/sources/gadeku.de.json @@ -2,11 +2,13 @@ "!comment": "Bitte alphabetisch sortiert eintragen!", "Adjective": "Adjektiv", "Change of a Noun": "Änderung eines Nomens", +"Change of a Phrase": "Änderung eines Satzes", "Change of a Verb": "Änderung eines Verbs", "Change of a Word": "Änderung eines Wortes", "Creation of a Verb": "Neues Verb", "Deletion of a Noun": "Löschen eines Nomens", "Deletion of a Verb": "Löschen eines Verbs", +"Deletion of a Word": "Löschen eines Wortes", "feminine": "Femininum", "Genus": "Geschlecht", "Imperfect": "Imperfekt", @@ -15,7 +17,10 @@ "Noun": "Nomen", "Nouns": "Nomen", "Participle": "Partizip", +"Phrase": "Satz", +"Phrases": "Sätze", "Preposition": "Präposition", +"Translation": "Übersetzung", "Verb": "Verb", "Verbs": "Verben", "Word": "Wort", diff --git a/resources/views/phrase/edit.blade.php b/resources/views/phrase/edit.blade.php index 4cb55ce..12698f2 100644 --- a/resources/views/phrase/edit.blade.php +++ b/resources/views/phrase/edit.blade.php @@ -3,14 +3,11 @@ @section('content')
@csrf + - - - - - - - + + +
@endsection diff --git a/resources/views/phrase/index.blade.php b/resources/views/phrase/index.blade.php index 2780076..5d1cd88 100644 --- a/resources/views/phrase/index.blade.php +++ b/resources/views/phrase/index.blade.php @@ -5,22 +5,17 @@ @csrf - - - - - - + + + + - {{__('Phrase')}} {{__('Language')}} - {{__('Word')}} - {{__('Phrase')}} {{__('Owner')}} {{__('Verifiedby')}} @@ -30,10 +25,8 @@ @foreach ($records as $phrase) - {{ __($phrase->language_scope) }} {{$phrase->phrase}} - {{$phrase->word_id}} - {{$phrase->phrase_id}} + {{ __($phrase->language_scope) }} {{$phrase->owner_id}} {{$phrase->verifiedby_id}} diff --git a/resources/views/word/index.blade.php b/resources/views/word/index.blade.php index 6483cd0..e8b01a4 100644 --- a/resources/views/word/index.blade.php +++ b/resources/views/word/index.blade.php @@ -22,7 +22,9 @@ {{ __('Wordtype') }} {{ __('Verifiedby') }} {{ __('Owner') }} + @if ($context->isAdmin()) + @endif @@ -33,7 +35,9 @@ {{ __($word->wordtype) }} {{ $word->verifiedby }} {{ $word->owner }} + @if ($context->isAdmin()) + @endif @endforeach diff --git a/resources/views/word/show.blade.php b/resources/views/word/show.blade.php index 0b7f5e9..deadfee 100644 --- a/resources/views/word/show.blade.php +++ b/resources/views/word/show.blade.php @@ -7,9 +7,8 @@ @method('DELETE') @endif - + -