Open
Conversation
WerySkok
requested changes
Nov 14, 2023
Member
WerySkok
left a comment
There was a problem hiding this comment.
Советую решить конфликт слияния
ghost
suggested changes
Jan 12, 2025
| use openvk\Web\Models\Repositories\FAQCategories; | ||
| use openvk\Web\Models\RowModel; | ||
|
|
||
| class FAQArticle extends RowModel |
| {block content} | ||
| <script> | ||
| function onLanguageSelectChanged(e) { | ||
| window.location.href = "/faq{$article->getId()}?act=edit&lang=" + e.value; |
| <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;" /> |
| prev_icon.innerHTML = number; | ||
| document.getElementById("icon-" + number).style.border = "3px solid red"; | ||
| } | ||
| </script> |
There was a problem hiding this comment.
нужно перенести в файл потому что ajax может неправильно включить
| function onLanguageSelectChanged(e) { | ||
| window.location.href = "/support?lang=" + e.value; | ||
| } | ||
| </script> |
| <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.
Вижу повторяющийся код. Мейби отдельный шаблон для этого выделить?
There was a problem hiding this comment.
Под овк не подходит, нужно выбрать более тусклые цвета, тень к иконкам добавить там.
Collaborator
There was a problem hiding this comment.
а можно кста какие-нибудь опенсурсные иконки взять в виде .svg и сделать их заливкой под наш цвет
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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





Closes #294.