From c68b4bc1ca1cc85d4d44cc0b98514c47b5467f28 Mon Sep 17 00:00:00 2001 From: chung3011 Date: Fri, 28 Jan 2022 11:57:13 +0700 Subject: [PATCH 001/159] =?UTF-8?q?practice-select=E3=81=A7submit=E3=81=AE?= =?UTF-8?q?href=E3=82=92=E7=B7=A8=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/practice-select.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/practice-select.vue b/app/javascript/practice-select.vue index 73a1c3fe6ae..46ce5fa3638 100644 --- a/app/javascript/practice-select.vue +++ b/app/javascript/practice-select.vue @@ -62,7 +62,7 @@ export default { }, submit() { this.$nextTick(() => { - location.href = `${location.pathname}?solved=${this.solved}&practice_id=${this.selected.id}&title=${this.selected.title}` + location.href = `${location.pathname}?all=true&solved=${this.solved}&practice_id=${this.selected.id}&title=${this.selected.title}` }) } } From 8790657c4c2520a19b8a06a9992fd9b9b100df05 Mon Sep 17 00:00:00 2001 From: ot0m1 Date: Sat, 5 Feb 2022 21:58:25 +0900 Subject: [PATCH 002/159] first commit From f859a3f9d0a11872f911d67632984c1243c25950 Mon Sep 17 00:00:00 2001 From: ot0m1 Date: Thu, 10 Feb 2022 23:00:24 +0900 Subject: [PATCH 003/159] =?UTF-8?q?=E7=9B=B8=E8=AB=87=E9=83=A8=E5=B1=8B?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/search_helper.rb | 8 ++++++++ app/javascript/searchable.vue | 12 ++++++++++++ app/views/api/searchables/_searchable.json.jbuilder | 9 +++++++++ 3 files changed, 29 insertions(+) diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index e2395913a10..ed9178499a4 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -39,4 +39,12 @@ def filtered_message(searchable) def comment_or_answer?(searchable) searchable.is_a?(Comment) || searchable.is_a?(Answer) end + + def has_talk?(searchable) + searchable.instance_of?(User) && Talk.find_by(user_id: searchable.id) ? true : false + end + + def talk_id(searchable) + Talk.find_by(user_id: searchable.id).id + end end diff --git a/app/javascript/searchable.vue b/app/javascript/searchable.vue index 4cf7e48e23d..0989542403c 100644 --- a/app/javascript/searchable.vue +++ b/app/javascript/searchable.vue @@ -36,6 +36,8 @@ | {{ searchable.document_author_login_name }} |  {{ searchable.model_name_with_i18n }} | ) + a(v-if='canDisplayTalk', :href='talkUrl') + | 相談部屋