]> gitweb.hamatoma.de Git - gadeku.git/commitdiff
V 0.3.3 Aufgaben mittels Note/Task, Email bei Note, Farben
authorHamatoma <author@hamatoma.de>
Sun, 12 May 2024 11:18:03 +0000 (13:18 +0200)
committerHamatoma <author@hamatoma.de>
Sun, 12 May 2024 11:18:03 +0000 (13:18 +0200)
- neu: TaskHelper
- TextProcessor: neu compressSnakeText()
- Note: neues Registerblatt "Aufgabe"
- neues Farbschema Orange

17 files changed:
CHANGELOG.md
app/Helpers/TaskHelper.php [new file with mode: 0644]
app/Helpers/TextProcessor.php
app/Helpers/ViewHelperLocal.php
app/Http/Controllers/PageController.php
app/Http/Controllers/TaskController.php [new file with mode: 0644]
app/Mail/NoteNotification.php [new symlink]
composer.lock
lang/de_DE.json
public/css/gadeku.css
resources/lang/sources/gadeku.de.json
resources/views/layouts/backend.blade.php
resources/views/layouts/frontend.blade.php
resources/views/mails/note-notification.blade.php [new symlink]
resources/views/page/index.blade.php
resources/views/task/create.blade.php [new file with mode: 0644]
resources/views/task/edit_snake.blade.php [new file with mode: 0644]

index 230badf72265f9f4d627e0b3d014f65eb2868fc6..0d4da28718756ff60c7edbfa2897cd47595ac455 100644 (file)
@@ -1,3 +1,12 @@
+# V 0.3.3 Aufgaben mittels Note/Task, Email bei Note, Farben
+
+## Added
+- neu: TaskHelper
+- TextProcessor: neu compressSnakeText()
+- Note: neues Registerblatt "Aufgabe"
+- neues Farbschema Orange
+
+
 # V 0.3.2 Phrase Word
 
 ## Added
