EDIT: Подразделы сайта (Каталог)
This commit is contained in:
parent
466b08b145
commit
615fe8b226
|
@ -56,7 +56,7 @@ class EditItemController extends Controller
|
|||
'category_arr' => WebModel::getItemTopic($domain['item_id']),
|
||||
'post_arr' => $item_post_related,
|
||||
'poll' => PollModel::getQuestion($domain['item_poll']),
|
||||
'assembly' => RulesItem::getDomains($domain['item_domain']),
|
||||
'subsections' => RulesItem::getDomains($domain['item_domain']),
|
||||
]
|
||||
],
|
||||
'item',
|
||||
|
|
|
@ -20,6 +20,7 @@ return [
|
|||
'news' => 'الاخبار',
|
||||
'team' => 'الفريق',
|
||||
'teams' => 'الفرق',
|
||||
'subsections' => 'الأقسام الفرعية',
|
||||
'table' => 'الطاولة',
|
||||
'team_not_users' => 'لا يوجد أعضاء في الفريق بعد...',
|
||||
'total_votes' => 'مجموع الأصوات',
|
||||
|
|
|
@ -20,6 +20,7 @@ return [
|
|||
'news' => 'News',
|
||||
'team' => 'Team',
|
||||
'teams' => 'Teams',
|
||||
'subsections' => 'Subsections',
|
||||
'table' => 'Table',
|
||||
'team_not_users' => 'There is no member in the team yet...',
|
||||
'total_votes' => 'Total Votes',
|
||||
|
|
|
@ -20,6 +20,7 @@ return [
|
|||
'news' => 'Știri',
|
||||
'team' => 'Echipă',
|
||||
'teams' => 'Echipe',
|
||||
'subsections' => 'Subsecțiuni',
|
||||
'table' => 'Masa',
|
||||
'team_not_users' => 'Întrucât să nu știți...',
|
||||
'total_votes' => 'Total de voturi',
|
||||
|
|
|
@ -20,6 +20,7 @@ return [
|
|||
'news' => 'Новость',
|
||||
'team' => 'Команда',
|
||||
'teams' => 'Команды',
|
||||
'subsections' => 'Подразделы',
|
||||
'table' => 'Таблица',
|
||||
'team_not_users' => 'В команде пока нет участников...',
|
||||
'total_votes' => 'Всего голосовало',
|
||||
|
|
|
@ -20,6 +20,7 @@ return [
|
|||
'news' => 'Новина',
|
||||
'team' => 'Команда',
|
||||
'teams' => 'Команди',
|
||||
'subsections' => 'Підрозділи',
|
||||
'table' => 'Таблиця',
|
||||
'team_not_users' => 'У команді поки немає учасників...',
|
||||
'total_votes' => 'Усього голосувало',
|
||||
|
|
|
@ -20,6 +20,7 @@ return [
|
|||
'news' => '新闻',
|
||||
'team' => '团队',
|
||||
'teams' => '团队',
|
||||
'subsections' => '小节',
|
||||
'table' => '桌子',
|
||||
'team_not_users' => '团队中还没有成员...',
|
||||
'total_votes' => '总票数',
|
||||
|
|
|
@ -20,6 +20,7 @@ return [
|
|||
'news' => '新闻',
|
||||
'team' => '團隊',
|
||||
'teams' => '團隊',
|
||||
'subsections' => '小节',
|
||||
'table' => '桌子',
|
||||
'team_not_users' => '团队中还没有成员...',
|
||||
'total_votes' => '总票数',
|
||||
|
|
|
@ -319,7 +319,7 @@ class WebModel extends \Hleb\Scheme\App\Models\MainModel
|
|||
|
||||
public static function getDomains($url)
|
||||
{
|
||||
$sql = "SELECT item_id, item_title, item_url, item_domain, rel.*
|
||||
$sql = "SELECT item_id, item_title, item_url, item_slug, item_domain, rel.*
|
||||
FROM items
|
||||
LEFT JOIN
|
||||
(
|
||||
|
|
|
@ -34,25 +34,7 @@ $domain = $data['domain']; ?>
|
|||
<span class="add-favicon btn btn-small btn-primary" data-id="<?= $domain['item_id']; ?>">+ favicon</span>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (count($data['assembly']) > 1) : ?>
|
||||
<div class="p15 bg-beige mt15">
|
||||
<h4 class="uppercase-box">Подборка</h3>
|
||||
<?php foreach ($data['assembly'] as $site) : ?>
|
||||
<div class="mb15<?php if($site['item_id'] == $domain['item_id']) : ?> bg-white p5-10<?php endif; ?>">
|
||||
<a href="<?= url('website', ['id' => $site['item_id'], 'slug' => $site['item_slug']]); ?>"><?= $site['item_title']; ?></a>
|
||||
<?= Html::facets($site['facet_list'], 'category', 'tag mr15'); ?>
|
||||
<?php if($site['item_id'] != $domain['item_id']) : ?>
|
||||
<a href="<?= url('content.edit', ['type' => 'item', 'id' => $site['item_id']]); ?>">
|
||||
<svg class="icons gray-600">
|
||||
<use xlink:href="/assets/svg/icons.svg#edit"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="green"><?= $site['item_url']; ?> <span class="gray-600 ml20">(<?= $site['item_domain']; ?>)</span></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?= insert('/content/item/subsections', ['subsections' => $data['subsections'], 'item_id' => $domain['item_id']]); ?>
|
||||
|
||||
<form action="<?= url('content.change', ['type' => 'item']); ?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
|
|
19
resources/views/default/content/item/subsections.php
Normal file
19
resources/views/default/content/item/subsections.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php if (count($subsections) > 1) : ?>
|
||||
<div class="p15 bg-beige mt15">
|
||||
<h4 class="uppercase-box"><?= __('app.subsections'); ?></h3>
|
||||
<?php foreach ($subsections as $site) : ?>
|
||||
<div class="mb15<?php if($site['item_id'] == $item_id) : ?> bg-white p5-10<?php endif; ?>">
|
||||
<a href="<?= url('website', ['id' => $site['item_id'], 'slug' => $site['item_slug']]); ?>"><?= $site['item_title']; ?></a>
|
||||
<?= Html::facets($site['facet_list'], 'category', 'tag mr15'); ?>
|
||||
<?php if($site['item_id'] != $item_id) : ?>
|
||||
<a href="<?= url('content.edit', ['type' => 'item', 'id' => $site['item_id']]); ?>">
|
||||
<svg class="icons gray-600">
|
||||
<use xlink:href="/assets/svg/icons.svg#edit"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="green"><?= $site['item_url']; ?> <span class="gray-600 ml20">(<?= $site['item_domain']; ?>)</span></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
Loading…
Reference in a new issue