-
-
Notifications
You must be signed in to change notification settings - Fork 99
feat(support): FAQ #928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(support): FAQ #928
Conversation
WerySkok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Советую решить конфликт слияния
| use openvk\Web\Models\Repositories\FAQCategories; | ||
| use openvk\Web\Models\RowModel; | ||
|
|
||
| class FAQArticle extends RowModel |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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;" /> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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;"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вижу повторяющийся код. Мейби отдельный шаблон для этого выделить?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Под овк не подходит, нужно выбрать более тусклые цвета, тень к иконкам добавить там.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а можно кста какие-нибудь опенсурсные иконки взять в виде .svg и сделать их заливкой под наш цвет
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Этот PR добавляет возможность создавать и редактировать FAQ через интерфейс. Есть возможность добавлять категории и статьи, как в оригинальном ВКонтакте.
Также возможно создавать статьи/категории, доступные только для агентов Поддержки, например, какую-нибудь внутреннюю документацию.
Есть возможность ограничивать просмотр каждой статьи отдельно, разрешать или запрещать просматривать её незарегистрированным пользователям.
Также возможно создавать статьи и категории для разных локализаций. Для удобства перевода статей существует функционал дублирования категории (со статьями или без них).





Closes #294.