Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

Commit

Permalink
Beta8 (#50)
Browse files Browse the repository at this point in the history
* 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
Show file tree
Hide file tree
Showing 62 changed files with 2,137 additions and 1,752 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# Polls by ReFlar

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ReFlar/polls/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/reflar/polls.svg)](https://github.com/ReFlar/polls)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ReFlar/polls/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/reflar/polls.svg)](https://github.com/ReFlar/polls)

A Flarum extension that adds polls to your discussions.

Expand Down
23 changes: 0 additions & 23 deletions bootstrap.php

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"source": "https://github.com/ReFlar/polls"
},
"require": {
"flarum/core": "^0.1.0-beta.7"
"flarum/core": "^0.1.0-beta.8"
},
"extra": {
"flarum-extension": {
"title": "ReFlar Polls",
"icon": {
"name": "signal",
"name": "fa fa-signal",
"backgroundColor": "#263238",
"color": "#ffffff"
}
Expand Down
43 changes: 43 additions & 0 deletions extend.php
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);
},
];
11 changes: 11 additions & 0 deletions js/admin.js
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';
10 changes: 0 additions & 10 deletions js/admin/Gulpfile.js

This file was deleted.

144 changes: 0 additions & 144 deletions js/admin/dist/extension.js

This file was deleted.

7 changes: 0 additions & 7 deletions js/admin/package.json

This file was deleted.

Loading

0 comments on commit aac68b2

Please sign in to comment.