forked from excid3/simple_discussion
-
Couldn't load subscription status.
- Fork 20
feat(gsoc'24): topic search implementation #28
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
Open
Waishnav
wants to merge
10
commits into
CircuitVerse:master
Choose a base branch
from
Waishnav:topic_search
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7de0f54
feat: basic topic search implementation
Waishnav 05a1123
feat: removing implementation for topic search and exposing this
Waishnav c36c160
fix ci standardrb issue
Waishnav 53b3f44
fix: added default implementation of topic_search helper
Waishnav e81ce9d
fix: removed unnecessary changes
Waishnav 75955b6
fix: standardrb
Waishnav e13f38b
fix: i18 added
Waishnav a6a9c8f
fix: added button text i18n
Waishnav 21c2a78
fix: moved the search logic to model and it will be overidable through
Waishnav 74ac3d6
fix: standardrb
Waishnav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,21 @@ | ||
| <select class="custom-select w-auto mr-auto mb-4" onchange="window.location.href=this.value" name="choose_category"> | ||
| <option value="<%= simple_discussion.forum_threads_path %>" <% if request.path == simple_discussion.forum_threads_path %> selected <% end %>><%= t("all_categories") %> </option> | ||
| <% ForumCategory.sorted.each do |category| %> | ||
| <option value="<%= simple_discussion.forum_category_forum_threads_path(category) %>" <% if request.path == simple_discussion.forum_category_forum_threads_path(category) %> selected <% end %> ><%= category.name %> </option> | ||
| <div class="row m-2 align-items-center my-4"> | ||
| <select class="custom-select w-auto mr-auto" onchange="window.location.href=this.value" name="choose_category"> | ||
| <option value="<%= simple_discussion.forum_threads_path %>" <% if request.path == simple_discussion.forum_threads_path %> selected <% end %>><%= t("all_categories") %> </option> | ||
| <% ForumCategory.sorted.each do |category| %> | ||
| <option value="<%= simple_discussion.forum_category_forum_threads_path(category) %>" <% if request.path == simple_discussion.forum_category_forum_threads_path(category) %> selected <% end %> ><%= category.name %> </option> | ||
| <% end %> | ||
| </select> | ||
| <%= form_tag("/forum/threads/search", method: "get", id: "search-box", class: "form-inline") do %> | ||
| <%= text_field_tag :query, params[:query], placeholder: t('topic_search_input_placeholder'), autocomplete: "off", class: "form-control form-input" %> | ||
| <button class="btn primary-button" type="submit" name="button" value="Submit"><%= t('search') %></button> | ||
| <% end %> | ||
| </select> | ||
| </div> | ||
| <% if @forum_threads.none? %> | ||
| <div><%= t('search_not_found') %>. <%= t('check_out') %> <%= link_to t('latest_questions'), simple_discussion.forum_threads_path %> <%= t('instead') %> </div> | ||
| <% else %> | ||
|
|
||
| <%= render partial: "simple_discussion/forum_threads/forum_thread", collection: @forum_threads %> | ||
|
|
||
| <div class="forum-threads-nav text-center"> | ||
| <%= will_paginate @forum_threads, url_builder: simple_discussion, renderer: SimpleDiscussion::BootstrapLinkRenderer %> | ||
| </div> | ||
|
|
||
| <% end %> |
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.