Skip to content

Conversation

@n1rwana
Copy link
Member

@n1rwana n1rwana commented Jul 24, 2023

Этот PR добавляет возможность создавать и редактировать FAQ через интерфейс. Есть возможность добавлять категории и статьи, как в оригинальном ВКонтакте.

Также возможно создавать статьи/категории, доступные только для агентов Поддержки, например, какую-нибудь внутреннюю документацию.

Есть возможность ограничивать просмотр каждой статьи отдельно, разрешать или запрещать просматривать её незарегистрированным пользователям.

Также возможно создавать статьи и категории для разных локализаций. Для удобства перевода статей существует функционал дублирования категории (со статьями или без них).
image
image
image
image
image

Closes #294.

@WerySkok WerySkok requested review from Lumaeris, celestora, maksalees, myslivets and veselcraft and removed request for veselcraft August 9, 2023 12:43
Copy link
Member

@WerySkok WerySkok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Советую решить конфликт слияния

@ghost ghost changed the title FAQ в Поддержке feat(support): FAQ Dec 12, 2024
@veselcraft veselcraft requested review from a user and removed request for celestora and maksalees January 8, 2025 14:13
use openvk\Web\Models\Repositories\FAQCategories;
use openvk\Web\Models\RowModel;

class FAQArticle extends RowModel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мб отдельную папку для этого

{block content}
<script>
function onLanguageSelectChanged(e) {
window.location.href = "/faq{$article->getId()}?act=edit&lang=" + e.value;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

location.assign

<br/><br/>
<div style="display:grid;grid-template-columns: repeat(11, auto);row-gap: 10px;">
<div n:for="$i = 0; $i < 22; $i++" onclick="onIconClick({$i})">
<div id="icon-{$i}" style="width:28px;height:28px;border-radius:3px;background:url('/assets/packages/static/openvk/img/faq_icons.png');background-position:0 -{28 * $i}px;cursor:pointer;" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно перенести в стиль imho

prev_icon.innerHTML = number;
document.getElementById("icon-" + number).style.border = "3px solid red";
}
</script>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно перенести в файл потому что ajax может неправильно включить

function onLanguageSelectChanged(e) {
window.location.href = "/support?lang=" + e.value;
}
</script>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и это тоже в скрипт мб

<div style="display:grid;grid-template-columns: repeat(2, 1fr);row-gap:16px;">
<div n:foreach="$categories as $category" href="/faqs{$category->getId()}">
<h4 style="display:flex;line-height:28px;gap:8px;padding:8px;max-width:85%;">
<div style="width:28px;height:28px;border-radius:3px;background:url('/assets/packages/static/openvk/img/faq_icons.png');background-position:0 -{$category->getIconBackgroundPosition()}px;"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вижу повторяющийся код. Мейби отдельный шаблон для этого выделить?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+++

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Под овк не подходит, нужно выбрать более тусклые цвета, тень к иконкам добавить там.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а можно кста какие-нибудь опенсурсные иконки взять в виде .svg и сделать их заливкой под наш цвет

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

faq_icons
xd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Редактирование KnowledgeBase-файлов из админ-панели

4 participants