Skip to content

Commit

Permalink
#311 채택/채택 취소 시 메세지를 출력하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
xharpenParksuhyeon committed Aug 20, 2021
1 parent ddd4f12 commit 6defb0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions langs/lang.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<?php

return [
'adopted' => [
'ko' => '답변을 채택합니다.',
'en' => 'Adopted reply'
],
'unAdopted' => [
'ko' => '답변에 대한 채택을 취소를 합니다.',
'en' => 'unAdopted reply'
],
'canNotDeletedAdopted' => [
'ko' => '채택된 답변은 삭제할 수 없습니다',
'en' => 'Adopted articles cannot be deleted.'
Expand Down
2 changes: 2 additions & 0 deletions src/Controllers/BoardModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,7 @@ public function adopt(Request $request, string $menuUrl, string $id)

return XePresenter::redirect()
->to($this->urlHandler->getShow($parentBoard, $request->query->all()))
->with('alert', ['type' => 'success', 'message' => xe_trans('board::adopted')])
->setData(['item' => $parentBoard]);
}

Expand Down Expand Up @@ -1335,6 +1336,7 @@ public function unAdopt(Request $request, string $menuUrl, string $id)

return XePresenter::redirect()
->to($this->urlHandler->getShow($parentBoard, $request->query->all()))
->with('alert', ['type' => 'success', 'message' => xe_trans('board::unAdopted')])
->setData(['item' => $parentBoard]);
}

Expand Down

0 comments on commit 6defb0b

Please sign in to comment.