-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UI for users to see an org's FAQ (#673)
* Add UI to allow all users to view an orgs FAQs regardless of authentication status * lint fix * Move question and answer to a component for reusability * update ID --------- Co-authored-by: Ben Robinson <ben.robinson@b2bwave.com>
- Loading branch information
1 parent
ed3c493
commit ff77741
Showing
12 changed files
with
62 additions
and
161 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Organizations::PublicFaqController < Organizations::BaseController | ||
skip_verify_authorized only: %i[index] | ||
|
||
def index | ||
@faqs = Faq.all | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,6 @@ def account_select | |
def about_us | ||
end | ||
|
||
def faq | ||
end | ||
|
||
def partners | ||
end | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="border-bottom py-3" id="heading_<%= faq.id %>"> | ||
<h3 class="mb-0 fw-bold"> | ||
<a href="#" class="d-flex align-items-center text-inherit active collapsed" data-bs-toggle="collapse" data-bs-target="#collapse_<%= faq.id %>" aria-expanded="false" aria-controls="collapse_<%= faq.id %>"> | ||
<span class="me-auto"><%= faq.question %></span> | ||
<span class="collapse-toggle ms-4"> | ||
<i class="fe fe-plus text-primary"></i> | ||
</span> | ||
</a> | ||
</h3> | ||
</div> | ||
<div id="collapse_<%= faq.id %>" class="collapse" aria-labelledby="heading_<%= faq.id %>" data-bs-parent="#accordion-public-faq"> | ||
<div class="py-3 fs-4"><%= faq.answer %></div> | ||
</div> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<header class="pt-5 pb-5" > | ||
<div class="container"> | ||
<div class="text-center"> | ||
<h1 class="section-heading text-uppercase underline"> | ||
<%= t('.header') %> | ||
</h1> | ||
</div> | ||
</div> <!--container--> | ||
</header> | ||
|
||
<section class="pb-5" id="public_faq"> | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col-lg-8 col-md-10 col-12"> | ||
<div class="accordion accordion-flush" id="accordion-public-faq"> | ||
<% @faqs.each do |faq| %> | ||
<%= render "components/question_and_answer", faq: faq %> | ||
<% end %> | ||
</div> | ||
<div class="mt-8 text-center"> | ||
<%= link_to t('.more_questions'), new_contact_path, class: "btn btn-outline-primary" %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> <!--container--> | ||
</section> |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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