Browse Source

Update Post template

Visman 3 years ago
parent
commit
5423a851a5

+ 2 - 2
app/Models/Pages/Delete.php

@@ -73,8 +73,8 @@ class Delete extends Page
         $this->onlinePos  = 'topic-' . $topic->id;
         $this->canonical  = $post->linkDelete;
         $this->robots     = 'noindex';
-        $this->formTitle  = __($deleteTopic ? 'Delete topic' : 'Delete post');
-        $this->crumbs     = $this->crumbs($this->formTitle, $topic);
+        $this->formTitle  = $deleteTopic ? 'Delete topic' : 'Delete post';
+        $this->crumbs     = $this->crumbs(__($this->formTitle), $topic);
         $this->posts      = [$post];
         $this->postsTitle = $deleteTopic ? 'Delete topic info' : 'Delete info';
         $this->form       = $this->formDelete($args, $post, $deleteTopic);

+ 2 - 2
app/Models/Pages/Edit.php

@@ -128,8 +128,8 @@ class Edit extends Page
         $this->onlinePos = 'topic-' . $topic->id;
         $this->canonical = $post->linkEdit;
         $this->robots    = 'noindex';
-        $this->formTitle = $firstPost ? __('Edit topic') : __('Edit post');
-        $this->crumbs    = $this->crumbs($this->formTitle, $topic);
+        $this->formTitle = $firstPost ? 'Edit topic' : 'Edit post';
+        $this->crumbs    = $this->crumbs(__($this->formTitle), $topic);
         $this->form      = $this->messageForm($post, 'EditPost', $args, true, $firstPost, false);
 
         return $this;

+ 4 - 4
app/Models/Pages/Post.php

@@ -88,8 +88,8 @@ class Post extends Page
             ]
         );
         $this->robots    = 'noindex';
-        $this->crumbs    = $this->crumbs(__('Post new topic'), $forum);
-        $this->formTitle = __('Post new topic');
+        $this->formTitle = 'Post new topic';
+        $this->crumbs    = $this->crumbs(__($this->formTitle), $forum);
         $this->form      = $this->messageForm($forum, 'NewTopic', $args, false, true, false);
 
         return $this;
@@ -159,8 +159,8 @@ class Post extends Page
             ]
         );
         $this->robots     = 'noindex';
-        $this->crumbs     = $this->crumbs(__('Post a reply'), $topic);
-        $this->formTitle  = __('Post a reply');
+        $this->formTitle  = 'Post a reply';
+        $this->crumbs     = $this->crumbs(__($this->formTitle), $topic);
         $this->form       = $this->messageForm($topic, 'NewReply', $args, false, false, false);
         $this->postsTitle = 'Topic review';
         $this->posts      = $topic->review();

+ 1 - 1
app/templates/post.forkbb.php

@@ -18,7 +18,7 @@
 @endif
 @if ($form = $p->form)
     <section class="f-post-form">
-      <h2>{!! $p->formTitle !!}</h2>
+      <h2>{!! __($p->formTitle) !!}</h2>
       <div class="f-fdiv">
     @include ('layouts/form')
       </div>