Explorar o código

Change page of Message

Visman %!s(int64=5) %!d(string=hai) anos
pai
achega
34fddd45e4

+ 12 - 1
app/Models/Pages/Message.php

@@ -21,9 +21,20 @@ class Message extends Page
         $this->httpStatus  = $status;
         $this->httpStatus  = $status;
         $this->httpHeaders = $headers;
         $this->httpHeaders = $headers;
         $this->titles      = \ForkBB\__('Info');
         $this->titles      = \ForkBB\__('Info');
-        $this->message     = \ForkBB\__($message);
         $this->back        = $back;
         $this->back        = $back;
 
 
+
+        if ($status < 200) {
+            $type = 'i';
+        } elseif ($status < 300) {
+            $type = 's';
+        } elseif ($status < 400) {
+            $type = 'w';
+        } else {
+            $type = 'e';
+        }
+        $this->fIswev = [$type, \ForkBB\__($message)];
+
         return $this;
         return $this;
     }
     }
 }
 }

+ 2 - 4
app/templates/message.forkbb.php

@@ -1,8 +1,6 @@
 @extends ('layouts/main')
 @extends ('layouts/main')
-    <section class="f-main f-message">
-      <h2>{!! __('Info') !!}</h2>
-      <p>{!! $p->message !!}</p>
 @if ($p->back)
 @if ($p->back)
+    <div class="f-backlink">
       <p><a href="{!! $p->fRootLink !!}" onclick="window.history.back(); return false;">{!! __('Go back') !!}</a></p>
       <p><a href="{!! $p->fRootLink !!}" onclick="window.history.back(); return false;">{!! __('Go back') !!}</a></p>
+    </div>
 @endif
 @endif
-    </section>

+ 1 - 6
public/style/ForkBB/style.css

@@ -823,12 +823,7 @@ body,
 /* Сообщение */
 /* Сообщение */
 /*************/
 /*************/
 
 
-#fork .f-message > h2 {
-  display: block;
-  padding: 0.625rem;
-}
-
-#fork .f-message > p {
+#fork .f-backlink > p {
   padding: 0.625rem;
   padding: 0.625rem;
 }
 }