mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-07 11:40:56 -05:00
Merge branch '6.x.x' into Refund-System
This commit is contained in:
@@ -1,413 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author HDVinnie <hdinnovations@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class BBCodeConverter
|
||||
{
|
||||
/**
|
||||
* BBCodeConverter Constructor.
|
||||
*/
|
||||
public function __construct(public string $text)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode size.
|
||||
*/
|
||||
protected function replaceSize(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[size=([\W\D\w\s]*?)\]([\W\D\w\s]*?)\[/size\]#iu',
|
||||
fn ($matches) => '<div style="font-size: '.trim($matches[1], '').';">'.trim($matches[1], '').'</span>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode center.
|
||||
*/
|
||||
protected function replaceCenter(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[center\]([\W\D\w\s]*?)\[/center\]#iu',
|
||||
fn ($matches) => '<div class="text-center">'.trim($matches[1], ' ').'</div>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode bold.
|
||||
*/
|
||||
protected function replaceBold(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[b\]([\W\D\w\s]*?)\[/b\]#iu',
|
||||
fn ($matches) => '**'.trim($matches[1], ' ').'**',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode italic.
|
||||
*/
|
||||
protected function replaceItalic(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[i\]([\W\D\w\s]*?)\[/i\]#iu',
|
||||
fn ($matches) => '*'.trim($matches[1], ' ').'*',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode underline. Hoedown support underline.
|
||||
*/
|
||||
protected function replaceUnderline(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[u\]([\W\D\w\s]*?)\[/u\]#iu',
|
||||
fn ($matches) => '_'.trim($matches[1], ' ').'_',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode strikethrough.
|
||||
*/
|
||||
protected function replaceStrikethrough(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[s\]([\W\D\w\s]*?)\[/s\]#iu',
|
||||
fn ($matches) => '~~'.trim($matches[1], ' ').'~~',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode lists.
|
||||
*/
|
||||
protected function replaceLists(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[list(?P<type>=1)?\](?P<items>[\W\D\w\s]*?)\[/list\]#iu',
|
||||
function ($matches) {
|
||||
$buffer = '';
|
||||
|
||||
$list = preg_replace('#\s*$|^\s*#mu', '', $matches['items']);
|
||||
throw_if(null === $list, new RuntimeException('Text has malformed BBCode lists'));
|
||||
|
||||
$items = preg_split('#\[\*\]#u', $list);
|
||||
|
||||
$counter = is_countable($items) ? \count($items) : 0;
|
||||
|
||||
if (isset($matches['type']) && $matches['type'] == '=1') { // ordered list
|
||||
// We start from 1 to discard the first string, in fact, it's empty.
|
||||
for ($i = 1; $i < $counter; $i++) {
|
||||
if (! empty($items[$i])) {
|
||||
$buffer .= ($i).'. '.trim($items[$i]).PHP_EOL;
|
||||
}
|
||||
}
|
||||
} else { // unordered list
|
||||
// We start from 1 to discard the first string, in fact, it's empty.
|
||||
for ($i = 1; $i < $counter; $i++) {
|
||||
if (! empty($items[$i])) {
|
||||
$buffer .= '- '.trim($items[$i]).PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We need a like break above the list and another one below.
|
||||
if (! empty($buffer)) {
|
||||
$buffer = PHP_EOL.$buffer.PHP_EOL;
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
},
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode tables.
|
||||
*/
|
||||
protected function replaceTables(): void
|
||||
{
|
||||
$replaceRow = function ($matches) {
|
||||
$columns = $matches['columns'];
|
||||
$columns = trim($columns);
|
||||
|
||||
$cells = preg_replace_callback('#\[td?\](?P<cells>[\W\w\s]*?)\[/td\]#iu', fn ($matches) => $matches['cells'].' | ', $columns);
|
||||
|
||||
if ($cells !== '') {
|
||||
$cells = '| '.$cells;
|
||||
}
|
||||
|
||||
return trim($cells);
|
||||
};
|
||||
|
||||
$this->text = preg_replace_callback('#\[table?\](?P<rows>[\W\w\s]*?)\[/table\]#iu', function ($tableMatches) use ($replaceRow) {
|
||||
preg_match_all('#\[th?\](?P<columns>[\W\w\s]*?)\[/th\]#iu', $tableMatches['rows'], $headerMatches, PREG_SET_ORDER);
|
||||
$headers = [];
|
||||
if (\count($headerMatches) !== 0) {
|
||||
$headers = array_map($replaceRow, $headerMatches);
|
||||
}
|
||||
|
||||
preg_match_all('#\[tr?\](?P<columns>[\W\w\s]*?)\[/tr\]#iu', $tableMatches['rows'], $contentMatches, PREG_SET_ORDER);
|
||||
$rows = [];
|
||||
if (\count($contentMatches) !== 0) {
|
||||
$rows = array_map($replaceRow, $contentMatches);
|
||||
}
|
||||
|
||||
$headerSeparator = '';
|
||||
if ($rows !== []) {
|
||||
$columnCount = substr_count($rows[0], '|');
|
||||
|
||||
if ($headers === []) {
|
||||
$headers[] = implode(' ', array_fill(0, $columnCount, '|'));
|
||||
}
|
||||
|
||||
$headerSeparator = implode(' --- ', array_fill(0, $columnCount, '|'));
|
||||
} else {
|
||||
return $tableMatches['rows'];
|
||||
}
|
||||
|
||||
$headers[] = $headerSeparator;
|
||||
|
||||
return implode("\n", array_merge($headers, $rows))."\n";
|
||||
}, $this->text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode urls.
|
||||
*/
|
||||
protected function replaceUrls(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[url\s*=\s*("(?:[^"]*")|\A[^\']*\Z|(?:[^\'">\]\s]+))\s*(?:[^]\s]*)\]([\W\D\w\s]*?)\[/url\]#iu',
|
||||
function ($matches) {
|
||||
if (isset($matches[1], $matches[2])) {
|
||||
return '['.$matches[2].']('.$matches[1].')';
|
||||
}
|
||||
|
||||
throw new RuntimeException('Text has malformed BBCode urls');
|
||||
},
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode images.
|
||||
*/
|
||||
protected function replaceImage(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[img\]([\W\D\w\s]*?)\[/img\]#iu',
|
||||
fn ($matches) => PHP_EOL.'![]'.'('.$matches[1].')'.PHP_EOL,
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode images.
|
||||
*/
|
||||
protected function replaceImages(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[img\s*=\s*("(?:[^"]*")|\A[^\']*\Z|(?:[^\'">\]\s]+))\s*(?:[^]\s]*)\[/img\]#iu',
|
||||
fn ($matches) => PHP_EOL.'!['.$matches[2].']'.'('.$matches[1].')'.PHP_EOL,
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode quotes.
|
||||
*/
|
||||
protected function replaceQuotes(): void
|
||||
{
|
||||
// Removes the inner quotes, leaving just one level.
|
||||
$this->text = preg_replace('#\G(?<!^)(?>(\[quote\b[^]]*](?>[^[]++|\[(?!/?quote)|(?1))*\[/quote])|(?<!\[)(?>[^[]++|\[(?!/?quote))+\K)|\[quote\b[^]]*]\K#', '', $this->text);
|
||||
|
||||
// Replaces all the remaining quotes with '> ' characters.
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[quote\b[^]]*\]((?>[^[]++|\[(?!/?quote))*)\[/quote\]#i',
|
||||
function ($matches) {
|
||||
$quote = preg_replace('#^\s*#mu', '', trim($matches[1]));
|
||||
|
||||
return '> '.$quote.PHP_EOL.PHP_EOL;
|
||||
},
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replaces BBCode snippets.
|
||||
*/
|
||||
protected function replaceSnippets(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[code\s*=?(?P<language>\w*)\](?P<snippet>[\W\D\w\s]*?)\[\/code\]#iu',
|
||||
function ($matches) {
|
||||
if (isset($matches['snippet'])) {
|
||||
$language = strtolower($matches['language']);
|
||||
|
||||
if ($language === 'html4strict' || $language === 'div') {
|
||||
$language = 'html';
|
||||
} elseif ($language === 'shell' || $language === 'dos' || $language === 'batch') {
|
||||
$language = 'sh';
|
||||
} elseif ($language === 'xul' || $language === 'wpf') {
|
||||
$language = 'xml';
|
||||
} elseif ($language === 'asm') {
|
||||
$language = 'nasm';
|
||||
} elseif ($language === 'vb' || $language === 'visualbasic' || $language === 'vba') {
|
||||
$language = 'vb.net';
|
||||
} elseif ($language === 'asp') {
|
||||
$language = 'aspx-vb';
|
||||
} elseif ($language === 'xaml') {
|
||||
$language = 'xml';
|
||||
} elseif ($language === 'cplusplus') {
|
||||
$language = 'cpp';
|
||||
} elseif ($language === 'txt' || $language === 'gettext') {
|
||||
$language = 'text';
|
||||
} elseif ($language === 'basic') {
|
||||
$language = 'cbmbas';
|
||||
} elseif ($language === 'lisp') {
|
||||
$language = 'clojure';
|
||||
} elseif ($language === 'aspnet') {
|
||||
$language = 'aspx-vb';
|
||||
}
|
||||
|
||||
return PHP_EOL.'```'.$language.PHP_EOL.trim($matches['snippet']).PHP_EOL.'```'.PHP_EOL;
|
||||
}
|
||||
|
||||
throw new RuntimeException('Text has malformed BBCode snippet.');
|
||||
},
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace BBCode spoiler.
|
||||
*/
|
||||
protected function replaceSpoilers(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[spoiler\](.*?)\[\/spoiler\]#ius',
|
||||
fn ($matches) => '<p><details class="label label-primary"><summary>Spoiler</summary><pre><code>'.trim($matches[1]).'</code></pre></details></p>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace BBCode named spoiler.
|
||||
*/
|
||||
protected function replaceNamedSpoilers(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[spoiler\=(.*?)\](.*?)\[\/spoiler\]#ius',
|
||||
fn ($matches) => '<p><details class="label label-primary"><summary>'.trim($matches[1]).'</summary><pre><code>'.trim($matches[2]).'</code></pre></details></p>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace BBCode color.
|
||||
*/
|
||||
protected function replaceColor(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[color=([\W\D\w\s]*?)\]([\W\D\w\s]*?)\[/color\]#iu',
|
||||
fn ($matches) => '<span style="color: '.trim($matches[1], '').';">'.trim($matches[2], '').'</span>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace BBCode Video.
|
||||
*/
|
||||
protected function replaceVideo(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[video=[^\]]*.([\W\D\w\s][^\[]*)\[/video]#iu',
|
||||
fn ($matches) => '<iframe src="https://www.youtube-nocookie.com/embed/'.trim($matches[1], '').'?rel=0" width="640" height="480" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace BBCode Youtube.
|
||||
*/
|
||||
protected function replaceYoutube(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[youtube\]([\W\D\w\s]*?)\[/youtube\]#iu',
|
||||
fn ($matches) => '<iframe src="https://www.youtube-nocookie.com/embed/'.trim($matches[1], '').'?rel=0" width="640" height="480" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace BBCode Alert.
|
||||
*/
|
||||
protected function replaceAlert(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[alert\]([\W\D\w\s]*?)\[/alert\]#iu',
|
||||
fn ($matches) => '<div class="bbcode-alert">'.trim($matches[1], '').'</div>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace BBCode Note.
|
||||
*/
|
||||
protected function replaceNote(): void
|
||||
{
|
||||
$this->text = preg_replace_callback(
|
||||
'#\[note\]([\W\D\w\s]*?)\[/note\]#iu',
|
||||
fn ($matches) => '<div class="bbcode-note">'.trim($matches[1], '').'</div>',
|
||||
$this->text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Converts the provided BBCode text to an equivalent Markdown text.
|
||||
*/
|
||||
public function toMarkdown(): string
|
||||
{
|
||||
$this->replaceCenter();
|
||||
$this->replaceSize();
|
||||
$this->replaceBold();
|
||||
$this->replaceItalic();
|
||||
$this->replaceUnderline();
|
||||
$this->replaceStrikethrough();
|
||||
$this->replaceLists();
|
||||
$this->replaceTables();
|
||||
$this->replaceUrls();
|
||||
$this->replaceImage();
|
||||
$this->replaceImages();
|
||||
$this->replaceQuotes();
|
||||
$this->replaceSnippets();
|
||||
$this->replaceSpoilers();
|
||||
$this->replaceNamedSpoilers();
|
||||
$this->replaceColor();
|
||||
$this->replaceVideo();
|
||||
$this->replaceYoutube();
|
||||
$this->replaceAlert();
|
||||
$this->replaceNote();
|
||||
|
||||
return $this->text;
|
||||
}
|
||||
}
|
||||
+13
-11
@@ -115,14 +115,14 @@ class Bbcode
|
||||
'quote' => [
|
||||
'openBbcode' => '/^\[quote\]/i',
|
||||
'closeBbcode' => '[/quote]',
|
||||
'openHtml' => '<ul class="media-list comments-list"><li class="media" style="border-left-width: 5px; border-left-style: solid; border-left-color: #01bc8c;"><div class="media-body"><div class="pt-5">',
|
||||
'closeHtml' => '</div></div></li></ul>',
|
||||
'openHtml' => '<blockquote>',
|
||||
'closeHtml' => '</blockquote>',
|
||||
],
|
||||
'namedquote' => [
|
||||
'openBbcode' => '/^\[quote=([^<>"]*?)\]/i',
|
||||
'closeBbcode' => '[/quote]',
|
||||
'openHtml' => '<ul class="media-list comments-list"><li class="media" style="border-left-width: 5px; border-left-style: solid; border-left-color: #01bc8c;"><div class="media-body"><strong><span><i class="fas fa-quote-left"></i> Quoting $1 :</span></strong><div class="pt-5">',
|
||||
'closeHtml' => '</div></div></li></ul>',
|
||||
'openHtml' => '<blockquote><i class="fas fa-quote-left"></i> <cite>Quoting $1:</cite><p>',
|
||||
'closeHtml' => '</p></blockquote>',
|
||||
],
|
||||
'namedlink' => [
|
||||
'openBbcode' => '/^\[url=(.*?)\]/i',
|
||||
@@ -157,13 +157,13 @@ class Bbcode
|
||||
'alert' => [
|
||||
'openBbcode' => '/^\[alert\]/i',
|
||||
'closeBbcode' => '[/alert]',
|
||||
'openHtml' => '<div class="bbcode-alert">',
|
||||
'openHtml' => '<div class="bbcode-rendered__alert">',
|
||||
'closeHtml' => '</div>',
|
||||
],
|
||||
'note' => [
|
||||
'openBbcode' => '/^\[note\]/i',
|
||||
'closeBbcode' => '[/note]',
|
||||
'openHtml' => '<div class="bbcode-note">',
|
||||
'openHtml' => '<div class="bbcode-rendered__note">',
|
||||
'closeHtml' => '</div>',
|
||||
],
|
||||
'sub' => [
|
||||
@@ -205,13 +205,13 @@ class Bbcode
|
||||
'spoiler' => [
|
||||
'openBbcode' => '/^\[spoiler\]/i',
|
||||
'closeBbcode' => '[/spoiler]',
|
||||
'openHtml' => '<details class="label label-primary"><summary>Spoiler</summary><pre><code><div style="text-align:left;">',
|
||||
'openHtml' => '<details><summary>Spoiler</summary><pre><code><div style="text-align:left;">',
|
||||
'closeHtml' => '</div></code></pre></details>',
|
||||
],
|
||||
'named-spoiler' => [
|
||||
'openBbcode' => '/^\[spoiler=(.*?)\]/i',
|
||||
'closeBbcode' => '[/spoiler]',
|
||||
'openHtml' => '<details class="label label-primary"><summary>$1</summary><pre><code><div style="text-align:left;">',
|
||||
'openHtml' => '<details><summary>$1</summary><pre><code><div style="text-align:left;">',
|
||||
'closeHtml' => '</div></code></pre></details>',
|
||||
],
|
||||
];
|
||||
@@ -219,7 +219,7 @@ class Bbcode
|
||||
/**
|
||||
* Parses the BBCode string.
|
||||
*/
|
||||
public function parse($source): string
|
||||
public function parse($source, $replaceLineBreaks = true): string
|
||||
{
|
||||
// Replace all void elements since they don't have closing tags
|
||||
$source = str_replace('[*]', '<li>', $source);
|
||||
@@ -337,8 +337,10 @@ class Bbcode
|
||||
$source .= $this->parsers[array_pop($openedElements)]['closeHtml'];
|
||||
}
|
||||
|
||||
// Replace line breaks
|
||||
$source = str_replace(["\r\n", "\n"], '<br>', $source);
|
||||
if ($replaceLineBreaks) {
|
||||
// Replace line breaks
|
||||
$source = str_replace(["\r\n", "\n"], '<br>', $source);
|
||||
}
|
||||
|
||||
return $source;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ class Bencode
|
||||
|
||||
public static function bdecode_file($filename)
|
||||
{
|
||||
$f = file_get_contents($filename, FILE_BINARY);
|
||||
$f = file_get_contents($filename);
|
||||
|
||||
return self::bdecode($f);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Forum;
|
||||
use App\Models\Post;
|
||||
use App\Models\Topic;
|
||||
|
||||
/**
|
||||
@@ -30,35 +29,22 @@ class ForumCategoryController extends Controller
|
||||
// Find the topic
|
||||
$forum = Forum::findOrFail($id);
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
// Total Posts Count
|
||||
$numPosts = Post::count();
|
||||
// Total Topics Count
|
||||
$numTopics = Topic::count();
|
||||
|
||||
// Check if this is a category or forum
|
||||
if ($forum->parent_id != 0) {
|
||||
return to_route('forums.show', ['id' => $forum->id]);
|
||||
}
|
||||
|
||||
// Check if the user has permission to view the forum
|
||||
$category = Forum::findOrFail($forum->id);
|
||||
if (! $category->getPermission()->show_forum) {
|
||||
if (! $forum->getPermission()->show_forum) {
|
||||
return to_route('forums.index')
|
||||
->withErrors('You Do Not Have Access To This Category!');
|
||||
}
|
||||
|
||||
// Fetch topics->posts in descending order
|
||||
$topics = $forum->sub_topics()->latest('pinned')->latest('last_reply_at')->latest()->paginate(25);
|
||||
// $topics = $forum->sub_topics()->latest('pinned')->latest('last_reply_at')->latest()->paginate(25);
|
||||
|
||||
return view('forum.category', [
|
||||
'forum' => $forum,
|
||||
'topics' => $topics,
|
||||
'category' => $category,
|
||||
'num_posts' => $numPosts,
|
||||
'num_forums' => $numForums,
|
||||
'num_topics' => $numTopics,
|
||||
return view('forum.category_topic.index', [
|
||||
'forum' => $forum,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,144 +23,6 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class ForumController extends Controller
|
||||
{
|
||||
/**
|
||||
* Search For Topics.
|
||||
*/
|
||||
public function search(Request $request): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$result = null;
|
||||
$categories = Forum::all()->sortBy('position');
|
||||
|
||||
$user = $request->user();
|
||||
|
||||
$pests = $user->group->permissions->where('show_forum', '=', 0)->pluck('forum_id')->toArray();
|
||||
if (! \is_array($pests)) {
|
||||
$pests = [];
|
||||
}
|
||||
|
||||
$topicNeos = $user->subscriptions->where('topic_id', '>', 0)->pluck('topic_id')->toArray();
|
||||
if (! \is_array($topicNeos)) {
|
||||
$topicNeos = [];
|
||||
}
|
||||
|
||||
$forumNeos = $user->subscriptions->where('forum_id', '>', 0)->pluck('forum_id')->toArray();
|
||||
if (! \is_array($forumNeos)) {
|
||||
$forumNeos = [];
|
||||
}
|
||||
|
||||
if ($request->has('body') && $request->input('body') != '') {
|
||||
$logger = 'forum.results_posts';
|
||||
$result = Post::selectRaw('posts.id as id,posts.*')->with(['topic', 'user'])->leftJoin('topics', 'posts.topic_id', '=', 'topics.id')->whereIntegerNotInRaw('topics.forum_id', $pests);
|
||||
}
|
||||
|
||||
if (! isset($logger)) {
|
||||
$logger = 'forum.results_topics';
|
||||
$result = Topic::whereIntegerNotInRaw('topics.forum_id', $pests);
|
||||
}
|
||||
|
||||
if ($request->has('body') && $request->input('body') != '') {
|
||||
$result->where([['posts.content', 'like', '%'.$request->input('body').'%']]);
|
||||
}
|
||||
|
||||
if ($request->has('name')) {
|
||||
$result->where([['topics.name', 'like', '%'.$request->input('name').'%']]);
|
||||
}
|
||||
|
||||
if ($request->has('subscribed') && $request->input('subscribed') == 1) {
|
||||
$result->where(function ($query) use ($topicNeos, $forumNeos): void {
|
||||
$query->whereIntegerInRaw('topics.id', $topicNeos)->orWhereIntegerInRaw('topics.forum_id', $forumNeos);
|
||||
});
|
||||
} elseif ($request->has('notsubscribed') && $request->input('notsubscribed') == 1) {
|
||||
$result->whereIntegerNotInRaw('topics.id', $topicNeos)->whereIntegerNotInRaw('topics.forum_id', $forumNeos);
|
||||
}
|
||||
|
||||
if ($request->has('implemented') && $request->input('implemented') == 1) {
|
||||
$result->where('topics.implemented', '=', 1);
|
||||
}
|
||||
|
||||
if ($request->has('approved') && $request->input('approved') == 1) {
|
||||
$result->where('topics.approved', '=', 1);
|
||||
}
|
||||
|
||||
if ($request->has('denied') && $request->input('denied') == 1) {
|
||||
$result->where('topics.denied', '=', 1);
|
||||
}
|
||||
|
||||
if ($request->has('solved') && $request->input('solved') == 1) {
|
||||
$result->where('topics.solved', '=', 1);
|
||||
}
|
||||
|
||||
if ($request->has('invalid') && $request->input('invalid') == 1) {
|
||||
$result->where('topics.invalid', '=', 1);
|
||||
}
|
||||
|
||||
if ($request->has('bug') && $request->input('bug') == 1) {
|
||||
$result->where('topics.bug', '=', 1);
|
||||
}
|
||||
|
||||
if ($request->has('suggestion') && $request->input('suggestion') == 1) {
|
||||
$result->where('topics.suggestion', '=', 1);
|
||||
}
|
||||
|
||||
if ($request->has('closed') && $request->input('closed') == 1) {
|
||||
$result->where('topics.state', '=', 'close');
|
||||
}
|
||||
|
||||
if ($request->has('open') && $request->input('open') == 1) {
|
||||
$result->where('topics.state', '=', 'open');
|
||||
}
|
||||
|
||||
if ($request->has('category')) {
|
||||
$category = (int) $request->input('category');
|
||||
if ($category > 0 && $category < 99_999_999_999) {
|
||||
$children = Forum::where('parent_id', '=', $category)->get()->toArray();
|
||||
if (\is_array($children)) {
|
||||
$result->where(function ($query) use ($category, $children): void {
|
||||
$query->where('topics.forum_id', '=', $category)->orWhereIn('topics.forum_id', $children);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($request->has('body') && $request->input('body') != '') {
|
||||
if ($request->has('sorting') && $request->input('sorting') != null) {
|
||||
$sorting = sprintf('posts.%s', $request->input('sorting'));
|
||||
$direction = $request->input('direction');
|
||||
} else {
|
||||
$sorting = 'posts.id';
|
||||
$direction = 'desc';
|
||||
}
|
||||
} elseif ($request->has('sorting') && $request->input('sorting') != null) {
|
||||
$sorting = sprintf('topics.%s', $request->input('sorting'));
|
||||
$direction = $request->input('direction');
|
||||
} else {
|
||||
$sorting = 'topics.last_reply_at';
|
||||
$direction = 'desc';
|
||||
}
|
||||
$results = $result->orderBy($sorting, $direction)->paginate(25)->withQueryString();
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
// Total Posts Count
|
||||
$numPosts = Post::count();
|
||||
// Total Topics Count
|
||||
$numTopics = Topic::count();
|
||||
|
||||
$params = $request->all();
|
||||
|
||||
return view($logger, [
|
||||
'categories' => $categories,
|
||||
'results' => $results,
|
||||
'user' => $user,
|
||||
'name' => $request->input('name'),
|
||||
'body' => $request->input('body'),
|
||||
'num_posts' => $numPosts,
|
||||
'num_forums' => $numForums,
|
||||
'num_topics' => $numTopics,
|
||||
'params' => $params,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search For Subscribed Forums & Topics.
|
||||
*/
|
||||
@@ -168,48 +30,8 @@ class ForumController extends Controller
|
||||
{
|
||||
$user = $request->user();
|
||||
|
||||
$pests = $user->group->permissions->where('show_forum', '=', 0)->pluck('forum_id')->toArray();
|
||||
if (! \is_array($pests)) {
|
||||
$pests = [];
|
||||
}
|
||||
|
||||
$topicNeos = $user->subscriptions->where('topic_id', '>', '0')->pluck('topic_id')->toArray();
|
||||
if (! \is_array($topicNeos)) {
|
||||
$topicNeos = [];
|
||||
}
|
||||
|
||||
$forumNeos = $user->subscriptions->where('forum_id', '>', '0')->pluck('forum_id')->toArray();
|
||||
if (! \is_array($forumNeos)) {
|
||||
$forumNeos = [];
|
||||
}
|
||||
|
||||
$builder = Forum::with('subscription_topics')->selectRaw('forums.id,max(forums.position) as position,max(forums.num_topic) as num_topic,max(forums.num_post) as num_post,max(forums.last_topic_id) as last_topic_id,max(forums.last_topic_name) as last_topic_name,max(forums.last_post_user_id) as last_post_user_id,max(forums.last_post_user_username) as last_post_user_username,max(forums.name) as name,max(forums.slug) as slug,max(forums.description) as description,max(forums.parent_id) as parent_id,max(forums.created_at),max(forums.updated_at),max(topics.id) as topic_id,max(topics.created_at) as topic_created_at')->leftJoin('topics', 'forums.id', '=', 'topics.forum_id')->whereIntegerNotInRaw('topics.forum_id', $pests)->where(function ($query) use ($topicNeos, $forumNeos): void {
|
||||
$query->whereIntegerInRaw('topics.id', $topicNeos)->orWhereIntegerInRaw('forums.id', $forumNeos);
|
||||
})->groupBy('forums.id');
|
||||
|
||||
$results = $builder->latest('topic_created_at')->paginate(25);
|
||||
$results->setPath('?name='.$request->input('name'));
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
// Total Posts Count
|
||||
$numPosts = Post::count();
|
||||
// Total Topics Count
|
||||
$numTopics = Topic::count();
|
||||
|
||||
$params = $request->all();
|
||||
|
||||
return view('forum.subscriptions', [
|
||||
'results' => $results,
|
||||
'user' => $user,
|
||||
'name' => $request->input('name'),
|
||||
'body' => $request->input('body'),
|
||||
'num_posts' => $numPosts,
|
||||
'num_forums' => $numForums,
|
||||
'num_topics' => $numTopics,
|
||||
'params' => $params,
|
||||
'forum_neos' => $forumNeos,
|
||||
'topic_neos' => $topicNeos,
|
||||
'user' => $user,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -218,29 +40,7 @@ class ForumController extends Controller
|
||||
*/
|
||||
public function latestTopics(Request $request): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$user = $request->user();
|
||||
|
||||
$pests = $user->group->permissions->where('show_forum', '=', 0)->pluck('forum_id')->toArray();
|
||||
if (! \is_array($pests)) {
|
||||
$pests = [];
|
||||
}
|
||||
|
||||
$results = Topic::with(['forum'])->whereIntegerNotInRaw('topics.forum_id', $pests)->latest()->paginate(25);
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
// Total Posts Count
|
||||
$numPosts = Post::count();
|
||||
// Total Topics Count
|
||||
$numTopics = Topic::count();
|
||||
|
||||
return view('forum.latest_topics', [
|
||||
'results' => $results,
|
||||
'user' => $user,
|
||||
'num_posts' => $numPosts,
|
||||
'num_forums' => $numForums,
|
||||
'num_topics' => $numTopics,
|
||||
]);
|
||||
return view('forum.topic.index');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,29 +48,7 @@ class ForumController extends Controller
|
||||
*/
|
||||
public function latestPosts(Request $request): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$user = $request->user();
|
||||
|
||||
$pests = $user->group->permissions->where('show_forum', '=', 0)->pluck('forum_id')->toArray();
|
||||
if (! \is_array($pests)) {
|
||||
$pests = [];
|
||||
}
|
||||
|
||||
$results = Post::selectRaw('posts.id as id,posts.*')->with(['topic', 'user', 'topic.forum'])->leftJoin('topics', 'posts.topic_id', '=', 'topics.id')->whereIntegerNotInRaw('topics.forum_id', $pests)->latest('posts.created_at')->paginate(25);
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
// Total Posts Count
|
||||
$numPosts = Post::count();
|
||||
// Total Topics Count
|
||||
$numTopics = Topic::count();
|
||||
|
||||
return view('forum.latest_posts', [
|
||||
'results' => $results,
|
||||
'user' => $user,
|
||||
'num_posts' => $numPosts,
|
||||
'num_forums' => $numForums,
|
||||
'num_topics' => $numTopics,
|
||||
]);
|
||||
return view('forum.post.index');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,7 +56,14 @@ class ForumController extends Controller
|
||||
*/
|
||||
public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$categories = Forum::all()->sortBy('position');
|
||||
$categories = Forum::query()
|
||||
->with(['forums' => fn ($query) => $query
|
||||
->whereRelation('permissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
])
|
||||
->where('parent_id', '=', 0)
|
||||
->whereRelation('permissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
->orderBy('position')
|
||||
->get();
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
@@ -303,35 +88,19 @@ class ForumController extends Controller
|
||||
// Find the topic
|
||||
$forum = Forum::findOrFail($id);
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
// Total Posts Count
|
||||
$numPosts = Post::count();
|
||||
// Total Topics Count
|
||||
$numTopics = Topic::count();
|
||||
|
||||
// Check if this is a category or forum
|
||||
if ($forum->parent_id == 0) {
|
||||
return to_route('forums.categories.show', ['id' => $forum->id]);
|
||||
}
|
||||
|
||||
// Check if the user has permission to view the forum
|
||||
$category = Forum::findOrFail($forum->id);
|
||||
if (! $category->getPermission()->show_forum) {
|
||||
if (! $forum->getPermission()->show_forum) {
|
||||
return to_route('forums.index')
|
||||
->withErrors('You Do Not Have Access To This Forum!');
|
||||
}
|
||||
|
||||
// Fetch topics->posts in descending order
|
||||
$topics = $forum->topics()->latest('pinned')->latest('last_reply_at')->latest()->paginate(25);
|
||||
|
||||
return view('forum.display', [
|
||||
'forum' => $forum,
|
||||
'topics' => $topics,
|
||||
'category' => $category,
|
||||
'num_posts' => $numPosts,
|
||||
'num_forums' => $numForums,
|
||||
'num_topics' => $numTopics,
|
||||
return view('forum.forum_topic.index', [
|
||||
'forum' => $forum,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class CollectionController extends Controller
|
||||
*/
|
||||
public function show(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$collection = Collection::with(['movie', 'comments'])->findOrFail($id);
|
||||
$collection = Collection::with(['movie' => fn ($query) => $query->has('torrents'), 'comments'])->findOrFail($id);
|
||||
|
||||
return view('mediahub.collection.show', [
|
||||
'collection' => $collection,
|
||||
|
||||
@@ -32,8 +32,8 @@ class CompanyController extends Controller
|
||||
public function show(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$company = Company::withCount('tv', 'movie')->findOrFail($id);
|
||||
$shows = $company->tv()->oldest('name')->paginate(25);
|
||||
$movies = $company->movie()->oldest('title')->paginate(25);
|
||||
$shows = $company->tv()->has('torrents')->oldest('name')->paginate(25, ['*'], 'showsPage');
|
||||
$movies = $company->movie()->has('torrents')->oldest('title')->paginate(25, ['*'], 'moviesPage');
|
||||
|
||||
return view('mediahub.company.show', [
|
||||
'company' => $company,
|
||||
|
||||
@@ -34,8 +34,8 @@ class GenreController extends Controller
|
||||
public function show(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$genre = Genre::withCount(['tv', 'movie'])->findOrFail($id);
|
||||
$shows = $genre->tv()->oldest('name')->paginate(25);
|
||||
$movies = $genre->movie()->oldest('title')->paginate(25);
|
||||
$shows = $genre->tv()->has('torrents')->oldest('name')->paginate(25, ['*'], 'showsPage');
|
||||
$movies = $genre->movie()->has('torrents')->oldest('title')->paginate(25, ['*'], 'moviesPage');
|
||||
|
||||
return view('mediahub.genre.show', [
|
||||
'genre' => $genre,
|
||||
|
||||
@@ -32,7 +32,7 @@ class NetworkController extends Controller
|
||||
public function show(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$network = Network::withCount('tv')->findOrFail($id);
|
||||
$shows = $network->tv()->oldest('name')->paginate(25);
|
||||
$shows = $network->tv()->has('torrents')->oldest('name')->paginate(25);
|
||||
|
||||
return view('mediahub.network.show', [
|
||||
'network' => $network,
|
||||
|
||||
@@ -31,9 +31,13 @@ class PersonController extends Controller
|
||||
*/
|
||||
public function show(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$details = Person::findOrFail($id);
|
||||
$credits = Person::with(['tv', 'season', 'episode', 'movie'])->findOrFail($id);
|
||||
$person = Person::with([
|
||||
'tv' => fn ($query) => $query->has('torrents'),
|
||||
'tv.genres',
|
||||
'movie' => fn ($query) => $query->has('torrents'),
|
||||
'movie.genres'
|
||||
])->findOrFail($id);
|
||||
|
||||
return view('mediahub.person.show', ['credits' => $credits, 'details' => $details]);
|
||||
return view('mediahub.person.show', ['person' => $person]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,65 +258,42 @@ class PlaylistController extends Controller
|
||||
}
|
||||
|
||||
// Zip File Name
|
||||
$zipFileName = sprintf('[%s]%s.zip', $user->username, $playlist->name);
|
||||
$zipFileName = '['.$user->username.']'.$playlist->name.'.zip';
|
||||
|
||||
// Create ZipArchive Obj
|
||||
$zipArchive = new ZipArchive();
|
||||
|
||||
// Get Users History
|
||||
$playlistTorrents = PlaylistTorrent::where('playlist_id', '=', $playlist->id)->get();
|
||||
$playlistTorrents = Torrent::whereRelation('playlists', 'playlist_id', '=', $playlist->id)->get();
|
||||
|
||||
if ($zipArchive->open($path.'/'.$zipFileName, ZipArchive::CREATE) === true) {
|
||||
$failCSV = '"Name","URL","ID"';
|
||||
$failCount = 0;
|
||||
if ($zipArchive->open($path.$zipFileName, ZipArchive::CREATE | ZipArchive::OVERWRITE) === true) {
|
||||
$announceUrl = route('announce', ['passkey' => $user->passkey]);
|
||||
|
||||
foreach ($playlistTorrents as $playlistTorrent) {
|
||||
// Get Torrent
|
||||
$torrent = Torrent::withAnyStatus()->find($playlistTorrent->torrent_id);
|
||||
foreach ($playlistTorrents as $torrent) {
|
||||
$dict = Bencode::bdecode(file_get_contents(getcwd().'/files/torrents/'.$torrent->file_name));
|
||||
|
||||
// Define The Torrent Filename
|
||||
$tmpFileName = sprintf('%s.torrent', Str::slug($torrent->title));
|
||||
// Set the announce key and add the user passkey
|
||||
$dict['announce'] = $announceUrl;
|
||||
|
||||
// The Torrent File Exist?
|
||||
if (! file_exists(getcwd().'/files/torrents/'.$torrent->file_name)) {
|
||||
$failCSV .= '"'.$torrent->name.'","'.route('torrent', ['id' => $torrent->id]).'","'.$torrent->id.'"
|
||||
';
|
||||
$failCount++;
|
||||
// Set link to torrent as the comment
|
||||
if (config('torrent.comment')) {
|
||||
$dict['comment'] = config('torrent.comment').'. '.route('torrent', ['id' => $torrent->id]);
|
||||
} else {
|
||||
// Delete The Last Torrent Tmp File If Exist
|
||||
if (file_exists(getcwd().'/files/tmp/'.$tmpFileName)) {
|
||||
unlink(getcwd().'/files/tmp/'.$tmpFileName);
|
||||
}
|
||||
|
||||
// Get The Content Of The Torrent
|
||||
$dict = Bencode::bdecode(file_get_contents(getcwd().'/files/torrents/'.$torrent->file_name));
|
||||
// Set the announce key and add the user passkey
|
||||
$dict['announce'] = route('announce', ['passkey' => $user->passkey]);
|
||||
// Remove Other announce url
|
||||
unset($dict['announce-list']);
|
||||
|
||||
$fileToDownload = Bencode::bencode($dict);
|
||||
file_put_contents(getcwd().'/files/tmp/'.$tmpFileName, $fileToDownload);
|
||||
|
||||
// Add Files To ZipArchive
|
||||
$zipArchive->addFile(getcwd().'/files/tmp/'.$tmpFileName, $tmpFileName);
|
||||
$dict['comment'] = route('torrent', ['id' => $torrent->id]);
|
||||
}
|
||||
|
||||
$fileToDownload = Bencode::bencode($dict);
|
||||
|
||||
$filename = str_replace([' ', '/', '\\'], ['.', '-', '-'], '['.config('torrent.source').']'.$torrent->name.'.torrent');
|
||||
|
||||
$zipArchive->addFromString($filename, $fileToDownload);
|
||||
}
|
||||
|
||||
if ($failCount > 0) {
|
||||
$CSVtmpName = sprintf('%s.zip', $playlist->name).'-missingTorrentFiles.CSV';
|
||||
file_put_contents(getcwd().'/files/tmp/'.$CSVtmpName, $failCSV);
|
||||
$zipArchive->addFile(getcwd().'/files/tmp/'.$CSVtmpName, 'missingTorrentFiles.CSV');
|
||||
}
|
||||
|
||||
// Close ZipArchive
|
||||
$zipArchive->close();
|
||||
}
|
||||
|
||||
$zipFile = $path.'/'.$zipFileName;
|
||||
|
||||
if (file_exists($zipFile)) {
|
||||
return response()->download($zipFile)->deleteFileAfterSend(true);
|
||||
}
|
||||
if (file_exists($path.$zipFileName)) {
|
||||
return response()->download($path.$zipFileName)->deleteFileAfterSend(true);
|
||||
}
|
||||
|
||||
return redirect()->back()->withErrors(trans('common.something-went-wrong'));
|
||||
|
||||
@@ -148,7 +148,7 @@ class PostController extends Controller
|
||||
$category = $forum->getCategory();
|
||||
$post = Post::findOrFail($postId);
|
||||
|
||||
return view('forum.post_edit', [
|
||||
return view('forum.post.edit', [
|
||||
'topic' => $topic,
|
||||
'forum' => $forum,
|
||||
'post' => $post,
|
||||
|
||||
@@ -59,7 +59,7 @@ class ForumController extends Controller
|
||||
['slug' => Str::slug($request->title)]
|
||||
+ $request->safe()->only(
|
||||
[
|
||||
'title',
|
||||
'name',
|
||||
'position',
|
||||
'description',
|
||||
'parent_id'
|
||||
@@ -123,7 +123,7 @@ class ForumController extends Controller
|
||||
'slug' => Str::slug($request->title),
|
||||
'parent_id' => $request->forum_type === 'category' ? 0 : $request->parent_id,
|
||||
]
|
||||
+ $request->safe()->only(['title', 'position', 'description'])
|
||||
+ $request->safe()->only(['name', 'position', 'description'])
|
||||
);
|
||||
|
||||
// Permissions
|
||||
|
||||
@@ -29,7 +29,6 @@ use App\Models\Forum;
|
||||
use App\Models\Post;
|
||||
use App\Models\Topic;
|
||||
use App\Repositories\ChatRepository;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Http\Request;
|
||||
use Exception;
|
||||
|
||||
@@ -48,7 +47,7 @@ class TopicController extends Controller
|
||||
/**
|
||||
* Show The Topic.
|
||||
*/
|
||||
public function topic(int $id, string $page = '', string $post = ''): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse
|
||||
public function topic(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse
|
||||
{
|
||||
// Find the topic
|
||||
$topic = Topic::findOrFail($id);
|
||||
@@ -56,22 +55,8 @@ class TopicController extends Controller
|
||||
// Get the forum of the topic
|
||||
$forum = $topic->forum;
|
||||
|
||||
// Get The category of the forum
|
||||
$category = Forum::findOrFail($forum->id);
|
||||
|
||||
// Get all posts
|
||||
$posts = $topic->posts()->with(['user', 'user.group', 'user.topics', 'user.posts', 'topic', 'tips'])
|
||||
->withCount(['likes' => function (Builder $query): void {
|
||||
$query->where('like', '=', 1);
|
||||
}, 'likes as dislikes_count' => function (Builder $query): void {
|
||||
$query->where('dislike', '=', 1);
|
||||
}])->paginate(25);
|
||||
|
||||
// First post
|
||||
$firstPost = Post::with('tips')->where('topic_id', '=', $topic->id)->first();
|
||||
|
||||
// The user can post a topic here ?
|
||||
if (! $category->getPermission()->read_topic) {
|
||||
if (! $forum->getPermission()->read_topic) {
|
||||
// Redirect him to the forum index
|
||||
return to_route('forums.index')
|
||||
->withErrors('You Do Not Have Access To Read This Topic!');
|
||||
@@ -81,12 +66,9 @@ class TopicController extends Controller
|
||||
$topic->views++;
|
||||
$topic->save();
|
||||
|
||||
return view('forum.topic', [
|
||||
'topic' => $topic,
|
||||
'forum' => $forum,
|
||||
'category' => $category,
|
||||
'posts' => $posts,
|
||||
'firstPost' => $firstPost,
|
||||
return view('forum.topic.show', [
|
||||
'topic' => $topic,
|
||||
'forum' => $forum,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -104,7 +86,7 @@ class TopicController extends Controller
|
||||
->withErrors('You Cannot Start A New Topic Here!');
|
||||
}
|
||||
|
||||
return view('forum.new_topic', [
|
||||
return view('forum.forum_topic.create', [
|
||||
'forum' => $forum,
|
||||
'category' => $category,
|
||||
'title' => $request->input('title'),
|
||||
@@ -221,7 +203,7 @@ class TopicController extends Controller
|
||||
$topic = Topic::findOrFail($id);
|
||||
$categories = Forum::where('parent_id', '!=', 0)->get();
|
||||
|
||||
return view('forum.edit_topic', ['topic' => $topic, 'categories' => $categories]);
|
||||
return view('forum.topic.edit', ['topic' => $topic, 'categories' => $categories]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -423,7 +423,7 @@ class TorrentController extends Controller
|
||||
|
||||
$previewContent = $joyPixel->toImage(
|
||||
$linkify->linky(
|
||||
$bbcode->parse($request->input('description'), true)
|
||||
$bbcode->parse($request->input('description'))
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -84,9 +84,6 @@ class TorrentDownloadController extends Controller
|
||||
// Set the announce key and add the user passkey
|
||||
$dict['announce'] = route('announce', ['passkey' => $user->passkey]);
|
||||
|
||||
// Remove multi-tracker announce url possibly still stored by legacy upload system
|
||||
unset($dict['announce-list']);
|
||||
|
||||
// Set link to torrent as the comment
|
||||
if (config('torrent.comment')) {
|
||||
$dict['comment'] = config('torrent.comment').'. '.route('torrent', ['id' => $id]);
|
||||
|
||||
@@ -15,12 +15,10 @@ namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Helpers\Bencode;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\History;
|
||||
use App\Models\Torrent;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
use ZipArchive;
|
||||
|
||||
class TorrentZipController extends Controller
|
||||
@@ -45,72 +43,50 @@ class TorrentZipController extends Controller
|
||||
}
|
||||
|
||||
// Zip File Name
|
||||
$zipFileName = sprintf('%s.zip', $user->username);
|
||||
$zipFileName = $user->username.'.zip';
|
||||
|
||||
// Create ZipArchive Obj
|
||||
$zipArchive = new ZipArchive();
|
||||
|
||||
// Get Users History
|
||||
$historyTorrents = History::whereHas('torrent')
|
||||
->where('user_id', '=', $user->id)
|
||||
->pluck('torrent_id');
|
||||
$historyTorrents = Torrent::whereRelation('history', 'user_id', '=', $user->id)->get();
|
||||
|
||||
if ($zipArchive->open($zipPath.'/'.$zipFileName, ZipArchive::CREATE | ZipArchive::OVERWRITE) === true) {
|
||||
// Match History Results To Torrents
|
||||
$failCSV = '"Name","URL","ID","info_hash"
|
||||
';
|
||||
$failCount = 0;
|
||||
foreach ($historyTorrents as $historyTorrent) {
|
||||
// Get Torrent
|
||||
$torrent = Torrent::withAnyStatus()
|
||||
->where('id', '=', $historyTorrent)
|
||||
->first();
|
||||
if ($zipArchive->open($zipPath.$zipFileName, ZipArchive::CREATE | ZipArchive::OVERWRITE) === true) {
|
||||
$announceUrl = route('announce', ['passkey' => $user->passkey]);
|
||||
|
||||
// Define The Torrent Filename
|
||||
$tmpFileName = sprintf('%s.torrent', Str::slug($torrent->name));
|
||||
foreach ($historyTorrents as $torrent) {
|
||||
if (file_exists(getcwd().'/files/torrents/'.$torrent->file_name)) {
|
||||
$dict = Bencode::bdecode(file_get_contents(getcwd().'/files/torrents/'.$torrent->file_name));
|
||||
|
||||
// The Torrent File Exist?
|
||||
if (! file_exists(getcwd().'/files/torrents/'.$torrent->file_name)) {
|
||||
$failCSV .= '"'.$torrent->name.'","'.route('torrent', ['id' => $torrent->id]).'","'.$torrent->id.'","'.$torrent->info_hash.'"
|
||||
';
|
||||
$failCount++;
|
||||
} else {
|
||||
// Delete The Last Torrent Tmp File If Exist
|
||||
if (file_exists(getcwd().'/files/tmp/'.$tmpFileName)) {
|
||||
unlink(getcwd().'/files/tmp/'.$tmpFileName);
|
||||
// Set the announce key and add the user passkey
|
||||
$dict['announce'] = $announceUrl;
|
||||
|
||||
// Set link to torrent as the comment
|
||||
if (config('torrent.comment')) {
|
||||
$dict['comment'] = config('torrent.comment').'. '.route('torrent', ['id' => $torrent->id]);
|
||||
} else {
|
||||
$dict['comment'] = route('torrent', ['id' => $torrent->id]);
|
||||
}
|
||||
|
||||
// Get The Content Of The Torrent
|
||||
$dict = Bencode::bdecode(file_get_contents(getcwd().'/files/torrents/'.$torrent->file_name));
|
||||
// Set the announce key and add the user passkey
|
||||
$dict['announce'] = route('announce', ['passkey' => $user->passkey]);
|
||||
// Remove Other announce url
|
||||
unset($dict['announce-list']);
|
||||
|
||||
$fileToDownload = Bencode::bencode($dict);
|
||||
file_put_contents(getcwd().'/files/tmp/'.$tmpFileName, $fileToDownload);
|
||||
|
||||
// Add Files To ZipArchive
|
||||
$zipArchive->addFile(getcwd().'/files/tmp/'.$tmpFileName, $tmpFileName);
|
||||
$filename = str_replace(
|
||||
[' ', '/', '\\'],
|
||||
['.', '-', '-'],
|
||||
'['.config('torrent.source').']'.$torrent->name.'.torrent'
|
||||
);
|
||||
|
||||
$zipArchive->addFromString($filename, $fileToDownload);
|
||||
}
|
||||
}
|
||||
|
||||
if ($failCount > 0) {
|
||||
$CSVtmpName = sprintf('%s.zip', $user->username).'-missingTorrentFiles.CSV';
|
||||
file_put_contents(getcwd().'/files/tmp/'.$CSVtmpName, $failCSV);
|
||||
$zipArchive->addFile(getcwd().'/files/tmp/'.$CSVtmpName, 'missingTorrentFiles.CSV');
|
||||
}
|
||||
|
||||
// Close ZipArchive
|
||||
$zipArchive->close();
|
||||
}
|
||||
|
||||
$zipFile = $zipPath.'/'.$zipFileName;
|
||||
|
||||
if (file_exists($zipFile)) {
|
||||
return response()->download($zipFile)->deleteFileAfterSend(true);
|
||||
if (file_exists($zipPath.$zipFileName)) {
|
||||
return response()->download($zipPath.$zipFileName)->deleteFileAfterSend(true);
|
||||
}
|
||||
|
||||
return redirect()->back()->withErrors('Something Went Wrong!');
|
||||
return redirect()->back()->withErrors(trans('common.something-went-wrong'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Forum;
|
||||
use App\Models\Topic;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class ForumCategoryTopicSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public String $search = '';
|
||||
public String $sortField = 'last_reply_at';
|
||||
public String $sortDirection = 'desc';
|
||||
public String $label = '';
|
||||
public String $state = '';
|
||||
public String $subscribed = '';
|
||||
public Forum $category;
|
||||
|
||||
final public function mount(Forum $category): void
|
||||
{
|
||||
$this->category = $category;
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
}
|
||||
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
->with('user', 'user.group')
|
||||
->whereIn('forum_id', Forum::where('parent_id', '=', $this->category->id)->select('id'))
|
||||
->whereRelation('forumPermissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%'))
|
||||
->when($this->label !== '', fn ($query) => $query->where($this->label, '=', 1))
|
||||
->when($this->state !== '', fn ($query) => $query->where('state', '=', $this->state))
|
||||
->when(
|
||||
$this->subscribed === 'include',
|
||||
fn ($query) => $query
|
||||
->whereRelation('subscribedUsers', 'users.id', '=', auth()->id())
|
||||
)
|
||||
->when(
|
||||
$this->subscribed === 'exclude',
|
||||
fn ($query) => $query
|
||||
->whereDoesntHave('subscribedUsers', fn ($query) => $query->where('users.id', '=', auth()->id()))
|
||||
)
|
||||
->orderByDesc('pinned')
|
||||
->orderBy($this->sortField, $this->sortDirection)
|
||||
->paginate(25);
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.forum-category-topic-search', [
|
||||
'topics' => $this->topics,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Forum;
|
||||
use App\Models\Topic;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class ForumTopicSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public String $search = '';
|
||||
public String $sortField = 'last_reply_at';
|
||||
public String $sortDirection = 'desc';
|
||||
public String $label = '';
|
||||
public String $state = '';
|
||||
public String $subscribed = '';
|
||||
public Forum $forum;
|
||||
|
||||
final public function mount(Forum $forum): void
|
||||
{
|
||||
$this->forum = $forum;
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
}
|
||||
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
->with('user', 'user.group')
|
||||
->where('topics.forum_id', '=', $this->forum->id)
|
||||
->whereRelation('forumPermissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%'))
|
||||
->when($this->label !== '', fn ($query) => $query->where($this->label, '=', 1))
|
||||
->when($this->state !== '', fn ($query) => $query->where('state', '=', $this->state))
|
||||
->when(
|
||||
$this->subscribed === 'include',
|
||||
fn ($query) => $query
|
||||
->whereRelation('subscribedUsers', 'users.id', '=', auth()->id())
|
||||
)
|
||||
->when(
|
||||
$this->subscribed === 'exclude',
|
||||
fn ($query) => $query
|
||||
->whereDoesntHave('subscribedUsers', fn ($query) => $query->where('users.id', '=', auth()->id()))
|
||||
)
|
||||
->orderByDesc('pinned')
|
||||
->orderBy($this->sortField, $this->sortDirection)
|
||||
->paginate(25);
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.forum-topic-search', [
|
||||
'topics' => $this->topics,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Post;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class PostSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public String $search = '';
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
}
|
||||
|
||||
final public function getPostsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Post::query()
|
||||
->select('posts.*')
|
||||
->with('user', 'user.group', 'user.topics', 'user.posts', 'topic', 'tips')
|
||||
->withCount([
|
||||
'likes' => fn ($query) => $query->where('like', '=', 1),
|
||||
'likes as dislike_count' => fn ($query) => $query->where('dislike', '=', 1),
|
||||
])
|
||||
->join('topics', 'topics.id', '=', 'posts.topic_id')
|
||||
->join(
|
||||
'permissions',
|
||||
fn ($query) => $query
|
||||
->on('permissions.forum_id', '=', 'topics.forum_id')
|
||||
->on('permissions.group_id', '=', DB::raw((int) auth()->user()->group->id))
|
||||
->on('permissions.show_forum', '=', DB::raw(1))
|
||||
->on('permissions.read_topic', '=', DB::raw(1))
|
||||
)
|
||||
->when($this->search !== '', fn ($query) => $query->where('content', 'LIKE', '%'.$this->search.'%'))
|
||||
->orderByDesc('created_at')
|
||||
->paginate(25);
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.post-search', [
|
||||
'posts' => $this->posts,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Forum;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class SubscribedForum extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
final public function getForumsProperty()
|
||||
{
|
||||
return Forum::query()
|
||||
->where('parent_id', '!=', 0)
|
||||
->whereRelation('subscribedUsers', 'users.id', '=', auth()->id())
|
||||
->whereRelation('permissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
->orderBy('position')
|
||||
->paginate(25, ['*'], 'subscribedForumsPage');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.subscribed-forum', [
|
||||
'forums' => $this->forums,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Topic;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class SubscribedTopic extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
->with('user', 'user.group')
|
||||
->whereRelation('subscribedUsers', 'users.id', '=', auth()->id())
|
||||
->whereRelation('forumPermissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
->orderBy('last_reply_at')
|
||||
->paginate(25, ['*'], 'subscribedTopicsPage');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.subscribed-topic', [
|
||||
'topics' => $this->topics,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Post;
|
||||
use App\Models\Topic;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class TopicPostSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public String $search = '';
|
||||
|
||||
public Topic $topic;
|
||||
|
||||
final public function mount(Topic $topic): void
|
||||
{
|
||||
$this->topic = $topic;
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
}
|
||||
|
||||
final public function getPostsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Post::query()
|
||||
->select('posts.*')
|
||||
->with('user', 'user.group', 'user.topics', 'user.posts', 'topic', 'tips')
|
||||
->withCount([
|
||||
'likes' => fn ($query) => $query->where('like', '=', 1),
|
||||
'likes as dislike_count' => fn ($query) => $query->where('dislike', '=', 1),
|
||||
])
|
||||
->where('topic_id', '=', $this->topic->id)
|
||||
->join('topics', 'topics.id', '=', 'posts.topic_id')
|
||||
->join(
|
||||
'permissions',
|
||||
fn ($query) => $query
|
||||
->on('permissions.forum_id', '=', 'topics.forum_id')
|
||||
->on('permissions.group_id', '=', DB::raw((int) auth()->user()->group->id))
|
||||
->on('permissions.show_forum', '=', DB::raw(1))
|
||||
->on('permissions.read_topic', '=', DB::raw(1))
|
||||
)
|
||||
->when($this->search !== '', fn ($query) => $query->where('content', 'LIKE', '%'.$this->search.'%'))
|
||||
->orderBy('created_at')
|
||||
->paginate(25);
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.topic-post-search', [
|
||||
'topic' => $this->topic,
|
||||
'posts' => $this->posts,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Forum;
|
||||
use App\Models\Topic;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class TopicSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public String $search = '';
|
||||
public String $sortField = 'last_reply_at';
|
||||
public String $sortDirection = 'desc';
|
||||
public String $label = '';
|
||||
public String $state = '';
|
||||
public String $subscribed = '';
|
||||
public String $forumId = '';
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
}
|
||||
|
||||
final public function getForumCategoriesProperty()
|
||||
{
|
||||
return Forum::query()
|
||||
->with(['forums' => fn ($query) => $query
|
||||
->whereRelation('permissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
])
|
||||
->where('parent_id', '=', 0)
|
||||
->whereRelation('permissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
->orderBy('position')
|
||||
->get();
|
||||
}
|
||||
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
->with('user', 'user.group')
|
||||
->whereRelation('forumPermissions', [['show_forum', '=', 1], ['group_id', '=', auth()->user()->group->id]])
|
||||
->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%'))
|
||||
->when($this->label !== '', fn ($query) => $query->where($this->label, '=', 1))
|
||||
->when($this->state !== '', fn ($query) => $query->where('state', '=', $this->state))
|
||||
->when(
|
||||
$this->subscribed === 'include',
|
||||
fn ($query) => $query
|
||||
->whereRelation('subscribedUsers', 'users.id', '=', auth()->id())
|
||||
)
|
||||
->when(
|
||||
$this->subscribed === 'exclude',
|
||||
fn ($query) => $query
|
||||
->whereDoesntHave('subscribedUsers', fn ($query) => $query->where('users.id', '=', auth()->id()))
|
||||
)
|
||||
->when($this->forumId !== '', fn ($query) => $query->where(
|
||||
fn ($query) => $query
|
||||
->where('forum_id', '=', $this->forumId)
|
||||
->orWhereIn('forum_id', Forum::where('parent_id', '=', $this->forumId)->select('id'))
|
||||
))
|
||||
->orderByDesc('pinned')
|
||||
->orderBy($this->sortField, $this->sortDirection)
|
||||
->paginate(25);
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.topic-search', [
|
||||
'topics' => $this->topics,
|
||||
'forumCategories' => $this->forumCategories,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class StoreForumRequest extends FormRequest
|
||||
'name' => 'required',
|
||||
'position' => 'required',
|
||||
'description' => 'required',
|
||||
'parent_id' => 'sometimes|exists:forums,id',
|
||||
'parent_id' => 'required|integer',
|
||||
'permissions' => 'sometimes|array',
|
||||
'permissions.*' => 'sometimes|exists:groups,id',
|
||||
'permissions.*.show_forum' => 'sometimes|boolean',
|
||||
|
||||
@@ -34,7 +34,7 @@ class UpdateForumRequest extends FormRequest
|
||||
'name' => 'required',
|
||||
'position' => 'required',
|
||||
'description' => 'required',
|
||||
'parent_id' => 'exists:forums,id',
|
||||
'parent_id' => 'required|integer',
|
||||
'permissions' => 'array',
|
||||
'permissions.*' => 'exists:groups,id',
|
||||
'permissions.*.show_forum' => 'boolean',
|
||||
|
||||
@@ -91,6 +91,6 @@ class Article extends Model
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->content, true));
|
||||
return (new Linkify())->linky($bbcode->parse($this->content));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class Comment extends Model
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->content, true));
|
||||
return (new Linkify())->linky($bbcode->parse($this->content));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -92,6 +92,14 @@ class Forum extends Model
|
||||
return $this->hasMany(Permission::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To Many Subscribed Users.
|
||||
*/
|
||||
public function subscribedUsers(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class, Subscription::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify Subscribers Of A Forum When New Topic Is Made.
|
||||
*/
|
||||
|
||||
@@ -80,6 +80,6 @@ class Message extends Model
|
||||
*/
|
||||
public static function getMessageHtml($message): string
|
||||
{
|
||||
return (new Bbcode())->parse($message, true);
|
||||
return (new Bbcode())->parse($message);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-4
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Helpers\BBCodeConverter;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\MarkdownExtra;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
@@ -44,8 +44,6 @@ class Page extends Model
|
||||
*/
|
||||
public function getContentHtml(): ?string
|
||||
{
|
||||
$content = (new BBCodeConverter($this->content))->toMarkdown();
|
||||
|
||||
return (new MarkdownExtra())->text($content);
|
||||
return (new MarkdownExtra())->text((new Bbcode())->parse($this->content, false));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ class Post extends Model
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse(htmlspecialchars_decode($this->content), true));
|
||||
return (new Linkify())->linky($bbcode->parse(htmlspecialchars_decode($this->content)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,6 +69,6 @@ class PrivateMessage extends Model
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->message, true));
|
||||
return (new Linkify())->linky($bbcode->parse($this->message));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,22 @@ class Topic extends Model
|
||||
return $this->hasMany(Subscription::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Has One Permissions through Forum.
|
||||
*/
|
||||
public function forumPermissions(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(Permission::class, 'forum_id', 'forum_id');
|
||||
}
|
||||
/**
|
||||
* Belongs to Many Subscribed Users.
|
||||
*/
|
||||
public function subscribedUsers(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class, Subscription::class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Notify Subscribers Of A Topic When New Post Is Made.
|
||||
*/
|
||||
|
||||
@@ -221,7 +221,7 @@ class Torrent extends Model
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->description, true));
|
||||
return (new Linkify())->linky($bbcode->parse($this->description));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -136,7 +136,7 @@ class TorrentRequest extends Model
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->description, true));
|
||||
return (new Linkify())->linky($bbcode->parse($this->description));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -722,7 +722,7 @@ class User extends Authenticatable
|
||||
{
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->signature, true));
|
||||
return (new Linkify())->linky($bbcode->parse($this->signature));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -744,7 +744,7 @@ class User extends Authenticatable
|
||||
|
||||
$bbcode = new Bbcode();
|
||||
|
||||
return (new Linkify())->linky($bbcode->parse($this->about, true));
|
||||
return (new Linkify())->linky($bbcode->parse($this->about));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use App\Helpers\Bencode;
|
||||
use App\Models\Torrent;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$directory = public_path().'/files/torrents/';
|
||||
|
||||
Torrent::select('file_name')->orderBy('id')->chunk(100, function ($torrents) use ($directory): void {
|
||||
foreach ($torrents as $torrent) {
|
||||
if (file_exists($directory.$torrent->file_name)) {
|
||||
$dict = Bencode::bdecode_file($directory.$torrent->file_name);
|
||||
|
||||
// Whitelisted keys
|
||||
$dict = array_intersect_key($dict, [
|
||||
'announce' => '',
|
||||
'comment' => '',
|
||||
'created by' => '',
|
||||
'encoding' => '',
|
||||
'info' => '',
|
||||
]);
|
||||
|
||||
$dict['announce'] = config('app.url').'/announce/PID';
|
||||
|
||||
$comment = config('torrent.comment', null);
|
||||
if ($comment !== null) {
|
||||
$result['comment'] = $comment;
|
||||
}
|
||||
|
||||
file_put_contents($directory.$torrent->file_name, Bencode::bencode($dict));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -20,6 +20,7 @@
|
||||
@import 'components/achievement';
|
||||
@import 'components/article-preview';
|
||||
@import 'components/bbcode-input';
|
||||
@import 'components/bbcode-rendered';
|
||||
@import 'components/comment';
|
||||
@import 'components/comparison';
|
||||
@import 'components/data-table';
|
||||
|
||||
@@ -0,0 +1,616 @@
|
||||
.bbcode-rendered.bbcode-rendered {
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
word-wrap: break-word;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
color: var(--bbcode-rendered-fg-default);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
||||
|
||||
> * {
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
word-wrap: break-word;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
* {
|
||||
color: var(--bbcode-rendered-fg-default);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
||||
}
|
||||
|
||||
br:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
margin: 0;
|
||||
background-color: var(--bbcode-rendered-canvas-default);
|
||||
|
||||
figcaption,
|
||||
figure {
|
||||
display: block;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
color: var(--bbcode-rendered-accent-fg);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0.67em 0;
|
||||
font-weight: 600;
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid var(--bbcode-rendered-border-muted);
|
||||
}
|
||||
|
||||
mark {
|
||||
background-color: var(--bbcode-rendered-attention-subtle);
|
||||
color: var(--bbcode-rendered-text-primary);
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
max-width: 100%;
|
||||
box-sizing: content-box;
|
||||
background-color: var(--bbcode-rendered-canvas-default);
|
||||
}
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border-bottom: 1px solid var(--bbcode-rendered-border-muted);
|
||||
height: 0.25em;
|
||||
padding: 0;
|
||||
margin: 24px 0;
|
||||
background-color: var(--bbcode-rendered-border-default);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
input {
|
||||
font: inherit;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: inherit;
|
||||
opacity: 0.54;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
hr::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
hr::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
display: block;
|
||||
width: max-content;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
details summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
details:not([open]) > *:not(summary) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas,
|
||||
Liberation Mono, monospace;
|
||||
line-height: 10px;
|
||||
color: var(--bbcode-rendered-fg-default);
|
||||
vertical-align: middle;
|
||||
background-color: var(--bbcode-rendered-canvas-subtle);
|
||||
border: solid 1px var(--bbcode-rendered-neutral-muted);
|
||||
border-bottom-color: var(--bbcode-rendered-neutral-muted);
|
||||
border-radius: 6px;
|
||||
box-shadow: inset 0 -1px 0 var(--bbcode-rendered-neutral-muted);
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: 600;
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 1.5em;
|
||||
border-bottom: 1px solid var(--bbcode-rendered-border-muted);
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: 600;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-weight: 600;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-weight: 600;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-weight: 600;
|
||||
font-size: 0.85em;
|
||||
color: var(--bbcode-rendered-fg-muted);
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0;
|
||||
padding: 0.25em 0 0.25em 1em;
|
||||
color: var(--bbcode-rendered-fg-muted);
|
||||
border-left: 0.25em solid var(--bbcode-rendered-border-default);
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
ul ul ol,
|
||||
ul ol ol,
|
||||
ol ul ol,
|
||||
ol ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
tt,
|
||||
code {
|
||||
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas,
|
||||
Liberation Mono, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: var(--bbcode-rendered-neutral-muted);
|
||||
border: revert;
|
||||
border-radius: 6px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas,
|
||||
Liberation Mono, monospace;
|
||||
font-size: 12px;
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: var(--bbcode-rendered-fg-subtle);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
margin: 0;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
&::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
> *:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
> *:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
a:not([href]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p,
|
||||
blockquote,
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
table,
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
blockquote > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
blockquote > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
details {
|
||||
padding: 0 6px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 2px;
|
||||
display: inline;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
sup > a::before {
|
||||
content: "[";
|
||||
}
|
||||
|
||||
sup > a::after {
|
||||
content: "]";
|
||||
}
|
||||
|
||||
h1 tt,
|
||||
h1 code,
|
||||
h2 tt,
|
||||
h2 code,
|
||||
h3 tt,
|
||||
h3 code,
|
||||
h4 tt,
|
||||
h4 code,
|
||||
h5 tt,
|
||||
h5 code,
|
||||
h6 tt,
|
||||
h6 code {
|
||||
padding: 0 0.2em;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
ol[type="1"] {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
ol[type="a"] {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
ol[type="i"] {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
div > ol:not([type]) {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
ul ul,
|
||||
ul ol,
|
||||
ol ol,
|
||||
ol ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
li > p {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
li + li {
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
|
||||
dl {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
padding: 0;
|
||||
margin-top: 16px;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
border: revert !important;
|
||||
padding: 6px 13px;
|
||||
background-color: var(--bbcode-rendered-canvas-default);
|
||||
border: 1px solid var(--bbcode-rendered-border-default) !important;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border: revert;
|
||||
background-color: var(--bbcode-rendered-canvas-default) !important;
|
||||
border-top: 1px solid var(--bbcode-rendered-border-muted);
|
||||
}
|
||||
|
||||
table tr:nth-child(2n),
|
||||
table tr:nth-child(2n) td {
|
||||
background-color: var(--bbcode-rendered-canvas-subtle);
|
||||
}
|
||||
|
||||
table img {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
img[align="right"] {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
img[align="left"] {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
code,
|
||||
tt {
|
||||
padding: 0.2em 0.4em;
|
||||
margin: 0;
|
||||
font-size: 85%;
|
||||
background-color: var(--bbcode-rendered-neutral-muted);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
del code {
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
pre code {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
pre > code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
word-break: normal;
|
||||
white-space: pre-wrap;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
pre code,
|
||||
pre tt {
|
||||
display: inline;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
line-height: inherit;
|
||||
word-wrap: normal;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: visible;
|
||||
line-height: inherit;
|
||||
word-wrap: normal;
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.footnotes {
|
||||
font-size: 12px;
|
||||
color: var(--bbcode-rendered-fg-muted);
|
||||
border-top: 1px solid var(--bbcode-rendered-border-default);
|
||||
}
|
||||
|
||||
.footnotes ol {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.footnotes li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.footnotes li:target::before {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: -8px;
|
||||
bottom: -8px;
|
||||
left: -24px;
|
||||
pointer-events: none;
|
||||
content: "";
|
||||
border: 2px solid var(--bbcode-rendered-accent-emphasis);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.footnotes li:target {
|
||||
color: var(--bbcode-rendered-fg-default);
|
||||
}
|
||||
|
||||
.footnotes .footnote-backref {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
::-webkit-calendar-picker-indicator {
|
||||
filter: invert(50%);
|
||||
}
|
||||
|
||||
.bbcode-rendered__alert {
|
||||
border-radius: 5px;
|
||||
padding: 8px;
|
||||
border: 2px solid var(--bbcode-rendered-danger-fg);
|
||||
}
|
||||
|
||||
.bbcode-rendered__alert::before {
|
||||
content: 'Alert: ';
|
||||
color: var(--bbcode-rendered-danger-fg);
|
||||
display: inline-block;
|
||||
padding-right: 1ch;
|
||||
}
|
||||
|
||||
.bbcode-rendered__note {
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
border: 2px solid var(--bbcode-rendered-attention-subtle);
|
||||
}
|
||||
|
||||
.bbcode-rendered__note::before {
|
||||
content: 'Note: ';
|
||||
color: var(--bbcode-rendered-attention-subtle);
|
||||
display: inline-block;
|
||||
padding-right: 1ch;
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,15 @@
|
||||
border-radius: var(--dialog-border-radius);
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
max-height: calc(100% - 12px);
|
||||
max-height: calc(100vh - 12px);
|
||||
overflow-y: auto;
|
||||
width: 500px;
|
||||
max-width: calc(100% - 12px);
|
||||
position: absolute;
|
||||
left: calc(50% - min(500px / 2, (100% - 12px) / 2));
|
||||
right: calc(50% - min(500px / 2, (100% - 12px) / 2));
|
||||
max-width: calc(100vw - 12px);
|
||||
position: fixed;
|
||||
left: calc(50vw - min(500px / 2, (100vw - 12px) / 2));
|
||||
right: calc(50vw - min(500px / 2, (100vw - 12px) / 2));
|
||||
top: calc(50vh - (100vh - 12px) / 2);
|
||||
bottom: calc(50vh - (100vh - 12px) / 2);
|
||||
}
|
||||
|
||||
.dialog::backdrop {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
'aside header'
|
||||
'aside content'
|
||||
'aside footer';
|
||||
grid-template-columns: 153px 1fr;
|
||||
grid-template-columns: 153px minmax(0, 1fr);
|
||||
grid-template-rows: auto 1fr auto;
|
||||
border-radius: 5px;
|
||||
box-shadow: var(--post-shadow);
|
||||
|
||||
@@ -22,6 +22,19 @@
|
||||
--bbcode-input-border: 1px solid #555;
|
||||
--bbcode-input-border-radius: 5px;
|
||||
|
||||
--bbcode-rendered-fg-default: #24292f;
|
||||
--bbcode-rendered-fg-muted: #57606a;
|
||||
--bbcode-rendered-fg-subtle: #667788;
|
||||
--bbcode-rendered-canvas-default: transparent;
|
||||
--bbcode-rendered-canvas-subtle: #ececec;
|
||||
--bbcode-rendered-border-default: #bebebe;
|
||||
--bbcode-rendered-border-muted: #babbbd;
|
||||
--bbcode-rendered-neutral-muted: #aeb3b833;
|
||||
--bbcode-rendered-accent-fg: #0969da;
|
||||
--bbcode-rendered-accent-emphasis: #0969da;
|
||||
--bbcode-rendered-attention-subtle: #7289da;
|
||||
--bbcode-rendered-danger-fg: #ff141ccc;
|
||||
|
||||
--button-filled-bg: #5cb579 linear-gradient(to bottom right, #0ba360, #2bb673);
|
||||
--button-filled-border: none;
|
||||
--button-filled-border-radius: 9999px;
|
||||
@@ -9158,72 +9171,6 @@ section.tall_categories div.category.anime span {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
// BBCode Style
|
||||
.bbcode-quote {
|
||||
background: #ebeaec;
|
||||
padding: 10px;
|
||||
margin: 0 0 15px 15px;
|
||||
border-radius: 3px;
|
||||
font-size: 14px !important;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.bbcode-quote-head {
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.bbcode-quote-date {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.bbcode-code {
|
||||
background: lightgray;
|
||||
padding: 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.bbcode-alert {
|
||||
background: rgba(255, 20, 28, 0.8);
|
||||
padding: 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.bbcode-note {
|
||||
background: #7289da;
|
||||
padding: 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.spoiler-content {
|
||||
margin: 0;
|
||||
padding: 0 15px;
|
||||
border: 1px solid #ddd;
|
||||
position: relative;
|
||||
background: #efefef;
|
||||
}
|
||||
|
||||
.spoiler-button {
|
||||
background: #aa65c7;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 3px 0 0 #883da7;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
transition: background 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
.spoiler-button:before {
|
||||
color: #375a7f;
|
||||
content: '\25BA ';
|
||||
}
|
||||
|
||||
.image {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
|
||||
@@ -14,6 +14,19 @@
|
||||
--bbcode-input-border: 1px solid #555;
|
||||
--bbcode-input-border-radius: 5px;
|
||||
|
||||
--bbcode-rendered-fg-default: #c9d1d9;
|
||||
--bbcode-rendered-fg-muted: #8b949e;
|
||||
--bbcode-rendered-fg-subtle: #484f58;
|
||||
--bbcode-rendered-canvas-default: transparent;
|
||||
--bbcode-rendered-canvas-subtle: #313131;
|
||||
--bbcode-rendered-border-default: #3c3d3d;
|
||||
--bbcode-rendered-border-muted: #464749;
|
||||
--bbcode-rendered-neutral-muted: #46484b66;
|
||||
--bbcode-rendered-accent-fg: #949494;
|
||||
--bbcode-rendered-accent-emphasis: #a0a0a0;
|
||||
--bbcode-rendered-attention-subtle: #7289da;
|
||||
--bbcode-rendered-danger-fg: #ff141ccc;
|
||||
|
||||
--button-filled-bg: #444;
|
||||
--button-filled-border: none;
|
||||
--button-filled-border-radius: 9999px;
|
||||
|
||||
@@ -37,6 +37,19 @@
|
||||
--bbcode-input-border: 1px solid #555;
|
||||
--bbcode-input-border-radius: 5px;
|
||||
|
||||
--bbcode-rendered-fg-default: #c9d1d9;
|
||||
--bbcode-rendered-fg-muted: #8b949e;
|
||||
--bbcode-rendered-fg-subtle: #484f58;
|
||||
--bbcode-rendered-canvas-default: transparent;
|
||||
--bbcode-rendered-canvas-subtle: #313131;
|
||||
--bbcode-rendered-border-default: #3c3d3d;
|
||||
--bbcode-rendered-border-muted: #464749;
|
||||
--bbcode-rendered-neutral-muted: #46484b66;
|
||||
--bbcode-rendered-accent-fg: #58a6ff;
|
||||
--bbcode-rendered-accent-emphasis: #2260be;
|
||||
--bbcode-rendered-attention-subtle: #7289da;
|
||||
--bbcode-rendered-danger-fg: #ff141ccc;
|
||||
|
||||
--button-filled-bg: var(--color-green);
|
||||
--button-filled-border: none;
|
||||
--button-filled-border-radius: 9999px;
|
||||
|
||||
@@ -100,14 +100,14 @@
|
||||
@else
|
||||
<h2 class="panel__heading">{{ __('common.action') }}</h2>
|
||||
<div class="panel__body">
|
||||
<div x-data="{ open: false }">
|
||||
<div>
|
||||
<p class="form__group form__group--horizontal">
|
||||
<button class="form__button form__button--filled" x-on:click.stop="open = true; $refs.dialog.showModal();">
|
||||
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
|
||||
<i class="{{ config('other.font-awesome') }} fa-check"></i>
|
||||
{{ __('request.approve') }}
|
||||
</button>
|
||||
</p>
|
||||
<dialog class="dialog" x-ref="dialog" x-show="open" x-cloak>
|
||||
<dialog class="dialog" x-ref="dialog">
|
||||
<h3 class="dialog__heading">
|
||||
{{ __('request.approve') }}
|
||||
{{ __('common.this') }}
|
||||
@@ -117,7 +117,7 @@
|
||||
class="dialog__form"
|
||||
method="POST"
|
||||
action="{{ route('staff.applications.approve', ['id' => $application->id]) }}"
|
||||
x-on:click.outside="open = false; $refs.dialog.close();"
|
||||
x-on:click.outside="$refs.dialog.close()"
|
||||
>
|
||||
@csrf
|
||||
<input
|
||||
@@ -134,21 +134,21 @@
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('request.approve') }}
|
||||
</button>
|
||||
<button x-on:click.prevent="open = false; $refs.dialog.close();" class="form__button form__button--outlined">
|
||||
<button formmethod="dialog" formnovalidate class="form__button form__button--outlined">
|
||||
{{ __('common.cancel') }}
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
<div x-data="{ open: false }">
|
||||
<div x-data>
|
||||
<p class="form__group form__group--horizontal">
|
||||
<button class="form__button form__button--filled" x-on:click.stop="open = true; $refs.dialog.showModal();">
|
||||
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
|
||||
<i class="{{ config('other.font-awesome') }} fa-times"></i>
|
||||
{{ __('request.reject') }}
|
||||
</button>
|
||||
</p>
|
||||
<dialog class="dialog" x-ref="dialog" x-show="open" x-cloak>
|
||||
<dialog class="dialog" x-ref="dialog">
|
||||
<h3 class="dialog__heading">
|
||||
{{ __('request.reject') }}
|
||||
{{ __('common.this') }}
|
||||
@@ -158,7 +158,7 @@
|
||||
class="dialog__form"
|
||||
method="POST"
|
||||
action="{{ route('staff.applications.reject', ['id' => $application->id]) }}"
|
||||
x-on:click.outside="open = false; $refs.dialog.close();"
|
||||
x-on:click.outside="$refs.dialog.close()"
|
||||
>
|
||||
@csrf
|
||||
<input
|
||||
@@ -180,7 +180,7 @@
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('request.reject') }}
|
||||
</button>
|
||||
<button x-on:click.prevent="open = false; $refs.dialog.close();" class="form__button form__button--outlined">
|
||||
<button formmethod="dialog" formnovalidate class="form__button form__button--outlined">
|
||||
{{ __('common.cancel') }}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<li class="data-table__action" x-data="{ open: false }">
|
||||
<button class="form__button form__button--filled" x-on:click.stop="open = true; $refs.dialog.showModal();">
|
||||
<li class="data-table__action" x-data>
|
||||
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-down"></i>
|
||||
{{ __('common.delete') }}
|
||||
</button>
|
||||
<dialog class="dialog" x-ref="dialog" x-show="open" x-cloak>
|
||||
<dialog class="dialog" x-ref="dialog">
|
||||
<h4 class="dialog__heading">
|
||||
{{ __('common.delete') }} {{ __('torrent.torrent') }}: {{ $torrent->name }}
|
||||
</h4>
|
||||
@@ -11,7 +11,7 @@
|
||||
class="dialog__form"
|
||||
method="POST"
|
||||
action="{{ route('delete') }}"
|
||||
x-on:click.outside="open = false; $refs.dialog.close();"
|
||||
x-on:click.outside="$refs.dialog.close()"
|
||||
>
|
||||
@csrf
|
||||
<p class="form__group">
|
||||
@@ -26,7 +26,7 @@
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.delete') }}
|
||||
</button>
|
||||
<button x-on:click.prevent="open = false; $refs.dialog.close();" class="form__button form__button--outlined">
|
||||
<button formmethod="dialog" formnovalidate class="form__button form__button--outlined">
|
||||
{{ __('common.cancel') }}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<li class="data-table__action" x-data="{ open: false }">
|
||||
<button class="form__button form__button--filled" x-on:click.stop="open = true; $refs.dialog.showModal();">
|
||||
<li class="data-table__action" x-data>
|
||||
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
|
||||
<i class="{{ config('other.font-awesome') }} fa-pause"></i>
|
||||
{{ __('common.moderation-postpone') }}
|
||||
</button>
|
||||
<dialog class="dialog" x-ref="dialog" x-show="open" x-cloak>
|
||||
<dialog class="dialog" x-ref="dialog">
|
||||
<h4 class="dialog__heading">
|
||||
{{ __('common.moderation-postpone') }} {{ __('torrent.torrent') }}: {{ $torrent->name }}
|
||||
</h4>
|
||||
@@ -11,7 +11,7 @@
|
||||
class="dialog__form"
|
||||
method="POST"
|
||||
action="{{ route('staff.moderation.update', ['id' => $torrent->id]) }}"
|
||||
x-on:click.outside="open = false; $refs.dialog.close();"
|
||||
x-on:click.outside="$refs.dialog.close()"
|
||||
>
|
||||
@csrf
|
||||
<input type="hidden" name="type" value="{{ __('torrent.torrent') }}">
|
||||
@@ -26,7 +26,7 @@
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.moderation-postpone') }}
|
||||
</button>
|
||||
<button class="form__button form__button--outlined" x-on:click.prevent="open = false; $refs.dialog.close()">
|
||||
<button formmethod="dialog" formnovalidate class="form__button form__button--outlined">
|
||||
{{ __('common.cancel') }}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<li class="data-table__action" x-data="{ open: false }">
|
||||
<button class="form__button form__button--filled" x-on:click.stop="open = true; $refs.dialog.showModal();">
|
||||
<li class="data-table__action" x-data>
|
||||
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-down"></i>
|
||||
{{ __('common.moderation-reject') }}
|
||||
</button>
|
||||
<dialog class="dialog" x-ref="dialog" x-show="open" x-cloak>
|
||||
<dialog class="dialog" x-ref="dialog">
|
||||
<h3 class="dialog__heading">
|
||||
{{ __('common.moderation-reject') }} {{ __('torrent.torrent') }}: {{ $torrent->name }}
|
||||
</h3>
|
||||
@@ -11,7 +11,7 @@
|
||||
class="dialog__form"
|
||||
method="POST"
|
||||
action="{{ route("staff.moderation.update", ['id' => $torrent->id]) }}"
|
||||
x-on:click.outside="open = false; $refs.dialog.close();"
|
||||
x-on:click.outside="$refs.dialog.close()"
|
||||
>
|
||||
@csrf
|
||||
<input id="type" type="hidden" name="type" value="{{ __('torrent.torrent') }}">
|
||||
@@ -26,7 +26,7 @@
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.moderation-reject') }}
|
||||
</button>
|
||||
<button x-on:click.prevent="open = false; $refs.dialog.close();" class="form__button form__button--outlined">
|
||||
<button formmethod="dialog" formnovalidate class="form__button form__button--outlined">
|
||||
{{ __('common.cancel') }}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
{{ __('common.edit') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="data-table__action" x-data="{ open: false }">
|
||||
<button class="form__button form__button--text" x-on:click.stop="open = true; $refs.dialog.showModal();">
|
||||
<li class="data-table__action" x-data>
|
||||
<button class="form__button form__button--text" x-on:click.stop="$refs.dialog.showModal()">
|
||||
{{ __('common.delete') }}
|
||||
</button>
|
||||
<dialog class="dialog" x-ref="dialog">
|
||||
@@ -66,7 +66,7 @@
|
||||
class="dialog__form"
|
||||
method="POST"
|
||||
action="{{ route('staff.regions.destroy', ['id' => $region->id]) }}"
|
||||
x-on:click.outside="open = false; $refs.dialog.close();"
|
||||
x-on:click.outside="$refs.dialog.close()"
|
||||
>
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
@@ -97,7 +97,7 @@
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.delete') }}
|
||||
</button>
|
||||
<button class="form__button form__button--outlined" x-on:click.prevent="open = false; $refs.dialog.close();">
|
||||
<button formmethod="dialog" formnovalidate class="form__button form__button--outlined">
|
||||
{{ __('common.cancel') }}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@@ -49,7 +49,5 @@
|
||||
</a>
|
||||
</article>
|
||||
@endforeach
|
||||
<div class="text-center">
|
||||
{{ $articles->links() }}
|
||||
</div>
|
||||
{{ $articles->links('partials.pagination') }}
|
||||
@endsection
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</time>
|
||||
</div>
|
||||
</header>
|
||||
<div class="panel__body">
|
||||
<div class="panel__body bbcode-rendered">
|
||||
@joypixels($article->getContentHtml())
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -87,10 +87,10 @@
|
||||
</form>
|
||||
</li>
|
||||
<li class="post__toolbar-item">
|
||||
@livewire('like-button', ['post' => $post->id])
|
||||
@livewire('like-button', ['post' => $post->id], key('like-'.$post->id))
|
||||
</li>
|
||||
<li class="post__toolbar-item">
|
||||
@livewire('dislike-button', ['post' => $post->id])
|
||||
@livewire('dislike-button', ['post' => $post->id], key('dislike-'.$post->id))
|
||||
</li>
|
||||
<li class="post__toolbar-item">
|
||||
<a
|
||||
@@ -211,7 +211,7 @@
|
||||
</dl>
|
||||
</aside>
|
||||
<div
|
||||
class="post__content"
|
||||
class="post__content bbcode-rendered"
|
||||
data-bbcode="{{ $post->content }}"
|
||||
>
|
||||
@joypixels($post->getContentHtml())
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ $forum->name }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="{{ __('forum.display-forum') }}">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ $forum->name }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@endsection
|
||||
|
||||
@section('page', 'page__forum--category')
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ $forum->description }}</h2>
|
||||
<ul class="topic-listings">
|
||||
@foreach ($topics as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.category-quick-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form form--horizontal" method="GET" action="{{ route('forum_search_form') }}">
|
||||
<input type="hidden" name="sorting" value="updated_at">
|
||||
<input type="hidden" name="direction" value="desc">
|
||||
<input type="hidden" name="category" value="{{ $forum->id }}">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="name"
|
||||
class="form__text"
|
||||
name="name"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('name', $params) ? $params['name'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('forum.topic-name') }}
|
||||
</label>
|
||||
</p>
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@include('forum.stats')
|
||||
@endsection
|
||||
@@ -0,0 +1,30 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ $forum->name }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="{{ __('forum.display-forum') }}">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ $forum->name }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('page', 'page__forum--category')
|
||||
|
||||
@section('main')
|
||||
@livewire('forum-category-topic-search', ['category' => $forum])
|
||||
@endsection
|
||||
@@ -1,107 +0,0 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ $forum->name }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="{{ __('forum.display-forum') }}">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ $forum->name }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@endsection
|
||||
|
||||
@section('page', 'page__forum--display')
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ $forum->description }}</h2>
|
||||
<div class="panel__actions">
|
||||
@if ($category->getPermission()->start_topic == true)
|
||||
<a
|
||||
href="{{ route('forum_new_topic_form', ['id' => $forum->id]) }}"
|
||||
class="panel__action form__button form__button--text"
|
||||
>
|
||||
{{ __('forum.create-new-topic') }}
|
||||
</a>
|
||||
@endif
|
||||
@if ($category->getPermission()->show_forum == true)
|
||||
@if (auth()->user()->subscriptions()->ofForum($forum->id)->exists())
|
||||
<form
|
||||
class="panel__action"
|
||||
action="{{ route('unsubscribe_forum', ['forum' => $forum->id, 'route' => 'forum']) }}"
|
||||
method="POST"
|
||||
>
|
||||
@csrf
|
||||
<button class="panel__action form__button form__button--text">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell-slash"></i>
|
||||
{{ __('forum.unsubscribe') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<form
|
||||
class="panel__action"
|
||||
action="{{ route('subscribe_forum', ['forum' => $forum->id, 'route' => 'forum']) }}"
|
||||
method="POST"
|
||||
>
|
||||
@csrf
|
||||
<button class="panel__action form__button form__button--text">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell"></i>
|
||||
{{ __('forum.subscribe') }}
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</header>
|
||||
<ul class="topic-listings">
|
||||
@foreach($topics as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.category-quick-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form form--horizontal" method="GET" action="{{ route('forum_search_form') }}" class="form-inline">
|
||||
<input type="hidden" name="sorting" value="created_at">
|
||||
<input type="hidden" name="direction" value="desc">
|
||||
<input type="hidden" name="category" value="{{ $forum->id }}">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="name"
|
||||
class="form__text"
|
||||
name="name"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('name', $params) ? $params['name'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="name">{{ __('forum.topic-name') }}</label>
|
||||
</p>
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@include('forum.stats')
|
||||
@endsection
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@@ -0,0 +1,30 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ $forum->name }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="{{ __('forum.display-forum') }}">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ $forum->name }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('page', 'page__forum--display')
|
||||
|
||||
@section('main')
|
||||
@livewire('forum-topic-search', ['forum' => $forum])
|
||||
@endsection
|
||||
@@ -15,58 +15,46 @@
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('page', 'page__forums--index')
|
||||
|
||||
@section('main')
|
||||
@foreach ($categories as $category)
|
||||
@if ($category->getPermission() != null && $category->getPermission()->show_forum == true &&
|
||||
$category->getForumsInCategory()->count() > 0)
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">
|
||||
<a class="panel__header-link" href="{{ route('forums.categories.show', ['id' => $category->id]) }}">
|
||||
{{ $category->name }}
|
||||
</a>
|
||||
</h2>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">
|
||||
<a class="panel__header-link" href="{{ route('forums.categories.show', ['id' => $category->id]) }}">
|
||||
{{ $category->name }}
|
||||
</a>
|
||||
</h2>
|
||||
@if ($category->forums->count() > 0)
|
||||
<ul class="subforum-listings">
|
||||
@foreach ($category->getForumsInCategory()->sortBy('position') as $subforum)
|
||||
@if ($subforum->getPermission() != null && $subforum->getPermission()->show_forum == true)
|
||||
<li class="subforum-listings__item">
|
||||
<x-forum.subforum-listing :subforum="$subforum" />
|
||||
</li>
|
||||
@endif
|
||||
@foreach ($category->forums->sortBy('position') as $forum)
|
||||
<li class="subforum-listings__item">
|
||||
<x-forum.subforum-listing :subforum="$forum" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</section>
|
||||
@endif
|
||||
@else
|
||||
<div class="panel__body">
|
||||
No forums in category.
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
@endforeach
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.topic-quick-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form form--horizontal" method="GET" action="{{ route('forum_search_form') }}">
|
||||
<input type="hidden" name="sorting" value="created_at">
|
||||
<input type="hidden" name="direction" value="desc">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="name"
|
||||
class="form__text"
|
||||
name="name"
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('name', $params) ? $params['name'] : '' }}"
|
||||
placeholder=""
|
||||
>
|
||||
<label class="form__label form__label--floating" for="name">{{ __('forum.topic-name') }}</label>
|
||||
</p>
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<h2 class="panel__heading">{{ __('forum.stats') }}</h2>
|
||||
<dl class="key-value">
|
||||
<dt>{{ __('forum.forums') }}</dt>
|
||||
<dd>{{ $num_forums }}</dd>
|
||||
<dt>{{ __('forum.topics') }}</dt>
|
||||
<dd>{{ $num_topics }}</dd>
|
||||
<dt>{{ __('forum.posts') }}</dt>
|
||||
<dd>{{ $num_posts }}</dd>
|
||||
</dl>
|
||||
</section>
|
||||
@include('forum.stats')
|
||||
@endsection
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ __('common.latest-posts') }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="Forum {{ __('common.latest-posts') }}">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ __('common.latest-posts') }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('common.latest-posts') }}</h2>
|
||||
</section>
|
||||
<div class="panel__body">
|
||||
<ul class="topic-posts">
|
||||
@foreach ($results as $post)
|
||||
<li class="post-listings__item">
|
||||
<x-forum.post :post="$post" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
{{ $results->links('partials.pagination') }}
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.post-quick-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form form--horizontal" method="GET" action="{{ route('forum_search_form') }}">
|
||||
<input type="hidden" name="sorting" value="created_at">
|
||||
<input type="hidden" name="direction" value="desc">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="body"
|
||||
class="form__text"
|
||||
name="body"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('body', $params) ? $params['body'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="body">
|
||||
{{ __('forum.forums-post-search') }}
|
||||
</label>
|
||||
</p>
|
||||
<button type="submit" class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@include('forum.stats')
|
||||
@endsection
|
||||
@@ -1,66 +0,0 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ __('common.latest-topics') }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="Forum {{ __('common.latest-topics') }}">
|
||||
@endsection
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ __('common.latest-topics') }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('common.latest-topics') }}</h2>
|
||||
<ul class="topic-listings">
|
||||
@foreach ($results as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
{{ $results->links('partials.pagination') }}
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.topic-quick-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form form--horizontal" method="GET" action="{{ route('forum_search_form') }}">
|
||||
<input type="hidden" name="sorting" value="created_at">
|
||||
<input type="hidden" name="direction" value="desc">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="name"
|
||||
class="form__text"
|
||||
name="name"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('name', $params) ? $params['name'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('forum.topic-name') }}
|
||||
</label>
|
||||
</p>
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@include('forum.stats')
|
||||
@endsection
|
||||
+2
-10
@@ -3,7 +3,7 @@
|
||||
class="{{ Route::is('forum_latest_topics') ? 'nav-tab--active__link' : 'nav-tab__link' }}"
|
||||
href="{{ route('forum_latest_topics') }}"
|
||||
>
|
||||
{{ __('common.latest-topics') }}
|
||||
{{ __('common.topics') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ Route::is('forum_latest_posts') ? 'nav-tab--active' : 'nav-tabV2' }}">
|
||||
@@ -11,7 +11,7 @@
|
||||
class="{{ Route::is('forum_latest_posts') ? 'nav-tab--active__link' : 'nav-tab__link' }}"
|
||||
href="{{ route('forum_latest_posts') }}"
|
||||
>
|
||||
{{ __('common.latest-posts') }}
|
||||
{{ __('common.posts') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ Route::is('forum_subscriptions') ? 'nav-tab--active' : 'nav-tabV2' }}">
|
||||
@@ -22,11 +22,3 @@
|
||||
{{ __('common.subscriptions') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ Route::is('forum_search_form') ? 'nav-tab--active' : 'nav-tabV2' }}">
|
||||
<a
|
||||
class="{{ Route::is('forum_search_form') ? 'nav-tab--active__link' : 'nav-tab__link' }}"
|
||||
href="{{ route('forum_search_form') }}"
|
||||
>
|
||||
{{ __('common.search') }}
|
||||
</a>
|
||||
</li>
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@@ -0,0 +1,28 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ __('common.latest-posts') }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="Forum {{ __('common.latest-posts') }}">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ __('common.posts') }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
@livewire('post-search')
|
||||
@endsection
|
||||
@@ -1,329 +0,0 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ __('common.search') }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="Forum Search">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ __('common.search') }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.forums-topic-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form" method="GET" action="{{ route('forum_search_form') }}">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="name"
|
||||
class="form__text"
|
||||
name="name"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('name', $params) ? $params['name'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('forum.topic') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="body"
|
||||
class="form__text"
|
||||
name="body"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('body', $params) ? $params['body'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="body">
|
||||
{{ __('forum.post') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
name="category"
|
||||
id="category"
|
||||
class="form__select"
|
||||
required
|
||||
>
|
||||
<option value="0">{{ __('forum.select-all-forum') }}</option>
|
||||
@foreach ($categories as $category)
|
||||
@if ($category->getPermission() != null && $category->getPermission()->show_forum == true && $category->getForumsInCategory()->count() > 0)
|
||||
<option
|
||||
value="{{ $category->id }}"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('category', $params) && $params['category'] == $category->id)
|
||||
>
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
@foreach ($category->getForumsInCategory()->sortBy('position') as $categoryChild)
|
||||
@if ($categoryChild->getPermission() != null && $categoryChild->getPermission()->show_forum == true)
|
||||
<option
|
||||
value="{{ $categoryChild->id }}"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('category', $params) && $params['category'] == $categoryChild->id)
|
||||
>
|
||||
» {{ $categoryChild->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="category">
|
||||
{{ __('common.forum') }}
|
||||
</label>
|
||||
</p>
|
||||
<div class="form__group--horizontal">
|
||||
<div class="form__group">
|
||||
<fieldset class="form__fieldset">
|
||||
<legend class="form__legend">{{ __('forum.label') }}</legend>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="implemented"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="implemented"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('implemented', $params) && $params['implemented'])
|
||||
>
|
||||
<label class="form__label" for="implemented">
|
||||
<i class="{{ config('other.font-awesome') }} fa-check text-purple"></i>
|
||||
{{ __('forum.implemented') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="approved"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="approved"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('approved', $params) && $params['approved'])
|
||||
>
|
||||
<label class="form__label" for="approved">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tag text-green"></i>
|
||||
{{ __('forum.approved') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="denied"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="denied"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('denied', $params) && $params['denied'])
|
||||
>
|
||||
<label class="form__label" for="denied">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tag text-red"></i>
|
||||
{{ __('forum.denied') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="solved"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="solved"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('solved', $params) && $params['solved'])
|
||||
>
|
||||
<label class="form__label" for="solved">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-up text-green"></i>
|
||||
{{ __('forum.solved') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="invalid"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="invalid"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('invalid', $params) && $params['invalid'])
|
||||
>
|
||||
<label class="form__label" for="invalid">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-down text-red"></i>
|
||||
{{ __('forum.invalid') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="bug"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="bug"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('bug', $params) && $params['bug'])
|
||||
>
|
||||
<label class="form__label" for="bug">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bug text-red"></i>
|
||||
{{ __('forum.bug') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="suggestion"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="suggestion"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('suggestion', $params) && $params['suggestion'])
|
||||
>
|
||||
<label class="form__label" for="suggestion">
|
||||
<i class="{{ config('other.font-awesome') }} fa-info text-blue"></i>
|
||||
{{ __('forum.suggestion') }}
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form__group">
|
||||
<fieldset class="form__fieldset">
|
||||
<legend class="form__legend">{{ __('forum.state') }}</legend>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="open"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="open"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('open', $params) && $params['open'])
|
||||
>
|
||||
<label class="form__label" for="open">
|
||||
<i class="{{ config('other.font-awesome') }} fa-lock-open text-green"></i>
|
||||
{{ __('forum.open') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="closed"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="closed"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('closed', $params) && $params['closed'])
|
||||
>
|
||||
<label class="form__label" for="closed">
|
||||
<i class="{{ config('other.font-awesome') }} fa-lock text-red"></i>
|
||||
{{ __('forum.closed') }}
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form__group">
|
||||
<fieldset class="form__fieldset">
|
||||
<legend class="form__legend">{{ __('forum.activity') }}</legend>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="subscribed"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="subscribed"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('subscribed', $params) && $params['subscribed'])
|
||||
>
|
||||
<label class="form__label" for="subscribed">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell text-green"></i>
|
||||
{{ __('forum.subscribed') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="notsubscribed"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="notsubscribed"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('notsubscribed', $params) && $params['notsubscribed'])
|
||||
>
|
||||
<label class="form__label" for="notsubscribed">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell-slash text-red"></i>
|
||||
{{ __('forum.not-subscribed') }}
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
required
|
||||
>
|
||||
<option
|
||||
value="updated_at"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('sorting', $params) && $params['sorting'] == 'updated_at')
|
||||
>
|
||||
{{ __('forum.updated-at') }}
|
||||
</option>
|
||||
<option
|
||||
value="created_at"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('sorting', $params) && $params['sorting'] == 'created_at')
|
||||
>
|
||||
{{ __('forum.created-at') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('common.sort') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
required
|
||||
>
|
||||
<option
|
||||
value="desc"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('direction', $params) && $params['direction'] == 'desc')
|
||||
>
|
||||
{{ __('common.descending') }}
|
||||
</option>
|
||||
<option
|
||||
value="asc"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('direction', $params) && $params['direction'] == 'asc')
|
||||
>
|
||||
{{ __('common.ascending') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.direction') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
<h2 class="panel__heading">{{ __('common.search-results') }}</h2>
|
||||
<ul class="topic-posts">
|
||||
@foreach($results as $post)
|
||||
<li class="post-listings__item">
|
||||
<x-forum.post :post="$post" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
{{ $results->links('partials.pagination') }}
|
||||
@endsection
|
||||
@@ -1,331 +0,0 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ __('common.search') }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="Forum Search">
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ __('common.search') }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.forums-topic-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form" method="GET" action="{{ route('forum_search_form') }}">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="name"
|
||||
class="form__text"
|
||||
name="name"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('name', $params) ? $params['name'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('forum.topic') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="body"
|
||||
class="form__text"
|
||||
name="body"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('body', $params) ? $params['body'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="body">
|
||||
{{ __('forum.post') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
name="category"
|
||||
id="category"
|
||||
class="form__select"
|
||||
required
|
||||
>
|
||||
<option value="0">{{ __('forum.select-all-forum') }}</option>
|
||||
@foreach ($categories as $category)
|
||||
@if ($category->getPermission() != null && $category->getPermission()->show_forum == true && $category->getForumsInCategory()->count() > 0)
|
||||
<option
|
||||
value="{{ $category->id }}"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('category', $params) && $params['category'] == $category->id)
|
||||
>
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
@foreach ($category->getForumsInCategory()->sortBy('position') as $categoryChild)
|
||||
@if ($categoryChild->getPermission() != null && $categoryChild->getPermission()->show_forum == true)
|
||||
<option
|
||||
value="{{ $categoryChild->id }}"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('category', $params) && $params['category'] == $categoryChild->id)
|
||||
>
|
||||
» {{ $categoryChild->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="category">
|
||||
{{ __('common.forum') }}
|
||||
</label>
|
||||
</p>
|
||||
<div class="form__group--horizontal">
|
||||
<div class="form__group">
|
||||
<fieldset class="form__fieldset">
|
||||
<legend class="form__legend">{{ __('forum.label') }}</legend>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="implemented"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="implemented"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('implemented', $params) && $params['implemented'])
|
||||
>
|
||||
<label class="form__label" for="implemented">
|
||||
<i class="{{ config('other.font-awesome') }} fa-check text-purple"></i>
|
||||
{{ __('forum.implemented') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="approved"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="approved"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('approved', $params) && $params['approved'])
|
||||
>
|
||||
<label class="form__label" for="approved">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tag text-green"></i>
|
||||
{{ __('forum.approved') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="denied"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="denied"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('denied', $params) && $params['denied'])
|
||||
>
|
||||
<label class="form__label" for="denied">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tag text-red"></i>
|
||||
{{ __('forum.denied') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="solved"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="solved"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('solved', $params) && $params['solved'])
|
||||
>
|
||||
<label class="form__label" for="solved">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-up text-green"></i>
|
||||
{{ __('forum.solved') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="invalid"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="invalid"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('invalid', $params) && $params['invalid'])
|
||||
>
|
||||
<label class="form__label" for="invalid">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-down text-red"></i>
|
||||
{{ __('forum.invalid') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="bug"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="bug"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('bug', $params) && $params['bug'])
|
||||
>
|
||||
<label class="form__label" for="bug">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bug text-red"></i>
|
||||
{{ __('forum.bug') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="suggestion"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="suggestion"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('suggestion', $params) && $params['suggestion'])
|
||||
>
|
||||
<label class="form__label" for="suggestion">
|
||||
<i class="{{ config('other.font-awesome') }} fa-info text-blue"></i>
|
||||
{{ __('forum.suggestion') }}
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form__group">
|
||||
<fieldset class="form__fieldset">
|
||||
<legend class="form__legend">{{ __('forum.state') }}</legend>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="open"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="open"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('open', $params) && $params['open'])
|
||||
>
|
||||
<label class="form__label" for="open">
|
||||
<i class="{{ config('other.font-awesome') }} fa-lock-open text-green"></i>
|
||||
{{ __('forum.open') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="closed"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="closed"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('closed', $params) && $params['closed'])
|
||||
>
|
||||
<label class="form__label" for="closed">
|
||||
<i class="{{ config('other.font-awesome') }} fa-lock text-red"></i>
|
||||
{{ __('forum.closed') }}
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form__group">
|
||||
<fieldset class="form__fieldset">
|
||||
<legend class="form__legend">{{ __('forum.activity') }}</legend>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="subscribed"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="subscribed"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('subscribed', $params) && $params['subscribed'])
|
||||
>
|
||||
<label class="form__label" for="subscribed">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell text-green"></i>
|
||||
{{ __('forum.subscribed') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="notsubscribed"
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
name="notsubscribed"
|
||||
@checked(isset($params) && is_array($params) && array_key_exists('notsubscribed', $params) && $params['notsubscribed'])
|
||||
>
|
||||
<label class="form__label" for="notsubscribed">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell-slash text-red"></i>
|
||||
{{ __('forum.not-subscribed') }}
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
required
|
||||
>
|
||||
<option
|
||||
value="updated_at"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('sorting', $params) && $params['sorting'] == 'updated_at')
|
||||
>
|
||||
{{ __('forum.updated-at') }}
|
||||
</option>
|
||||
<option
|
||||
value="created_at"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('sorting', $params) && $params['sorting'] == 'created_at')
|
||||
>
|
||||
{{ __('forum.created-at') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('common.sort') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
required
|
||||
>
|
||||
<option
|
||||
value="desc"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('direction', $params) && $params['direction'] == 'desc')
|
||||
>
|
||||
{{ __('common.descending') }}
|
||||
</option>
|
||||
<option
|
||||
value="asc"
|
||||
@selected(isset($params) && is_array($params) && array_key_exists('direction', $params) && $params['direction'] == 'asc')
|
||||
>
|
||||
{{ __('common.ascending') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.direction') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('common.search-results') }}</h2>
|
||||
<ul class="topic-listings">
|
||||
@foreach($results as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
{{ $results->links('partials.pagination') }}
|
||||
</div>
|
||||
@endsection
|
||||
@@ -20,52 +20,10 @@
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.forums') }}</h2>
|
||||
@foreach ($results->whereIn('id', $forum_neos) as $subforum)
|
||||
<x-forum.subforum-listing :subforum="$subforum" />
|
||||
@endforeach
|
||||
</section>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.topics') }}</h2>
|
||||
@foreach ($results as $result)
|
||||
@foreach($result->subscription_topics as $topic)
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
@endforeach
|
||||
@endforeach
|
||||
</section>
|
||||
{{ $results->links('partials.pagination') }}
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.post-quick-search') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form form--horizontal" method="GET" action="{{ route('forum_search_form') }}">
|
||||
<input type="hidden" name="sorting" value="created_at">
|
||||
<input type="hidden" name="direction" value="desc">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="body"
|
||||
class="form__text"
|
||||
name="body"
|
||||
placeholder=""
|
||||
type="text"
|
||||
value="{{ isset($params) && is_array($params) && array_key_exists('body', $params) ? $params['body'] : '' }}"
|
||||
>
|
||||
<label class="form__label form__label--floating" for="body">
|
||||
{{ __('forum.forums-post-search') }}
|
||||
</label>
|
||||
</p>
|
||||
<button type="submit" class="form__button form__button--filled">
|
||||
{{ __('common.search') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@include('forum.stats')
|
||||
@livewire('subscribed-forum', [], key('forums'))
|
||||
@livewire('subscribed-topic', [], key('topics'))
|
||||
@endsection
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
@@ -0,0 +1,27 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
<title>{{ __('common.latest-topics') }} - {{ __('forum.forums') }} - {{ config('other.title') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('meta')
|
||||
<meta name="description" content="Forum {{ __('common.latest-topics') }}">
|
||||
@endsection
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumbV2">
|
||||
<a href="{{ route('forums.index') }}" class="breadcrumb__link">
|
||||
{{ __('forum.forums') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb--active">
|
||||
{{ __('common.topics') }}
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('main')
|
||||
@livewire('topic-search')
|
||||
@endsection
|
||||
@@ -21,54 +21,13 @@
|
||||
@endsection
|
||||
|
||||
@section('nav-tabs')
|
||||
@include('forum.buttons')
|
||||
@include('forum.partials.buttons')
|
||||
@endsection
|
||||
|
||||
@section('page', 'page__forum--topic')
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ $topic->name }}</h2>
|
||||
@if ($topic->approved || $topic->denied || $topic->solved || $topic->invalid || $topic->bug || $topic->suggestion || $topic->implemented)
|
||||
<ul class="topic-tags">
|
||||
<li class="topic-tag">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tags"></i>
|
||||
</li>
|
||||
@if ($topic->approved)
|
||||
<li class="topic-tag topic-tag--approved">{{ __('forum.approved') }}</li>
|
||||
@endif
|
||||
@if ($topic->denied)
|
||||
<li class="topic-tag topic-tag--denied">{{ __('forum.denied') }}</li>
|
||||
@endif
|
||||
@if ($topic->solved)
|
||||
<li class="topic-tag topic-tag--solved">{{ __('forum.solved') }}</li>
|
||||
@endif
|
||||
@if ($topic->invalid)
|
||||
<li class="topic-tag topic-tag--invalid">{{ __('forum.invalid') }}</li>
|
||||
@endif
|
||||
@if ($topic->bug)
|
||||
<li class="topic-tag topic-tag--bug">{{ __('forum.bug') }}</li>
|
||||
@endif
|
||||
@if ($topic->suggestion)
|
||||
<li class="topic-tag topic-tag--suggestion">{{ __('forum.suggestion') }}</li>
|
||||
@endif
|
||||
@if ($topic->implemented)
|
||||
<li class="topic-tag topic-tag--implemented">{{ __('forum.implemented') }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
</section>
|
||||
{{ $posts->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
<ol class="topic-posts">
|
||||
@foreach ($posts as $k => $post)
|
||||
<li class="topic-posts__item">
|
||||
<x-forum.post :post="$post" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
</div>
|
||||
{{ $posts->links('partials.pagination') }}
|
||||
@livewire('topic-post-search', ['topic' => $topic])
|
||||
@if ($topic->state === 'close' && auth()->user()->group->is_modo)
|
||||
<p>This topic is closed, but you can still reply due to you being {{ auth()->user()->group->name }}.</p>
|
||||
@endif
|
||||
@@ -77,8 +36,6 @@
|
||||
id="forum_reply_form"
|
||||
method="POST"
|
||||
action="{{ route('forum_reply', ['id' => $topic->id]) }}"
|
||||
x-data="{ showReply: {{ $posts->onLastPage() ? 'true' : 'false' }} }"
|
||||
x-show="showReply"
|
||||
>
|
||||
@csrf
|
||||
@livewire('bbcode-input', ['name' => 'content', 'label' => __('forum.post') ])
|
||||
@@ -189,7 +189,7 @@
|
||||
</menu>
|
||||
<div class="bbcode-input__tab-pane">
|
||||
@if ($isPreviewEnabled)
|
||||
<p class="bbcode-input__preview">
|
||||
<p class="bbcode-input__preview bbcode-rendered">
|
||||
@joypixels($contentHtml)
|
||||
</p>
|
||||
<input type="hidden" name="{{ $name }}" wire:model.defer="contentBbcode">
|
||||
|
||||
@@ -1,35 +1,49 @@
|
||||
<div>
|
||||
<div class="mb-10">
|
||||
<input type="text" wire:model="search" class="form-control" placeholder="{{ __('torrent.search-by-name') }}"/>
|
||||
</div>
|
||||
|
||||
@foreach($collections as $collection)
|
||||
<div class="col-md-12 well profile-footer">
|
||||
<div class="collection">
|
||||
<div class="header collection"
|
||||
style=" background-image: url({{ isset($collection->backdrop) ? tmdb_image('back_big', $collection->backdrop) : 'https://via.placeholder.com/1280x300' }}); background-size: cover; background-position: 50% 50%;">
|
||||
<div class="collection-overlay"
|
||||
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(0, 0, 0, 0.87), rgba(45, 71, 131, 0.46));"></div>
|
||||
<section class="collection">
|
||||
<h2>{{ $collection->name }}</h2>
|
||||
<p class="text-blue">{{ __('mediahub.includes') }}
|
||||
@foreach($collection->movie as $collection_movie)
|
||||
{{ $collection_movie->title }},
|
||||
@endforeach
|
||||
</p>
|
||||
|
||||
<a href="{{ route('mediahub.collections.show', ['id' => $collection->id]) }}" role="button"
|
||||
class="btn btn-labeled btn-primary"
|
||||
style=" margin: 0; text-transform: uppercase; position: absolute; bottom: 50px;">
|
||||
<span class="btn-label"><i class="{{ config("other.font-awesome") }} fa-copy"></i> {{ __('mediahub.view-collection') }}</span>
|
||||
</a>
|
||||
</section>
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ __('mediahub.collections') }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<br>
|
||||
<div class="text-center">
|
||||
{{ $collections->links() }}
|
||||
</header>
|
||||
{{ $collections->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@foreach($collections as $collection)
|
||||
<div class="col-md-12">
|
||||
<div class="collection">
|
||||
<div class="header collection"
|
||||
style=" background-image: url({{ isset($collection->backdrop) ? tmdb_image('back_big', $collection->backdrop) : 'https://via.placeholder.com/1280x300' }}); background-size: cover; background-position: 50% 50%;">
|
||||
<div class="collection-overlay"
|
||||
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(0, 0, 0, 0.87), rgba(45, 71, 131, 0.46));"></div>
|
||||
<section class="collection">
|
||||
<h2>{{ $collection->name }}</h2>
|
||||
<p class="text-blue">{{ __('mediahub.includes') }}
|
||||
@foreach($collection->movie as $collection_movie)
|
||||
{{ $collection_movie->title }},
|
||||
@endforeach
|
||||
</p>
|
||||
|
||||
<a href="{{ route('mediahub.collections.show', ['id' => $collection->id]) }}" role="button"
|
||||
class="btn btn-labeled btn-primary"
|
||||
style=" margin: 0; text-transform: uppercase; position: absolute; bottom: 50px;">
|
||||
<span class="btn-label"><i class="{{ config("other.font-awesome") }} fa-copy"></i> {{ __('mediahub.view-collection') }}</span>
|
||||
</a>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{ $collections->links('partials.pagination') }}
|
||||
</div>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</p>
|
||||
</form>
|
||||
@else
|
||||
<div class="comment__content">
|
||||
<div class="comment__content bbcode-rendered">
|
||||
@joypixels($comment->getContentHtml())
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
<div>
|
||||
<div class="mb-10">
|
||||
<input type="text" wire:model="search" class="form-control" placeholder="Search By Name"/>
|
||||
</div>
|
||||
|
||||
<div class="blocks">
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ __('mediahub.companies') }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ $companies->links('partials.pagination') }}
|
||||
<div class="panel__body blocks">
|
||||
@foreach ($companies as $company)
|
||||
<a href="{{ route('mediahub.companies.show', ['id' => $company->id]) }}" style="padding: 0 2px;">
|
||||
<div class="general media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
@@ -23,8 +38,5 @@
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
<br>
|
||||
<div class="text-center">
|
||||
{{ $companies->links() }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $companies->links('partials.pagination') }}
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
<div class="sidebar2">
|
||||
<div>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ $category->description }}</h2>
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
@if($topics->count() > 0)
|
||||
<ul class="topic-listings">
|
||||
@foreach ($topics as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<div class="panel__body">
|
||||
No topics.
|
||||
</div>
|
||||
@endif
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
</section>
|
||||
</div>
|
||||
<aside>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('torrent.filters') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
placeholder=""
|
||||
/>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
{{ __('common.search') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
wire:model="label"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="approved">
|
||||
{{ __('forum.approved') }}
|
||||
</option>
|
||||
<option value="implemented">
|
||||
{{ __('forum.implemented') }}
|
||||
</option>
|
||||
<option value="solved">
|
||||
{{ __('forum.solved') }}
|
||||
</option>
|
||||
<option value="denied">
|
||||
{{ __('forum.denied') }}
|
||||
</option>
|
||||
<option value="invalid">
|
||||
{{ __('forum.invalid') }}
|
||||
</option>
|
||||
<option value="bug">
|
||||
{{ __('forum.bug') }}
|
||||
</option>
|
||||
<option value="suggestion">
|
||||
{{ __('forum.suggestion') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('forum.label') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
required
|
||||
wire:model="sortField"
|
||||
>
|
||||
<option value="last_reply_at">
|
||||
{{ __('forum.updated-at') }}
|
||||
</option>
|
||||
<option value="created_at">
|
||||
{{ __('forum.created-at') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('common.sort') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
required
|
||||
wire:model="sortDirection"
|
||||
>
|
||||
<option value="desc">
|
||||
{{ __('common.descending') }}
|
||||
</option>
|
||||
<option value="asc">
|
||||
{{ __('common.ascending') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.direction') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="state"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="open">
|
||||
{{ __('forum.open') }}
|
||||
</option>
|
||||
<option value="close">
|
||||
{{ __('forum.closed') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('forum.state') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="subscribed"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="include">
|
||||
{{ __('forum.subscribed') }}
|
||||
</option>
|
||||
<option value="exclude">
|
||||
{{ __('forum.not-subscribed') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.subscriptions') }}
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
@@ -0,0 +1,198 @@
|
||||
<div class="sidebar2">
|
||||
<div>
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ $forum->description }}</h2>
|
||||
<div class="panel__actions">
|
||||
@if ($forum->getPermission()->start_topic == true)
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<a
|
||||
href="{{ route('forum_new_topic_form', ['id' => $forum->id]) }}"
|
||||
class="panel__action form__button form__button--text"
|
||||
>
|
||||
{{ __('forum.create-new-topic') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
@if (auth()->user()->subscriptions()->ofForum($forum->id)->exists())
|
||||
<form
|
||||
class="panel__action"
|
||||
action="{{ route('unsubscribe_forum', ['forum' => $forum->id, 'route' => 'forum']) }}"
|
||||
method="POST"
|
||||
>
|
||||
@csrf
|
||||
<button class="panel__action form__button form__button--text">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell-slash"></i>
|
||||
{{ __('forum.unsubscribe') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<form
|
||||
class="panel__action"
|
||||
action="{{ route('subscribe_forum', ['forum' => $forum->id, 'route' => 'forum']) }}"
|
||||
method="POST"
|
||||
>
|
||||
@csrf
|
||||
<button class="panel__action form__button form__button--text">
|
||||
<i class="{{ config('other.font-awesome') }} fa-bell"></i>
|
||||
{{ __('forum.subscribe') }}
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
@if($topics->count() > 0)
|
||||
<ul class="topic-listings">
|
||||
@foreach ($topics as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<div class="panel__body">
|
||||
No topics.
|
||||
</div>
|
||||
@endif
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
</section>
|
||||
</div>
|
||||
<aside>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('torrent.filters') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
placeholder=""
|
||||
/>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
{{ __('common.search') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
wire:model="label"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="approved">
|
||||
{{ __('forum.approved') }}
|
||||
</option>
|
||||
<option value="implemented">
|
||||
{{ __('forum.implemented') }}
|
||||
</option>
|
||||
<option value="solved">
|
||||
{{ __('forum.solved') }}
|
||||
</option>
|
||||
<option value="denied">
|
||||
{{ __('forum.denied') }}
|
||||
</option>
|
||||
<option value="invalid">
|
||||
{{ __('forum.invalid') }}
|
||||
</option>
|
||||
<option value="bug">
|
||||
{{ __('forum.bug') }}
|
||||
</option>
|
||||
<option value="suggestion">
|
||||
{{ __('forum.suggestion') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('forum.label') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
required
|
||||
wire:model="sortField"
|
||||
>
|
||||
<option value="last_reply_at">
|
||||
{{ __('forum.updated-at') }}
|
||||
</option>
|
||||
<option value="created_at">
|
||||
{{ __('forum.created-at') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('common.sort') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
required
|
||||
wire:model="sortDirection"
|
||||
>
|
||||
<option value="desc">
|
||||
{{ __('common.descending') }}
|
||||
</option>
|
||||
<option value="asc">
|
||||
{{ __('common.ascending') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.direction') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="state"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="open">
|
||||
{{ __('forum.open') }}
|
||||
</option>
|
||||
<option value="close">
|
||||
{{ __('forum.closed') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('forum.state') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="subscribed"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="include">
|
||||
{{ __('forum.subscribed') }}
|
||||
</option>
|
||||
<option value="exclude">
|
||||
{{ __('forum.not-subscribed') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.subscriptions') }}
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
@@ -566,10 +566,7 @@
|
||||
{{ __('common.no-result') }}
|
||||
</div>
|
||||
@endif
|
||||
<br>
|
||||
<div class="text-center">
|
||||
{{ $torrents->links() }}
|
||||
</div>
|
||||
{{ $torrents->links('partials.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,10 +1,25 @@
|
||||
<div>
|
||||
<div>
|
||||
<div class="mb-10">
|
||||
<input type="text" wire:model="search" class="form-control" placeholder="{{ __('torrent.search-by-name') }}"/>
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ __('mediahub.movies') }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach($movies as $movie)
|
||||
</header>
|
||||
{{ $movies->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@forelse($movies as $movie)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent" style=" height: 265px;">
|
||||
<div class="card_head">
|
||||
@@ -41,10 +56,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<br>
|
||||
<div class="text-center">
|
||||
{{ $movies->links() }}
|
||||
</div>
|
||||
@empty
|
||||
No movies.
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
{{ $movies->links('partials.pagination') }}
|
||||
</section>
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
<div>
|
||||
<div class="mb-10">
|
||||
<input type="text" wire:model="search" class="form-control" placeholder="Search By Name"/>
|
||||
</div>
|
||||
|
||||
<div class="blocks">
|
||||
@foreach ($networks as $network)
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ __('mediahub.networks') }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ $networks->links('partials.pagination') }}
|
||||
<div class="panel__body blocks">
|
||||
@forelse ($networks as $network)
|
||||
<a href="{{ route('mediahub.networks.show', ['id' => $network->id]) }}" style="padding: 0 2px;">
|
||||
<div class="general media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2 class="text-bold">
|
||||
@@ -21,10 +36,9 @@
|
||||
Shows</h2>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
<br>
|
||||
<div class="text-center">
|
||||
{{ $networks->links() }}
|
||||
@empty
|
||||
No {{ __('mediahub.networks') }}
|
||||
@endforelse
|
||||
</div>
|
||||
{{ $networks->links('partials.pagination') }}
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
<div>
|
||||
<div class="mb-10">
|
||||
<input type="text" wire:model.debounce.250ms="search" class="form-control"
|
||||
placeholder="{{ __('torrent.search-by-name') }}"/>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@foreach ($persons as $person)
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ __('mediahub.persons') }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ $persons->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@forelse ($persons as $person)
|
||||
<div class="col-md-2 text-center">
|
||||
<div class="thumbnail" style="min-height: 315px;">
|
||||
<a href="{{ route('mediahub.persons.show', ['id' => $person->id]) }}">
|
||||
@@ -17,9 +31,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@empty
|
||||
No persons.
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="text-center">
|
||||
{{ $persons->links() }}
|
||||
</div>
|
||||
</div>
|
||||
{{ $persons->links('partials.pagination') }}
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ __('common.latest-posts') }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
placeholder=""
|
||||
/>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
{{ __('common.search') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ $posts->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@if ($posts->count() > 0)
|
||||
<ul class="topic-posts">
|
||||
@foreach ($posts as $post)
|
||||
<li class="post-listings__item">
|
||||
<x-forum.post :post="$post" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
No posts.
|
||||
@endif
|
||||
</div>
|
||||
{{ $posts->links('partials.pagination') }}
|
||||
</section>
|
||||
@@ -0,0 +1,18 @@
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.forums') }}</h2>
|
||||
{{ $forums->links('partials.pagination') }}
|
||||
@if($forums->count() > 0)
|
||||
<ul class="subforum-listings">
|
||||
@foreach ($forums as $forum)
|
||||
<li class="subforum-listings__item">
|
||||
<x-forum.subforum-listing :subforum="$forum" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<div class="panel__body">
|
||||
No forums in category.
|
||||
</div>
|
||||
@endif
|
||||
{{ $forums->links('partials.pagination') }}
|
||||
</section>
|
||||
@@ -0,0 +1,18 @@
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('forum.topics') }}</h2>
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
@if($topics->count() > 0)
|
||||
<ul class="topic-listings">
|
||||
@foreach ($topics as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<div class="panel__body">
|
||||
No topics.
|
||||
</div>
|
||||
@endif
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
</section>
|
||||
@@ -181,6 +181,6 @@
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $tickets->links() }}
|
||||
{{ $tickets->links('partials.pagination') }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ $topic->name }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
placeholder=""
|
||||
/>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
{{ __('common.search') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@if ($topic->approved || $topic->denied || $topic->solved || $topic->invalid || $topic->bug || $topic->suggestion || $topic->implemented)
|
||||
<ul class="topic-tags">
|
||||
<li class="topic-tag">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tags"></i>
|
||||
</li>
|
||||
@if ($topic->approved)
|
||||
<li class="topic-tag topic-tag--approved">{{ __('forum.approved') }}</li>
|
||||
@endif
|
||||
@if ($topic->denied)
|
||||
<li class="topic-tag topic-tag--denied">{{ __('forum.denied') }}</li>
|
||||
@endif
|
||||
@if ($topic->solved)
|
||||
<li class="topic-tag topic-tag--solved">{{ __('forum.solved') }}</li>
|
||||
@endif
|
||||
@if ($topic->invalid)
|
||||
<li class="topic-tag topic-tag--invalid">{{ __('forum.invalid') }}</li>
|
||||
@endif
|
||||
@if ($topic->bug)
|
||||
<li class="topic-tag topic-tag--bug">{{ __('forum.bug') }}</li>
|
||||
@endif
|
||||
@if ($topic->suggestion)
|
||||
<li class="topic-tag topic-tag--suggestion">{{ __('forum.suggestion') }}</li>
|
||||
@endif
|
||||
@if ($topic->implemented)
|
||||
<li class="topic-tag topic-tag--implemented">{{ __('forum.implemented') }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
{{ $posts->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@if ($posts->count() > 0)
|
||||
<ol class="topic-posts">
|
||||
@foreach ($posts as $post)
|
||||
<li class="topic-posts__item">
|
||||
<x-forum.post :post="$post" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
@else
|
||||
No topics.
|
||||
@endif
|
||||
</div>
|
||||
{{ $posts->links('partials.pagination') }}
|
||||
</section>
|
||||
@@ -0,0 +1,176 @@
|
||||
<div class="sidebar2">
|
||||
<div>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('common.latest-topics') }}</h2>
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
@if($topics->count() > 0)
|
||||
<ul class="topic-listings">
|
||||
@foreach ($topics as $topic)
|
||||
<li class="topic-listings__item">
|
||||
<x-forum.topic-listing :topic="$topic" />
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<div class="panel__body">
|
||||
No topics.
|
||||
</div>
|
||||
@endif
|
||||
{{ $topics->links('partials.pagination') }}
|
||||
</section>
|
||||
</div>
|
||||
<aside>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('torrent.filters') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
placeholder=""
|
||||
/>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
{{ __('common.search') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
name="category"
|
||||
id="category"
|
||||
class="form__select"
|
||||
wire:model="forumId"
|
||||
>
|
||||
<option value="">Any</option>
|
||||
@foreach ($forumCategories->sortBy('position') as $category)
|
||||
<option value="{{ $category->id }}">
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
@foreach ($category->forums->sortBy('position') as $forum)
|
||||
<option value="{{ $forum->id }}">
|
||||
» {{ $forum->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="category">
|
||||
{{ __('common.forum') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
wire:model="label"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="approved">
|
||||
{{ __('forum.approved') }}
|
||||
</option>
|
||||
<option value="implemented">
|
||||
{{ __('forum.implemented') }}
|
||||
</option>
|
||||
<option value="solved">
|
||||
{{ __('forum.solved') }}
|
||||
</option>
|
||||
<option value="denied">
|
||||
{{ __('forum.denied') }}
|
||||
</option>
|
||||
<option value="invalid">
|
||||
{{ __('forum.invalid') }}
|
||||
</option>
|
||||
<option value="bug">
|
||||
{{ __('forum.bug') }}
|
||||
</option>
|
||||
<option value="suggestion">
|
||||
{{ __('forum.suggestion') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('forum.label') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
required
|
||||
wire:model="sortField"
|
||||
>
|
||||
<option value="last_reply_at">
|
||||
{{ __('forum.updated-at') }}
|
||||
</option>
|
||||
<option value="created_at">
|
||||
{{ __('forum.created-at') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="sorting">
|
||||
{{ __('common.sort') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
required
|
||||
wire:model="sortDirection"
|
||||
>
|
||||
<option value="desc">
|
||||
{{ __('common.descending') }}
|
||||
</option>
|
||||
<option value="asc">
|
||||
{{ __('common.ascending') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.direction') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="state"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="open">
|
||||
{{ __('forum.open') }}
|
||||
</option>
|
||||
<option value="close">
|
||||
{{ __('forum.closed') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('forum.state') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="subscribed"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="include">
|
||||
{{ __('forum.subscribed') }}
|
||||
</option>
|
||||
<option value="exclude">
|
||||
{{ __('forum.not-subscribed') }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="direction">
|
||||
{{ __('common.subscriptions') }}
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
@@ -617,10 +617,10 @@
|
||||
>
|
||||
@switch ($mediaType)
|
||||
@case('movie')
|
||||
{{ $meta->title ?? '' }} (<time>{{ \substr($meta->release_date, 0, 4) ?? '' }}</time>)
|
||||
{{ $meta->title ?? '' }} (<time>{{ substr($meta->release_date ?? '', 0, 4) ?? '' }}</time>)
|
||||
@break
|
||||
@case('tv')
|
||||
{{ $meta->name ?? '' }} (<time>{{ \substr($meta->first_air_date, 0, 4) ?? '' }}</time>)
|
||||
{{ $meta->name ?? '' }} (<time>{{ substr($meta->first_air_date ?? '', 0, 4) ?? '' }}</time>)
|
||||
@break
|
||||
@endswitch
|
||||
</a>
|
||||
@@ -675,7 +675,7 @@
|
||||
@switch (true)
|
||||
@case($mediaType === 'movie')
|
||||
@case($mediaType === 'tv')
|
||||
{{ $meta->overview }}
|
||||
{{ $meta->overview ?? '' }}
|
||||
@break
|
||||
@endswitch
|
||||
</p>
|
||||
|
||||
@@ -1,51 +1,65 @@
|
||||
<div>
|
||||
<div class="mb-10">
|
||||
<input type="text" wire:model="search" class="form-control" placeholder="Search By Name"/>
|
||||
</div>
|
||||
|
||||
@foreach($shows as $show)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent" style=" height: 265px;">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->seasons_count }} Seasons
|
||||
</span>
|
||||
@if ($show->networks)
|
||||
@foreach ($show->networks as $network)
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $network->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($show->poster) ? tmdb_image('poster_mid', $show->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.shows.show', ['id' => $show->id]) }}">{{ $show->name }}
|
||||
@if($show->first_aired)
|
||||
<span class="text-bold text-pink"> {{ $show->first_aired }}</span>
|
||||
@endif
|
||||
</a>
|
||||
</h3>
|
||||
@if ($show->genres)
|
||||
@foreach ($show->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
@endif
|
||||
<p class="description_plot">
|
||||
{{ $show->overview }}
|
||||
</p>
|
||||
</div>
|
||||
<section class="panelV2">
|
||||
<header class="panel__header">
|
||||
<h2 class="panel__heading">{{ __('mediahub.shows') }}</h2>
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<br>
|
||||
<div class="text-center">
|
||||
{{ $shows->links() }}
|
||||
</header>
|
||||
{{ $shows->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@foreach($shows as $show)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent" style=" height: 265px;">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->seasons_count }} Seasons
|
||||
</span>
|
||||
@if ($show->networks)
|
||||
@foreach ($show->networks as $network)
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $network->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($show->poster) ? tmdb_image('poster_mid', $show->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.shows.show', ['id' => $show->id]) }}">{{ $show->name }}
|
||||
@if($show->first_aired)
|
||||
<span class="text-bold text-pink"> {{ $show->first_aired }}</span>
|
||||
@endif
|
||||
</a>
|
||||
</h3>
|
||||
@if ($show->genres)
|
||||
@foreach ($show->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
@endif
|
||||
<p class="description_plot">
|
||||
{{ $show->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{ $shows->links('partials.pagination') }}
|
||||
</div>
|
||||
|
||||
@@ -214,9 +214,7 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center">
|
||||
{{ $actives->links() }}
|
||||
</div>
|
||||
{{ $actives->links('partials.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
|
||||
|
||||
@@ -109,10 +109,8 @@
|
||||
{{ $resurrection->created_at->diffForHumans() }}
|
||||
</td>
|
||||
<td>
|
||||
@php $torrent = App\Models\Torrent::where('id', '=',
|
||||
$resurrection->torrent_id)->pluck('id') @endphp
|
||||
@php $history = App\Models\History::select(['seedtime'])->where('user_id', '=',
|
||||
$user->id)->where('torrent_id', '=', $torrent)->first() @endphp
|
||||
$user->id)->where('torrent_id', '=', $resurrection->torrent_id)->first() @endphp
|
||||
{{ empty($history) ? '0' : App\Helpers\StringHelper::timeElapsed($history->seedtime) }}
|
||||
</td>
|
||||
<td>
|
||||
@@ -140,9 +138,7 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center">
|
||||
{{ $resurrections->links() }}
|
||||
</div>
|
||||
{{ $resurrections->links('partials.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -444,9 +444,7 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center">
|
||||
{{ $histories->links() }}
|
||||
</div>
|
||||
{{ $histories->links('partials.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center">
|
||||
{{ $uploads->links() }}
|
||||
{{ $uploads->links('partials.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="box container">
|
||||
@livewire('collection-search')
|
||||
</div>
|
||||
@livewire('collection-search')
|
||||
@endsection
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="box container">
|
||||
@livewire('company-search')
|
||||
</div>
|
||||
@livewire('company-search')
|
||||
@endsection
|
||||
|
||||
@@ -25,101 +25,97 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="block">
|
||||
<div style="width: 100% !important; display: table !important;">
|
||||
<div class="header mediahub" style="width: 100% !important; display: table-cell !important;">
|
||||
<h1 class="text-center"
|
||||
style="font-family: Shrikhand, cursive; font-size: 4em; font-weight: 400; margin: 10px 0 20px;">
|
||||
{{ $company->name }}
|
||||
</h1>
|
||||
<h2 class="text-center" style="margin: 0;">{{ $company->tv_count }} {{ __('mediahub.shows') }}
|
||||
| {{ $company->movie_count }} {{ __('mediahub.movies') }}</h2>
|
||||
@foreach($shows as $show)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_seasons }} {{ __('mediahub.seasons') }}
|
||||
</span>
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_episodes }} {{ __('mediahub.episodes') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($show->poster) ? tmdb_image('poster_mid', $show->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.shows.show', ['id' => $show->id]) }}">{{ $show->name }}
|
||||
<span class="text-bold text-pink"> {{ substr($show->first_air_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@if ($show->genres)
|
||||
@foreach ($show->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
@endif
|
||||
<p class="description_plot">
|
||||
{{ $show->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('mediahub.shows') }} ({{ $company->tv_count }})</h2>
|
||||
{{ $movies->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@forelse($shows as $show)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_seasons }} {{ __('mediahub.seasons') }}
|
||||
</span>
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_episodes }} {{ __('mediahub.episodes') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($show->poster) ? tmdb_image('poster_mid', $show->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.shows.show', ['id' => $show->id]) }}">{{ $show->name }}
|
||||
<span class="text-bold text-pink"> {{ substr($show->first_air_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@if ($show->genres)
|
||||
@foreach ($show->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
@endif
|
||||
<p class="description_plot">
|
||||
{{ $show->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@if ($movies->isNotEmpty())
|
||||
<div class="col-md-12">
|
||||
<h2 class="text-center">Movies</h2>
|
||||
</div>
|
||||
@endif
|
||||
@foreach($movies as $movie)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
<i class="far fa-fw fa-clock text-green"></i> {{ $movie->runtime }} mins
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($movie->poster) ? tmdb_image('poster_mid', $movie->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.movies.show', ['id' => $movie->id]) }}">{{ $movie->title }}
|
||||
<span class="text-bold text-pink"> {{ substr($movie->release_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@foreach ($movie->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
<p class="description_plot">
|
||||
{{ $movie->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="text-center">
|
||||
{{ ($company->tv_count > 25 && $company->tv_count > $company->movie_count) ? $shows->links() : $movies->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
No {{ __('mediahub.shows') }}
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
{{ $movies->links('partials.pagination') }}
|
||||
</section>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('mediahub.movies') }} ({{ $company->movie_count }})</h2>
|
||||
{{ $shows->links('partials.pagination') }}
|
||||
<div class="panel__body">
|
||||
@forelse($movies as $movie)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
<i class="far fa-fw fa-clock text-green"></i> {{ $movie->runtime }} mins
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($movie->poster) ? tmdb_image('poster_mid', $movie->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.movies.show', ['id' => $movie->id]) }}">{{ $movie->title }}
|
||||
<span class="text-bold text-pink"> {{ substr($movie->release_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@foreach ($movie->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
<p class="description_plot">
|
||||
{{ $movie->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
No {{ __('mediahub.movies') }}
|
||||
@endforelse
|
||||
</div>
|
||||
{{ $shows->links('partials.pagination') }}
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -20,49 +20,24 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="block">
|
||||
<section class="header">
|
||||
<div class="gradient people">
|
||||
<div class="inner_content">
|
||||
<div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1414 300">
|
||||
<path class="cls-1"
|
||||
d="M531.37,223.71a15.76,15.76,0,0,0,3.15-22.07h0a15.76,15.76,0,0,0-22.07-3.15l-38.92,29.2a15.74,15.74,0,0,1-18.67-24.88L541,138.15a15.76,15.76,0,0,0-18.92-25.21L272.84,300H440.4A15.77,15.77,0,0,1,445,288.6l-.34.2Z"></path>
|
||||
<path class="cls-1"
|
||||
d="M801.29,216.67l-1.08.81-.83.68c-29.5,23.63-64.11,48.17-64.11,48.17v-.09A15.74,15.74,0,0,1,713.62,244l.12-.16.44-.57c.1-.12.19-.25.29-.38l.06,0a15.9,15.9,0,0,1,2.81-2.52c6-4.59,38.89-29.9,52-38.67l.08-.05a15.75,15.75,0,0,0-19.85-24.44L609.2,282.51c-6.76,3.69-16,2.2-20.74-4.14a15.74,15.74,0,0,1,.61-19.64L676.68,193a15.76,15.76,0,0,0-18.92-25.21L481.54,300H683.06l-.06.06h11.06l.12-.06h48.59l77.44-58.11a15.76,15.76,0,1,0-18.92-25.21Z"></path>
|
||||
<path class="cls-1"
|
||||
d="M563.68,104.48a15.69,15.69,0,0,0,25.1-18.84h0a15.69,15.69,0,0,0-25.1,18.84Z"></path>
|
||||
<path class="cls-1"
|
||||
d="M1091.43.46a15.77,15.77,0,0,1-4.58,11.4l.34-.2-86.74,65.09a15.76,15.76,0,0,0-3.15,22.07h0a15.76,15.76,0,0,0,22.07,3.15l38.92-29.2A15.74,15.74,0,0,1,1077,97.64l-86.17,64.66a15.76,15.76,0,0,0,18.92,25.21L1259,.46Z"></path>
|
||||
<path class="cls-1"
|
||||
d="M848.78.46l.06-.06H837.77l-.12.06H789.06L711.62,58.57a15.76,15.76,0,1,0,18.92,25.21l1.08-.81.83-.68c29.5-23.62,64.11-48.17,64.11-48.17v.09a15.74,15.74,0,0,1,21.65,22.21l-.12.16-.44.57c-.1.12-.19.25-.29.38l-.06,0a15.9,15.9,0,0,1-2.81,2.52c-6,4.59-38.89,29.9-52,38.67l-.08.05a15.75,15.75,0,0,0,19.85,24.44L922.63,18c6.76-3.69,16-2.2,20.74,4.14a15.74,15.74,0,0,1-.61,19.64l-87.61,65.74a15.76,15.76,0,0,0,18.92,25.21L1050.29.46Z"></path>
|
||||
<path class="cls-1"
|
||||
d="M968.15,196A15.69,15.69,0,0,0,943,214.83h0A15.69,15.69,0,0,0,968.15,196Z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<a href="#"><h2>{{ __('common.genres') }}</h2></a>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('common.genres') }}</h2>
|
||||
{{ $genres->links('partials.pagination') }}
|
||||
<div class="panel__body blocks">
|
||||
@foreach ($genres as $genre)
|
||||
<a href="{{ route('mediahub.genres.show', ['id' => $genre->id]) }}" style="padding: 0 2px;">
|
||||
<div class="people media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2 class="text-bold"> {{ $genre->name }}</h2>
|
||||
<span style="background-color: #317aaf;"></span>
|
||||
<h2 style="font-size: 14px;">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tv-retro"></i> {{ $genre->tv->count() }} {{ __('mediahub.shows') }}
|
||||
|
|
||||
<i class="{{ config('other.font-awesome') }} fa-film"></i> {{ $genre->movie->count() }} {{ __('mediahub.movies') }}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="blocks">
|
||||
@foreach ($genres as $genre)
|
||||
<a href="{{ route('mediahub.genres.show', ['id' => $genre->id]) }}" style="padding: 0 2px;">
|
||||
<div class="people media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2 class="text-bold"> {{ $genre->name }}</h2>
|
||||
<span style="background-color: #317aaf;"></span>
|
||||
<h2 style="font-size: 14px;">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tv-retro"></i> {{ $genre->tv->count() }} {{ __('mediahub.shows') }}
|
||||
|
|
||||
<i class="{{ config('other.font-awesome') }} fa-film"></i> {{ $genre->movie->count() }} {{ __('mediahub.movies') }}
|
||||
</h2>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="text-center">
|
||||
{{ $genres->links() }}
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
{{ $genres->links('partials.pagination') }}
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -25,101 +25,94 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="block">
|
||||
<div style="width: 100% !important; display: table !important;">
|
||||
<div class="header mediahub" style="width: 100% !important; display: table-cell !important;">
|
||||
<h1 class="text-center"
|
||||
style="font-family: Shrikhand, cursive; font-size: 7em; font-weight: 400; margin: 10px 0">
|
||||
{{ $genre->name }}
|
||||
</h1>
|
||||
<h2 class="text-center">{{ $genre->tv_count }} {{ __('mediahub.shows') }}
|
||||
| {{ $genre->movie_count }} {{ __('mediahub.movies') }}</h2>
|
||||
@foreach($shows as $show)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_seasons }} {{ __('mediahub.seasons') }}
|
||||
</span>
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_episodes }} {{ __('mediahub.episodes') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($show->poster) ? tmdb_image('poster_mid', $show->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.shows.show', ['id' => $show->id]) }}">{{ $show->name }}
|
||||
<span class="text-bold text-pink"> {{ substr($show->first_air_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@if ($show->genres)
|
||||
@foreach ($show->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
@endif
|
||||
<p class="description_plot">
|
||||
{{ $show->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('mediahub.shows') }} ({{ $genre->tv_count }})</h2>
|
||||
<div class="panel__body">
|
||||
@forelse($shows as $show)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_seasons }} {{ __('mediahub.seasons') }}
|
||||
</span>
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
{{ $show->number_of_episodes }} {{ __('mediahub.episodes') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($show->poster) ? tmdb_image('poster_mid', $show->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.shows.show', ['id' => $show->id]) }}">{{ $show->name }}
|
||||
<span class="text-bold text-pink"> {{ substr($show->first_air_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@if ($show->genres)
|
||||
@foreach ($show->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
@endif
|
||||
<p class="description_plot">
|
||||
{{ $show->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@if ($movies->isNotEmpty())
|
||||
<div class="col-md-12">
|
||||
<h2 class="text-center">Movies</h2>
|
||||
</div>
|
||||
@endif
|
||||
@foreach($movies as $movie)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
<i class="far fa-fw fa-clock text-green"></i> {{ $movie->runtime }} mins
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($movie->poster) ? tmdb_image('poster_mid', $movie->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.movies.show', ['id' => $movie->id]) }}">{{ $movie->title }}
|
||||
<span class="text-bold text-pink"> {{ substr($movie->release_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@foreach ($movie->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
<p class="description_plot">
|
||||
{{ $movie->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="text-center">
|
||||
{{ ($genre->tv_count > 25 && $genre->tv_count > $genre->movie_count) ? $shows->links() : $movies->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
No {{ __('mediahub.shows') }}
|
||||
@endforelse
|
||||
</div>
|
||||
{{ $shows->links('partials.pagination') }}
|
||||
</section>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('mediahub.movies') }} ({{ $genre->movie_count }})</h2>
|
||||
{{ $shows->links('partials.pagination') }}
|
||||
<div class="panel__body"
|
||||
@forelse($movies as $movie)
|
||||
<div class="col-md-12">
|
||||
<div class="card is-torrent">
|
||||
<div class="card_head">
|
||||
<span class="badge-user text-bold" style="float:right;">
|
||||
<i class="far fa-fw fa-clock text-green"></i> {{ $movie->runtime }} mins
|
||||
</span>
|
||||
</div>
|
||||
<div class="card_body">
|
||||
<div class="body_poster">
|
||||
<img src="{{ isset($movie->poster) ? tmdb_image('poster_mid', $movie->poster) : 'https://via.placeholder.com/200x300' }}"
|
||||
class="show-poster">
|
||||
</div>
|
||||
<div class="body_description">
|
||||
<h3 class="description_title">
|
||||
<a href="{{ route('mediahub.movies.show', ['id' => $movie->id]) }}">{{ $movie->title }}
|
||||
<span class="text-bold text-pink"> {{ substr($movie->release_date, 0, 4) }}</span>
|
||||
</a>
|
||||
</h3>
|
||||
@foreach ($movie->genres as $genre)
|
||||
<span class="genre-label">{{ $genre->name }}</span>
|
||||
@endforeach
|
||||
<p class="description_plot">
|
||||
{{ $movie->overview }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card_footer">
|
||||
<div style="float: left;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{ $shows->links('partials.pagination') }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -14,88 +14,69 @@
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="block">
|
||||
<div class="header mediahub text-center">
|
||||
<div class="mediahub_content">
|
||||
<div class="content">
|
||||
|
||||
<h1 style=" height: 150px; font-family: Shrikhand, cursive; font-size: 7em; font-weight: 400; margin: 0;">{{ __('mediahub.title') }}</h1>
|
||||
<h3>{{ __('mediahub.select-hub') }}</h3>
|
||||
|
||||
<div class="blocks text-center" style=" justify-content: center;">
|
||||
{{--TV Shows--}}
|
||||
<a href="{{ route('mediahub.shows.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.shows') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $tv }} {{ __('mediahub.shows') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{--Movies--}}
|
||||
<a href="{{ route('mediahub.movies.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.movies') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $movies }} {{ __('mediahub.movies') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{--Collections--}}
|
||||
<a href="{{ route('mediahub.collections.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.collections') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $collections }} {{ __('mediahub.collections') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{--People--}}
|
||||
<a href="{{ route('mediahub.persons.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.persons') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $persons }} {{ __('mediahub.persons') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{--Genres--}}
|
||||
<a href="{{ route('mediahub.genres.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.genres') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $genres }} {{ __('mediahub.genres') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{--Networks--}}
|
||||
<a href="{{ route('mediahub.networks.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.networks') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $networks }} {{ __('mediahub.networks') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{--Companies--}}
|
||||
<a href="{{ route('mediahub.companies.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.companies') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $companies }} {{ __('mediahub.companies') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<h6 style="font-size: 10px;">
|
||||
<i>{{ __('mediahub.disclaimer') }}</i>
|
||||
</h6>
|
||||
<img class="mb-20" src="/img/tmdb_long.svg" style="width: 200px;">
|
||||
</div>
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('mediahub.title') }}</h2>
|
||||
<div class="panel__body blocks" style="justify-content: center;">
|
||||
<a href="{{ route('mediahub.shows.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.shows') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $tv }} {{ __('mediahub.shows') }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="{{ route('mediahub.movies.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.movies') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $movies }} {{ __('mediahub.movies') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
<a href="{{ route('mediahub.collections.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.collections') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $collections }} {{ __('mediahub.collections') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
<a href="{{ route('mediahub.persons.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.persons') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $persons }} {{ __('mediahub.persons') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
<a href="{{ route('mediahub.genres.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.genres') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $genres }} {{ __('mediahub.genres') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
<a href="{{ route('mediahub.networks.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.networks') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $networks }} {{ __('mediahub.networks') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
<a href="{{ route('mediahub.companies.index') }}" class="">
|
||||
<div class="movie media_blocks" style="background-color: rgba(0, 0, 0, 0.33);">
|
||||
<h2>{{ __('mediahub.companies') }} Hub</h2>
|
||||
<span style="background-color: #01d277;"></span>
|
||||
<h2 style="font-size: 12px;">{{ $companies }} {{ __('mediahub.companies') }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">Disclaimer</h2>
|
||||
<div class="panel__body" style="text-align: center">
|
||||
{{ __('mediahub.disclaimer') }}
|
||||
<img class="" src="/img/tmdb_long.svg" style="width: 200px;">
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user