-
Notifications
You must be signed in to change notification settings - Fork 4
Kompabilita s Nette 3.0, SkautisNette 3.0 a Skautis 3.0 #10
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
base: master
Are you sure you want to change the base?
Changes from 6 commits
0b4b7f0
3f66f61
22624e7
11e37b6
75de518
6c5c19d
73811f3
38be6da
e0e862a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # ws.skautis.cz | ||
| Webová aplikace pro vývojáře chtějící pracovat s informačním systémem [SkautIS](https://is.skaut.cz/). | ||
| Aplikace je dostupná na [ws.skautis.cz](https://ws.skautis.cz/) | ||
|
|
||
| Aplikace poskytuje: | ||
| - Základní informace pro vývojáře. | ||
| - Testovací rozhraní pro zkoušení API callů. | ||
| - Formulář pro žádost o povolení aplikace (získání ``ID_Application`` / ``appId``) | ||
|
|
||
| ## Lokální environment | ||
| Pro lokální spuštění je potřeba [docker](https://www.docker.com/) a [docker-compose](https://docs.docker.com/compose/). | ||
|
|
||
| ```bash | ||
| # Spustí container | ||
| docker-compose up -d | ||
| ``` | ||
|
|
||
| Aplikace je poté dostupná na [http://127.0.0.1/](http://127.0.0.1/). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| skautis: | ||
| applicationId: c9f6e8b1-2863-4fa6-9b5f-8b7e6f6aac91 | ||
| testMode: true | ||
| cache: true | ||
|
|
||
| parameters: | ||
| sendEmail: FALSE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,18 +10,25 @@ php: | |
| date.timezone: Europe/Prague | ||
| # zlib.output_compression: yes | ||
|
|
||
| nette: | ||
| session: | ||
| autoStart: smart | ||
| expiration: "+ 3 days" | ||
| application: | ||
| mapping: | ||
| *: App\*Module\*Presenter | ||
| debugger: | ||
| email: [email protected] | ||
| strictMode: TRUE | ||
| maxDepth: 6 | ||
| maxLen: 500 | ||
| session: | ||
| autoStart: smart | ||
| expiration: "+ 3 days" | ||
|
|
||
|
|
||
|
|
||
| application: | ||
| mapping: | ||
| *: App\*Module\*Presenter | ||
| debugger: true | ||
|
|
||
| di: | ||
| debugger: true | ||
|
|
||
| tracy: | ||
| email: [email protected] #[email protected] | ||
| strictMode: true | ||
| maxDepth: 6 | ||
| maxLength: 500 | ||
|
|
||
| extensions: | ||
| skautis: Skautis\Nette\SkautisExtension | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,15 +3,17 @@ | |
| namespace Sinacek; | ||
|
|
||
| use Nette; | ||
| use Nette\Security\IIdentity; | ||
|
|
||
| /** | ||
| * používat pouze pro data ze skautISu, nikdy nenechávat aby uživatel zadal sám svoje ID! | ||
| * @author Hána František <[email protected]> | ||
| */ | ||
| class SkautisAuthenticator extends Nette\Object implements Nette\Security\IAuthenticator | ||
| class SkautisAuthenticator implements Nette\Security\IAuthenticator | ||
| { | ||
| use Nette\SmartObject; | ||
|
|
||
| public function authenticate(array $credentials) | ||
| public function authenticate(array $credentials): IIdentity | ||
| { | ||
| $data = $credentials[0]; | ||
| return new Nette\Security\Identity($data->ID_User); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| namespace App; | ||
|
|
||
| use Nette; | ||
| use WebLoader; | ||
| //use WebLoader; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Proč nahrazovat webloader za include jednotlivých souborů? to je cesta zpět za mě
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Protože WebLoader mel posledni commit před několika lety a neni kompatibilni s Nette 3.0.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. u hospodareni mame webpack nebo pak fmasa jeste doporucoval gulp |
||
|
|
||
| abstract class BasePresenter extends Nette\Application\UI\Presenter | ||
| { | ||
|
|
@@ -59,36 +59,36 @@ public function beforeRender() | |
| } | ||
| } | ||
|
|
||
| public function createComponentCss() | ||
| { | ||
| $files = new WebLoader\FileCollection(WWW_DIR . '/css'); | ||
| $compiler = WebLoader\Compiler::createCssCompiler($files, WWW_DIR . '/webtemp'); | ||
|
|
||
| $control = new WebLoader\Nette\CssLoader($compiler, $this->webtempUrl); | ||
| $control->setMedia('screen'); | ||
| $files->addFiles([ | ||
| 'bootstrap.min.css', | ||
| 'bootstrap-responsive.min.css', | ||
| 'jquery-ui-1.8.css', | ||
| 'site.css' | ||
| ]); | ||
| return $control; | ||
| } | ||
| // public function createComponentCss() | ||
| // { | ||
| // $files = new WebLoader\FileCollection(WWW_DIR . '/css'); | ||
| // $compiler = WebLoader\Compiler::createCssCompiler($files, WWW_DIR . '/webtemp'); | ||
| // | ||
| // $control = new WebLoader\Nette\CssLoader($compiler, $this->webtempUrl); | ||
| // $control->setMedia('screen'); | ||
| // $files->addFiles([ | ||
| // 'bootstrap.min.css', | ||
| // 'bootstrap-responsive.min.css', | ||
| // 'jquery-ui-1.8.css', | ||
| // 'site.css' | ||
| // ]); | ||
| // return $control; | ||
| // } | ||
|
|
||
| public function createComponentJs() | ||
| { | ||
| $files = new WebLoader\FileCollection(WWW_DIR . '/js'); | ||
| $compiler = WebLoader\Compiler::createJsCompiler($files, WWW_DIR . '/webtemp'); | ||
| $files->addFiles([ | ||
| 'jquery-v1.11.1.js', | ||
| 'jquery.ui.min.js', | ||
| 'bootstrap.js', | ||
| 'combobox.js', | ||
| 'nette.ajax.js', | ||
| 'netteForms.js', | ||
| 'my.js', | ||
| ]); | ||
| return new WebLoader\Nette\JavaScriptLoader($compiler, $this->webtempUrl); | ||
| } | ||
| // public function createComponentJs() | ||
| // { | ||
| // $files = new WebLoader\FileCollection(WWW_DIR . '/js'); | ||
| // $compiler = WebLoader\Compiler::createJsCompiler($files, WWW_DIR . '/webtemp'); | ||
| // $files->addFiles([ | ||
| // 'jquery-v1.11.1.js', | ||
| // 'jquery.ui.min.js', | ||
| // 'bootstrap.js', | ||
| // 'combobox.js', | ||
| // 'nette.ajax.js', | ||
| // 'netteForms.js', | ||
| // 'my.js', | ||
| // ]); | ||
| // return new WebLoader\Nette\JavaScriptLoader($compiler, $this->webtempUrl); | ||
| // } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,16 @@ | ||
| { | ||
| "name": "ws.skautis.cz", | ||
| "name": "skaut/ws.skautis.cz", | ||
| "type": "project", | ||
| "require": { | ||
| "php": ">= 5.6", | ||
| "nette/nette": "2.3.*", | ||
| "skautis/skautis": "2.*@dev", | ||
| "skautis/nette": "2.*@dev", | ||
| "janmarek/webloader": "2.5.*", | ||
| "php": ">= 7.2", | ||
| "nette/nette": "^3.0", | ||
| "skautis/skautis": "3.0.0-alpha", | ||
| "skautis/nette": "3.0.0-alpha", | ||
| "nextras/mail-panel": "^2.3", | ||
| "dibi/dibi": "3.0.*" | ||
| "dibi/dibi": "^3.0" | ||
| }, | ||
| "require-dev": { | ||
| "squizlabs/php_codesniffer": "^2.8", | ||
| "codeception/codeception": "^2.2", | ||
| "codeception/mockery-module": "^0.2.2" | ||
| "squizlabs/php_codesniffer": "^3.4" | ||
| }, | ||
| "minimum-stability": "RC" | ||
| "minimum-stability": "stable" | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.