This repository has been archived by the owner on Jul 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Beta 8! * Apply fixes from StyleCI (#44) * Beta 8 composer * Updated * Add events * Changed on event * Apply fixes from StyleCI (#45) * Extend.php * Delete convert.sh * Some routes refactoring (BREAKS API COMPATIBILITY) & fix copyright link
- Loading branch information
Charlie
committed
Nov 16, 2018
1 parent
7f67f97
commit aac68b2
Showing
62 changed files
with
2,137 additions
and
1,752 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/* | ||
* This file is part of reflar/polls. | ||
* | ||
* Copyright (c) ReFlar. | ||
* | ||
* https://reflar.redevs.org | ||
* | ||
* For the full copyright and license information, please view the license.md | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Reflar\Polls; | ||
|
||
use Flarum\Extend; | ||
use Illuminate\Contracts\Events\Dispatcher; | ||
use Reflar\Polls\Api\Controllers; | ||
|
||
return [ | ||
(new Extend\Frontend('admin')) | ||
->js(__DIR__.'/js/dist/admin.js'), | ||
(new Extend\Frontend('forum')) | ||
->js(__DIR__.'/js/dist/forum.js') | ||
->css(__DIR__.'/resources/less/forum.less') | ||
->css(__DIR__.'/resources/css/dist/DateTimePicker.min.css'), | ||
new Extend\Locales(__DIR__.'/resources/locale'), | ||
(new Extend\Routes('api')) | ||
->get('/reflar/polls', 'polls.index', Controllers\ListPollController::class) | ||
->patch('/reflar/polls/{id}', 'polls.update', Controllers\UpdatePollController::class) | ||
->patch('/reflar/polls/{id}/endDate', 'polls.endDate.update', Controllers\UpdateEndDateController::class) | ||
->delete('/reflar/polls/{id}', 'polls.delete', Controllers\DeletePollController::class) | ||
->get('/reflar/polls/votes', 'polls.votes.index', Controllers\ListVotesController::class) | ||
->post('/reflar/polls/votes', 'polls.votes.create', Controllers\CreateVoteController::class) | ||
->patch('/reflar/polls/votes/{id}', 'polls.votes.update', Controllers\UpdateVoteController::class) | ||
->post('/reflar/polls/answers', 'polls.answers.create', Controllers\CreateAnswerController::class) | ||
->patch('/reflar/polls/answers/{id}', 'polls.answers.update', Controllers\UpdateAnswerController::class) | ||
->delete('/reflar/polls/answers/{id}', 'polls.answers.delete', Controllers\DeleteAnswerController::class), | ||
function (Dispatcher $events) { | ||
$events->subscribe(Listeners\AddDiscussionPollRelationship::class); | ||
$events->subscribe(Listeners\AddForumFieldRelationship::class); | ||
$events->subscribe(Listeners\SavePollToDatabase::class); | ||
}, | ||
]; |
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,11 @@ | ||
/* | ||
* This file is part of Flarum. | ||
* | ||
* (c) Toby Zerner <toby.zerner@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
export * from './src/common'; | ||
export * from './src/admin'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.