diff --git a/app/Helpers/TaskHelper.php b/app/Helpers/TaskHelper.php
new file mode 100644 (file)
index 0000000..2c21cbc
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+namespace App\Helpers;
+
+class TaskHelper
+{
+    public static function contextHelper(string $task, string $parameter): string
+    {
+        $rc = '';
+        switch ($task) {
+            case 'page-index-icon':
+                $rc = "<a href=\"/task-create?page_id=$parameter\"><i class=\"bi bi-list-task text-primary\"></i></a>";
+                break;
+            default:
+                break;
+        }
+        return $rc;
+    }
+    public function buildButtonTask()
+    {
+
+    }
+}
\ No newline at end of file
index f7478a53616cba005688e81e41335f66d10e0fd7..fe634ec29e9e14e5e0d6600488812cbe0ab9160d 100644 (file)
@@ -3,6 +3,12 @@ namespace App\Helpers;
 
 class TextProcessor
 {
+    public static function compressSnakeText(?string $text): string
+    {
+        $text = preg_replace('/[,.\s]+/', '', $text ?? '');
+        $text = strtolower($text);
+        return $text;
+    }
     public static function expandStarItems(string $text): string
     {
         $rc = preg_replace(
index 676a97d46dfaf84f3ee882015d54c6d1bbf0b450..14a95ea6e16e7cf3c3c54a2f36ccb70c6036d5f8 100644 (file)
@@ -27,11 +27,19 @@ class ViewHelperLocal
         $rc = null;
         switch ($name) {
             case 'note-edit':
-                $rc = new NavigationTabs([
+                $list = [
                     "Properties;/note-edit/$referenceId",
                     "Documents;/note-index_documents/$referenceId",
                     "Shift;/note-edit_shift/$referenceId",
-                ], $indexActive);
+                ];
+                if (strpos($options, 'task=1302') !== false){
+                    $match = null;
+                    if (preg_match('/ref-page=(\d+)/', $options, $match)){
+                        $pageId = $match[1];
+                        array_push($list, "Task;/task-edit_snake/$referenceId/$pageId");
+                    }
+                }
+                $rc = new NavigationTabs($list, $indexActive);
                 break;
             case 'word-edit':
                 $header = StringHelper::toCapital($options);
index ab56936dec19fb6cdfdd3e68c5f06c6b254fc7d5..fc0dfbf785bb5b1f727d6d71dbe76636e9c0e3f2 100644 (file)
@@ -25,21 +25,8 @@ class PageController extends Controller
     private function asHtml(Page &$page, ?string $contents = null): string
     {
         $contents ??= $page->contents;
-        $type = $page->markup_scope;
-        switch ($type) {
-            case 1122: // mediawiki
-                $wiki = new MediaWiki();
-                $text = $wiki->toHtml($contents);
-                break;
-            case 1223: // html
-                $text = $contents;
-                break;
-            default:
-            case 1121: // plain text
-                $text = '<p>' . str_replace('/\r?\n/', "</p>\n<p>", $contents) . "</p>";
-                break;
-        }
-        return $text;
+        $rc = ViewHelper::asHtml($contents, $page->markup_scope);
+        return $rc;
     }
     /**
      * Show the form for creating a new resource.
@@ -115,7 +102,7 @@ class PageController extends Controller
             $optionsMarkup = SProperty::optionsByScope('markup', $page->markup_scope, '');
             $optionsLanguage = SProperty::optionsByScope('localization', $page->language_scope, '');
             $fields = $request->btnSubmit !== 'btnPreview' ? null : ['preview' => $this->asHtml($page)];
-            if ($page->audio_id != null){
+            if ($page->audio_id != null) {
                 $file = File::find($page->audio_id);
                 $fields['audio'] = $file->filename;
             }
@@ -265,39 +252,47 @@ LEFT JOIN sproperties t4 ON t4.id=t0.owner_id
             $view = 'page.show-col1';
             $audio = $page->audio_id == null ? null : File::relativeFileLink($page->audio_id);
             $params = ['audio' => $audio];
-            if ($page->pagetype_scope != 2031/* chapter */) {
-                $columns = 1 + substr_count($textRaw, "\n---- %col%");
-                if ($columns <= 1) {
-                    $params["text1"] = $this->asHtml($page);
-                } else {
-                    $wiki = new MediaWiki();
-                    $parts = explode("\n---- %col%", $textRaw, 4);
-                    for ($no = 1; $no <= $columns; $no++) {
-                        $params["text$no"] = $wiki->toHtml($parts[$no - 1]);
+            switch ($page->pagetype_scope) {
+
+                case 2035/* snaketext */:
+                    $text = TextProcessor::compressSnakeText($page->contents);
+                    $params['text1'] = $this->asHtml($page, $text);
+                    break;
+                case 2031/* chapter */ :
+                    /* Chapter: */
+                    $text1 = $this->asHtml($page);
+                    $params['text1'] = $text1;
+                    $text2 = null;
+                    $lang = SProperty::idOfLocalization(auth()->user()->localization);
+                    if (($page2 = Page::where(['reference_id' => $page->id, 'language_scope' => $lang])->first()) != null) {
+                        $text2 = $this->asHtml($page2);
                     }
-                    $view = "page.show-col$columns";
-                }
-            } else {
-                /* Chapter: */
-                $text1 = $this->asHtml($page);
-                $params['text1'] = $text1;
-                $text2 = null;
-                $lang = SProperty::idOfLocalization(auth()->user()->localization);
-                if (($page2 = Page::where(['reference_id' => $page->id, 'language_scope' => $lang])->first()) != null) {
-                    $text2 = $this->asHtml($page2);
-                }
-                if ($text2 != null) {
-                    $params['text2'] = $text2;
-                    $view = 'page.translation-col2';
-                }
+                    if ($text2 != null) {
+                        $params['text2'] = $text2;
+                        $view = 'page.translation-col2';
+                    }
+                    break;
+                default:
+                    $columns = 1 + substr_count($textRaw, "\n---- %col%");
+                    if ($columns <= 1) {
+                        $params["text1"] = $this->asHtml($page);
+                    } else {
+                        $wiki = new MediaWiki();
+                        $parts = explode("\n---- %col%", $textRaw, 4);
+                        for ($no = 1; $no <= $columns; $no++) {
+                            $params["text$no"] = $wiki->toHtml($parts[$no - 1]);
+                        }
+                        $view = "page.show-col$columns";
+                    }
+                    break;
             }
-            if ($page->previous_id != null){
+            if ($page->previous_id != null) {
                 $params['prev'] = "/page-showpretty/$page->previous_id";
             }
-           if ($page->next_id != null){
+            if ($page->next_id != null) {
                 $params['next'] = "/page-showpretty/$page->next_id";
             }
-           if ($page->up_id != null){
+            if ($page->up_id != null) {
                 $params['up'] = "/page-showpretty/$page->up_id";
             }
             $context = new ContextLaraKnife($request, $params, $page);
@@ -367,19 +362,19 @@ LEFT JOIN sproperties t4 ON t4.id=t0.owner_id
     public function update(Page $page, Request $request, array &$fields)
     {
         $rules = $this->rules(false);
-        if ($fields['order'] == null){
+        if ($fields['order'] == null) {
             $fields['order'] = 0;
         }
-        if ($fields['reference_id'] != null){
+        if ($fields['reference_id'] != null) {
             $rules['reference_id'] = 'exists:pages,id';
         }
-        if ($fields['previous_id'] != null){
+        if ($fields['previous_id'] != null) {
             $rules['previous_id'] = 'exists:pages,id';
         }
-        if ($fields['up_id'] != null){
+        if ($fields['up_id'] != null) {
             $rules['up_id'] = 'exists:pages,id';
         }
-        if ($fields['next_id'] != null){
+        if ($fields['next_id'] != null) {
             $rules['next_id'] = 'exists:pages,id';
         }
         $validator = Validator::make($fields, $rules);
diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php
new file mode 100644 (file)
index 0000000..b1dc546
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Helpers\TextProcessor;
+use App\Models\File;
+use App\Models\Note;
+use App\Models\Page;
+use App\Models\Group;
+use App\Models\Module;
+use App\Helpers\Helper;
+use App\Helpers\DbHelper;
+use App\Models\SProperty;
+use App\Helpers\FileHelper;
+use App\Helpers\Pagination;
+use App\Helpers\ViewHelper;
+use Illuminate\Http\Request;
+use App\Helpers\ViewHelperLocal;
+use App\Helpers\ContextLaraKnife;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Route;
+use Illuminate\Support\Facades\Validator;
+
+class TaskController extends Controller
+{
+    protected $noteId = null;
+    protected $pageId = null;
+    public static function generate(int $noteId, int $pageId = null)
+    {
+        $rc = new TaskController();
+
+        $rc->noteId = $noteId;
+        $rc->pageId = $pageId;
+        return $rc;
+    }
+    public function create(Request $request)
+    {
+        $rc = null;
+        if ($request->btnSubmit === 'btnCancel') {
+            $rc = redirect('/note-index');
+        } else {
+            $fields = $request->all();
+            $pageId = array_key_exists('page_id', $fields) ? $fields['page_id'] : null;
+            if (count($fields) <= 1) {
+                $fields = [
+                    'title' => '',
+                    'body' => '',
+                    'category_scope' => '1054',
+                    'visibility_scope' => '1091',
+                    'owner_id' => strval(auth()->id()),
+                    'task' => ''
+                ];
+            }
+            if ($pageId != null) {
+                $page = Page::find(intval($pageId));
+                if ($page != null) {
+                    $fields['title'] = __('Task') . ": $page->title";
+                    $fields['options'] = "ref-page=$page->id";
+                }
+            }
+            if ($request->btnSubmit === 'btnStore') {
+                $validator = Validator::make($fields, ['title' => 'required', 'task' => 'required']);
+                if ($validator->fails()) {
+                    $rc = back()->withErrors($validator)->withInput();
+                } else {
+                    $fields['notestatus_scope'] = 1011;
+                    $fields['options'] .= "\ntask=" . $fields['task'];
+                    $fields['owner_id'] = auth()->id();
+                    $task = Note::create($fields);
+                    $rc = redirect("/note-edit/$task->id");
+                }
+            }
+            if ($rc == null) {
+                $optionsVisibility = SProperty::optionsByScope('visibility', $fields['visibility_scope']);
+                $optionsTask = SProperty::optionsByScope('task', $fields['task'], '-');
+                $optionsCategory = SProperty::optionsByScope('category', $fields['category_scope']);
+                $context = new ContextLaraKnife($request, $fields);
+                $rc = view('task.create', [
+                    'context' => $context,
+                    'optionsVisibility' => $optionsVisibility,
+                    'optionsTask' => $optionsTask,
+                    'optionsCategory' => $optionsCategory,
+                ]);
+            }
+        }
+        return $rc;
+    }
+    public function editSnake(Note $note, Page $page, Request $request)
+    {
+        if ($request->btnSubmit === 'btnCancel') {
+            $rc = redirect('/page-index');
+        } else {
+            $fields = $request->all();
+            if (count($fields) <= 1) {
+                $fields['snaketext'] = TextProcessor::compressSnakeText($page->body);
+                $fields['solution'] = $note->body != null && $note->body !== '' ? $note->body : $fields['snaketext'];
+                if ($page != null && $note != null) {
+                    $fields['pageId'] = $page->id;
+                }
+            }
+            if ($request->btnSubmit === 'btnStore') {
+                $note->update(['body' => $fields['solution']]);
+            }
+            $navigationTabInfo = ViewHelperLocal::getNavigationTabInfo('note-edit', 3, $note->id, $note->options);
+            $context = new ContextLaraKnife($request, $fields, $note);
+            $context->model2 = $page;
+            $rc = view('task.edit_snake', [
+                'context' => $context,
+                'navTabsInfo' => $navigationTabInfo
+            ]);
+        }
+        return $rc;
+
+    }
+
+    public static function routes()
+    {
+        Route::get('/task-create', [TaskController::class, 'create'])->middleware('auth');
+        Route::post('/task-create', [TaskController::class, 'create'])->middleware('auth');
+        Route::get('/task-edit_snake/{note}/{page}', [TaskController::class, 'editSnake'])->middleware('auth');
+        Route::post('/task-edit_snake/{note}/{page}', [TaskController::class, 'editSnake'])->middleware('auth');
+    }
+
+}
+
diff --git a/app/Mail/NoteNotification.php b/app/Mail/NoteNotification.php
new file mode 120000 (symlink)
index 0000000..55a14c6
--- /dev/null
@@ -0,0 +1 @@
+../../vendor/hamatoma/laraknife/resources/mail/NoteNotification.php
\ No newline at end of file
index ec2ed4783e3465ead1cea720c6e7cdef440af790..c55e14db0837d07320fcab52094f194318f43cbe 100644 (file)
             "dist": {
                 "type": "path",
                 "url": "../laraknife",
-                "reference": "51702fba5a786ac71dd1628e7aee3aae747d6003"
+                "reference": "25dda6c582df04ebf4ed061d2311d3612001e5fb"
             },
             "require-dev": {
                 "phpunit/phpunit": "11.0.x-dev"
index 70e0066f1fa8ad227adb401f01b7c8dae20ff6fe..fe32dfb3779938a31e3b27b5397972a5b6b5aebe 100644 (file)
@@ -44,6 +44,7 @@
     "Creation of a Page": "Erstellen einer Seite",
     "Creation of a Role": "Erstellen eine Rolle",
     "Creation of a Scoped Property": "Erzeugen einer bereichsbasierten Eigenschaft",
+    "Creation of a Task": "Erstellen einer Aufgabe",
     "Creation of a Term": "Erstellen eines Termins",
     "Creation of a Word": "Neues Wort",
     "Creation of an User": "Erstellen eines Benutzers",
@@ -79,7 +80,6 @@
     "Groups": "Gruppen",
     "Hello": "Hallo",
     "Id": "Id",
-    "Imperfect": "Imperfekt",
     "Imprint": "Impressum",
     "Info": "Info",
     "Insert Position": "Einf\u00fcgeposition",
     "Participle": "Partizip",
     "Password": "Passwort",
     "Password forgotten?": "Passwort vergessen?",
+    "Past tense": "Pr\u00e4teritum",
     "Phrase": "Satz",
     "Phrases": "S\u00e4tze",
     "Please use the following link and change your password:": "Bitte benutze den folgenden Verweis und \u00e4ndere dein Passwort",
     "Shift": "Verschiebung",
     "Shortname": "Kurzname",
     "Size (MByte)": "Gr\u00f6\u00dfe (MByte)",
+    "Snaketext": "Schlangentext",
+    "Solution": "L\u00f6sung",
     "Someone has requested a password reset.": "Jemand hat das Zur\u00fccksetzen des Passworts angefordert.",
     "Start Menu": "Startmen\u00fc",
     "Status": "Status",
     "Store": "Speichern",
     "Store Menu": "Men\u00fc speichern",
     "Superlative": "Superlativ",
+    "Task": "Aufgabe",
     "Term": "Termin",
     "Terms": "Termine",
     "Text": "Text",
     "active": "aktiv",
     "chapter": "Kapitel",
     "closed": "geschlossen",
+    "cloze": "L\u00fcckentext",
     "cloze text": "L\u00fcckentext",
+    "description": "Beschreibung",
     "feminine": "Femininum",
     "free text": "Freier Text",
     "grammar rules": "Grammatikregeln",
     "section": "Bereich",
     "snaketext": "Schlangentext",
     "standard": "Standard",
+    "task": "Aufgabe",
     "work": "Arbeit"
 }
\ No newline at end of file
index f271512fb271dbe6305fa614ad5b5aa9af7b3009..4e3de34f82f49ad0ad6863692870685a92846e8d 100644 (file)
@@ -25,14 +25,114 @@ input, button {
     padding: 0.25rem;
     color: white;
     text-align: center;
-    background-color: blue;
-    border-bottom: solid 0.1rem blue;
+    background-color: #fdaf40;
+    border-bottom: solid 0.1rem #ffac03;;
     border-radius: 0.25rem;
 }
 .lkn-text h2, .lkn-text h3{
     /* color: rgb(213, 78, 29); */
-    color: blue;
-    border-bottom: solid 0.1rem blue;
+    color: #fdaf40;
+    border-bottom: solid 0.1rem #fdaf40;
+}
 .lkn-text h4, .lkn-text h5{
+    color: #d86d0c;
+}
+#lkn-header {    background-color: #4cb2be;    color: white;}
+.lkn-text-frame-background{ background-color: #fdaf40 !important }
+.lkn-noform-frame,
+.lkn-standard-panel,
+.lkn-edit-panel,
+.lkn-create-panel,
+.lkn-show-panel,
+.lkn-panel,
+.lkn-nav-tab-panel,
+#main-content li.lkn-nav-item-active,
+.lkn-filter,
+.lkn-fieldset,
+.lkn-form-table,
+.lkn-filter,
+.lkn-fieldset,
+.lkn-form-table,
+.lkn-text-frame,
+.lkn-header-frame,
+.lkn-pagination-block
+{
+    background-color: #fdaf4030;
+}
+.lkn-page-item.active .lkn-page-link {
+    background-color: #ffac03;
+    border-color: #ffac03;
+}
+.lkn-field-error {
+    color: red;
+}
+a.lnk-overview-cell,
+a:visited.lkn-overview-cell,
+a:link.lkn-overview-cell,
+a:active.lkn-overview-cell {
+    border: 1px solid #ffac03;
+    color: #ffac03;;
+    box-shadow: 0 0 5px 0 #ffac03;
+}
+a.lkn-overview-cell,
+a:visited.lkn-overview-cell,
+a:link.lkn-overview-cell,
+a:active.lkn-overview-cell {
+    background-color: #EEE;
+    color: #ffac03;
+}
+#main-content .nav-item {
+    background-color: #EEE;
+}
+.lkn-text-info {
+    color: #ffac03;
+}
+.lkn-text-info2 {
+    color: green;
+}
+.lkn-text-info3 {
     color: blue;
-}
\ No newline at end of file
+}
+.lkn-text-info4 {
+    color: cyan;
+}
+.lkn-text-error {
+    color: red;
+    background-color: yellow;
+}
+.lkn-text-warning {
+    color: green;
+    background-color: yellow;
+}
+.lkn-text-important {
+    color: red;
+}
+.lkn-text-tagged {
+    background-color: rgba(255, 166, 0, 0.418);
+}
+.lkn-text-tagged2 {
+    background-color: yellow;
+}
+.lkn-header-frame h1, .text-header-frame h2, .text-header-frame h3 {
+    color: whitesmoke;
+    background-color: #fdaf40;
+}
+.lkn-ins {
+    background-color: lightblue;
+}
+.lkn-del {
+    background-color: rgba(255, 166, 0, 0.418);
+}
+button.bg-primary {
+  background-color: #fdaf40 !important;  
+}
+a, a:active.nav-item, a:link.nav-item, a:visited.nav-item, a:any-link.nav-item { color: #fdaf40; }
+.bi {
+    color: #fdaf40 !important;
+}
+nav a:active, nav a:link, nav a:visited, nav a:any-link {
+    color: white;
+}
+.page-link { color: black !important; background-color: #fdaf4030;; }
+.page-link.active, .active > .page-link { background-color: #fdaf40; }
+.page-item { color: black; background-color: #EEE; }
\ No newline at end of file
index 80cbedd2ebbb7c03ecd3d6dad79bdda11786ef83..1ef245873c07895fd632f299ca9e1c0988a29f4c 100644 (file)
@@ -9,6 +9,7 @@
 "chapter": "Kapitel",
 "Chapter": "Kapitel",
 "Chapters": "Kapitel",
+"cloze": "Lückentext",
 "cloze text": "Lückentext",
 "Comparative": "Komparativ",
 "Contents": "Inhalt",
@@ -30,6 +31,8 @@
 "Phrases": "Sätze",
 "Preposition": "Präposition",
 "snaketext": "Schlangentext",
+"Snaketext": "Schlangentext",
+"Solution": "Lösung",
 "Superlative": "Superlativ",
 "Translation": "Übersetzung",
 "Verb": "Verb",
index fb807722dd09125362111fb2db98d58ec7687c77..a674e59d08f390fff6fb4cb14dd621728f69e950 100644 (file)
@@ -26,7 +26,7 @@
 </head>
 <body>
     <header>
-        <nav class="navbar navbar-expand-md bg-primary ">
+        <nav id="lkn-header" class="navbar navbar-expand-md ga-bg-primary">
             <a class="navbar-brand" href="/menuitem-menu_main"><img id="img-logo" alt="Logo" src="/img/logo_64.png"></a>
             <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
               <span class="navbar-toggler-icon"></span>
index 2cb58d2377af3c5b25e3c4ddb72cab4e1cb88bb7..2cf0cfc906ffcc2a4309649293e83848db12fc9d 100644 (file)
@@ -26,7 +26,7 @@
 </head>
 <body class="lkn-text-frame-background">
     <header>
-        <nav class="navbar navbar-expand-md bg-primary ">
+        <nav id="lkn-header" class="lkn-navbar navbar navbar-expand-md">
             <a class="navbar-brand" href="/menuitem-menu_main"><img id="img-logo" alt="Logo" src="/img/logo_64.png"></a>
             <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
               <span class="navbar-toggler-icon"></span>
diff --git a/resources/views/mails/note-notification.blade.php b/resources/views/mails/note-notification.blade.php
new file mode 120000 (symlink)
index 0000000..5bcdf4a
--- /dev/null
@@ -0,0 +1 @@
+../../../vendor/hamatoma/laraknife/resources/views/mails/note-notification.blade.php
\ No newline at end of file
index f81fdb2c21116be101663754c1c48b148dd81e5b..cc4a6bc153917c2148f6e170cf1d792e248e86c9 100644 (file)
@@ -29,7 +29,9 @@
         <tbody>
 @foreach ($records as $page)
         <tr>
-            <td><x-laraknife.icons.change-record module="page" no="{{ $page->id }}" /></td>
+            <td><x-laraknife.icons.change-record module="page" no="{{ $page->id }}" />
+              {!! $context->taskHelper('page-index-icon', strval($page->id)) !!}
+            </td>
               <td> {{ __($page->id) }}</td>
               <td><a href="/page-showpretty/{{ $page->id }}">{{$page->title}}</a></td>
               <td> {{ __($page->pagetype) }}</td>
diff --git a/resources/views/task/create.blade.php b/resources/views/task/create.blade.php
new file mode 100644 (file)
index 0000000..471daef
--- /dev/null
@@ -0,0 +1,20 @@
+@extends('layouts.backend')
+
+@section('content')
+    <form id="note-create" action="/task-create" method="POST">
+        @csrf
+        <x-laraknife.panels.create title="{{ __('Creation of a Task') }}">
+            <input type="hidden" name="options" value="{{ $context->valueOf('options') }}">
+            <x-laraknife.forms.combobox position="first" name="category_scope" label="Category" :options="$optionsCategory"
+                width2="4" />
+            <x-laraknife.forms.combobox position="last" name="visibility_scope" label="Visibility" :options="$optionsVisibility"
+                width2="4" />
+            <x-laraknife.forms.string position="alone" name="title" label="Title"
+                value="{{ $context->valueOf('title') }}" width2="10" />
+            <x-laraknife.forms.text position="alone" name="body" label="Body" value="{{ $context->valueOf('body') }}"
+                width2="10" rows="10" />
+            <x-laraknife.forms.combobox position="first" name="task" label="Task" :options="$optionsTask"
+                width2="4" />
+        </x-laraknife.panels.create>
+    </form>
+@endsection
diff --git a/resources/views/task/edit_snake.blade.php b/resources/views/task/edit_snake.blade.php
new file mode 100644 (file)
index 0000000..32f2b2b
--- /dev/null
@@ -0,0 +1,26 @@
+@extends('layouts.backend')
+
+@section('content')
+    <form id="page-edit_snake" enctype="multipart/form-data" action="/task-edit_snake/{{ $context->model->id }}/{{ $context->model2->id}}" method="POST">
+        @csrf
+        <x-laraknife.panels.edit title="{{ __('Change of a Task') }}">
+            <x-laraknife.layout.nav-tabs :info="$navTabsInfo" fieldset="true">
+                <input type="hidden" name="pageNo" value="{{ $context->valueOf('pageNo') }}" />
+                <x-laraknife.forms.text position="alone" name="contents" label="Snaketext"
+                    value="{{ $context->valueOf('snaketext') }}" width2="10" rows="4" attribute="readonly" />
+                <x-laraknife.forms.text position="alone" name="solution" label="Solution"
+                    value="{{ $context->valueOf('solution') }}" width2="10" rows="4" />
+                <x-laraknife.buttons.button-position position="alone" name="btnCheck" label="Check" width2="4" />
+                @if ($context->valueOf('note') != null)
+                    <x-laraknife.forms.const-text text="" width2="10" />
+                @endif
+            </x-laraknife.layout.nav-tabs>
+        </x-laraknife.panels.edit>
+        @if (!empty($context->valueOf('preview')))
+            <x-laraknife.panels.noform title="{{ __('Preview') }}">
+                <div class="lkn-text">{!! $context->valueOf('preview') !!}
+                </div>
+            </x-laraknife.panels.noform>
+        @endif
+    </form>
+@endsection