diff --git a/account-checkEmail.html b/account-checkEmail.html deleted file mode 100644 index 96211d459..000000000 --- a/account-checkEmail.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - Gradido Login Server: Email Verification - - - - -
-
- -
-
-
- - -
-
-
-

E-Mail verifizieren

-
-
-
- - - -
-
-
- -
-
-
-

Copyright © Gradido 2020

-
-
-
- 428 micro s -
-
-

Login Server in Entwicklung

-

Alpha 0.20.07.10

-
-
- - - diff --git a/account-login.html b/account-login.html deleted file mode 100644 index 7bc40b267..000000000 --- a/account-login.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - Gradido Login Server: Login - - - - -
-
- -
-
-
- - -
-
-
-
- - - -
-
-
- - -
-
-
-

Copyright © Gradido 2020

-
-
-
- 428 micro s -
-
-

Login Server in Entwicklung

-

Alpha 0.20.07.10

-
-
- - - \ No newline at end of file diff --git a/account-registerDirect.html b/account-registerDirect.html deleted file mode 100644 index 1579b4add..000000000 --- a/account-registerDirect.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - Gradido Login Server: Registrierung - - - - -
-
- -
-
-

Einen neuen Account anlegen

-
-
-
-

Bitte gib deine Daten an, um einen Account anzulegen:

- - - - - - - - - - - -
-
-
-
-

Copyright © Gradido 2020

-
-
-
- 428 micro s -
-
-

Login Server in Entwicklung

-

Alpha 0.20.07.10

-
-
- - - diff --git a/account-resetPassword.html b/account-resetPassword.html deleted file mode 100644 index 9762a4e07..000000000 --- a/account-resetPassword.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - Gradido Login Server: Passwort vergessen - - - - -
-
- -
-
-

Passwort zurücksetzen

-
-
-
- - - -
-
- -
-
-

Copyright © Gradido 2020

-
-
-
- 428 micro s -
-
-

Login Server in Entwicklung

-

Alpha 0.20.07.10

-
-
- - - diff --git a/account-updateUserPassword.html b/account-updateUserPassword.html deleted file mode 100644 index abd3c1ff3..000000000 --- a/account-updateUserPassword.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - Gradido Login Server: Passwort bestimmen - - - - -
-
- -
-
-

Passwort bestimmen

-
-
-
-

Bitte denke dir ein sicheres Passwort aus, das mindestens 8 Zeichen lang ist, ein Klein- und einen Großbuchstaben enthält, eine Zahl und eines der folgenden Sonderzeichen: @$!%*?&+-

- - - - - -
-
-
-
-

Copyright © Gradido 2020

-
-
-
- 428 micro s -
-
-

Login Server in Entwicklung

-

Alpha 0.20.07.10

-
-
- - - diff --git a/src/Controller/CommunityProfilesController.php b/src/Controller/CommunityProfilesController.php new file mode 100644 index 000000000..c807da72c --- /dev/null +++ b/src/Controller/CommunityProfilesController.php @@ -0,0 +1,106 @@ +paginate($this->CommunityProfiles); + + $this->set(compact('communityProfiles')); + } + + /** + * View method + * + * @param string|null $id Community Profile id. + * @return \Cake\Http\Response|null + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. + */ + public function view($id = null) + { + $communityProfile = $this->CommunityProfiles->get($id, [ + 'contain' => [], + ]); + + $this->set('communityProfile', $communityProfile); + } + + /** + * Add method + * + * @return \Cake\Http\Response|null Redirects on successful add, renders view otherwise. + */ + public function add() + { + $communityProfile = $this->CommunityProfiles->newEntity(); + if ($this->request->is('post')) { + $communityProfile = $this->CommunityProfiles->patchEntity($communityProfile, $this->request->getData()); + if ($this->CommunityProfiles->save($communityProfile)) { + $this->Flash->success(__('The community profile has been saved.')); + + return $this->redirect(['action' => 'index']); + } + $this->Flash->error(__('The community profile could not be saved. Please, try again.')); + } + $this->set(compact('communityProfile')); + } + + /** + * Edit method + * + * @param string|null $id Community Profile id. + * @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise. + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. + */ + public function edit($id = null) + { + $communityProfile = $this->CommunityProfiles->get($id, [ + 'contain' => [], + ]); + if ($this->request->is(['patch', 'post', 'put'])) { + $communityProfile = $this->CommunityProfiles->patchEntity($communityProfile, $this->request->getData()); + if ($this->CommunityProfiles->save($communityProfile)) { + $this->Flash->success(__('The community profile has been saved.')); + + return $this->redirect(['action' => 'index']); + } + $this->Flash->error(__('The community profile could not be saved. Please, try again.')); + } + $this->set(compact('communityProfile')); + } + + /** + * Delete method + * + * @param string|null $id Community Profile id. + * @return \Cake\Http\Response|null Redirects to index. + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. + */ + public function delete($id = null) + { + $this->request->allowMethod(['post', 'delete']); + $communityProfile = $this->CommunityProfiles->get($id); + if ($this->CommunityProfiles->delete($communityProfile)) { + $this->Flash->success(__('The community profile has been deleted.')); + } else { + $this->Flash->error(__('The community profile could not be deleted. Please, try again.')); + } + + return $this->redirect(['action' => 'index']); + } +} diff --git a/src/Model/Entity/CommunityProfile.php b/src/Model/Entity/CommunityProfile.php new file mode 100644 index 000000000..5975a5b51 --- /dev/null +++ b/src/Model/Entity/CommunityProfile.php @@ -0,0 +1,28 @@ + true, + 'profile_desc' => true, + ]; +} diff --git a/src/Model/Table/CommunityProfilesTable.php b/src/Model/Table/CommunityProfilesTable.php new file mode 100644 index 000000000..a00e391de --- /dev/null +++ b/src/Model/Table/CommunityProfilesTable.php @@ -0,0 +1,60 @@ +setTable('community_profiles'); + $this->setDisplayField('id'); + $this->setPrimaryKey('id'); + } + + /** + * Default validation rules. + * + * @param \Cake\Validation\Validator $validator Validator instance. + * @return \Cake\Validation\Validator + */ + public function validationDefault(Validator $validator) + { + $validator + ->integer('id') + ->allowEmptyString('id', null, 'create'); + + $validator + ->allowEmptyFile('profile_img'); + + $validator + ->scalar('profile_desc') + ->maxLength('profile_desc', 2000) + ->allowEmptyFile('profile_desc'); + + return $validator; + } +} diff --git a/src/Template/CommunityProfiles/add.ctp b/src/Template/CommunityProfiles/add.ctp new file mode 100644 index 000000000..e2ecdda42 --- /dev/null +++ b/src/Template/CommunityProfiles/add.ctp @@ -0,0 +1,23 @@ + + +
+ Form->create($communityProfile) ?> +
+ + Form->control('profile_desc'); + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
diff --git a/src/Template/CommunityProfiles/edit.ctp b/src/Template/CommunityProfiles/edit.ctp new file mode 100644 index 000000000..0a7226a9a --- /dev/null +++ b/src/Template/CommunityProfiles/edit.ctp @@ -0,0 +1,29 @@ + + +
+ Form->create($communityProfile) ?> +
+ + Form->control('profile_desc'); + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
diff --git a/src/Template/CommunityProfiles/index.ctp b/src/Template/CommunityProfiles/index.ctp new file mode 100644 index 000000000..a71710ced --- /dev/null +++ b/src/Template/CommunityProfiles/index.ctp @@ -0,0 +1,47 @@ + + +
+

+ + + + + + + + + + + + + + + + + +
Paginator->sort('id') ?>Paginator->sort('profile_desc') ?>
Number->format($communityProfile->id) ?>profile_desc) ?> + Html->link(__('View'), ['action' => 'view', $communityProfile->id]) ?> + Html->link(__('Edit'), ['action' => 'edit', $communityProfile->id]) ?> + Form->postLink(__('Delete'), ['action' => 'delete', $communityProfile->id], ['confirm' => __('Are you sure you want to delete # {0}?', $communityProfile->id)]) ?> +
+
+ +

Paginator->counter(['format' => __('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')]) ?>

+
+
diff --git a/src/Template/CommunityProfiles/view.ctp b/src/Template/CommunityProfiles/view.ctp new file mode 100644 index 000000000..f81be01ad --- /dev/null +++ b/src/Template/CommunityProfiles/view.ctp @@ -0,0 +1,28 @@ + + +
+

id) ?>

+ + + + + + + + + +
profile_desc) ?>
Number->format($communityProfile->id) ?>
+
diff --git a/tests/Fixture/CommunityProfilesFixture.php b/tests/Fixture/CommunityProfilesFixture.php new file mode 100644 index 000000000..20ac0cf43 --- /dev/null +++ b/tests/Fixture/CommunityProfilesFixture.php @@ -0,0 +1,46 @@ + ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null], + 'profile_img' => ['type' => 'binary', 'length' => 4294967295, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], + 'profile_desc' => ['type' => 'string', 'length' => 2000, 'null' => true, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null, 'fixed' => null], + '_constraints' => [ + 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], + ], + '_options' => [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_general_ci' + ], + ]; + // @codingStandardsIgnoreEnd + /** + * Init method + * + * @return void + */ + public function init() + { + $this->records = [ + [ + 'id' => 1, + 'profile_img' => 'Lorem ipsum dolor sit amet', + 'profile_desc' => 'Lorem ipsum dolor sit amet', + ], + ]; + parent::init(); + } +} diff --git a/tests/TestCase/Controller/CommunityProfilesControllerTest.php b/tests/TestCase/Controller/CommunityProfilesControllerTest.php new file mode 100644 index 000000000..35f439dd7 --- /dev/null +++ b/tests/TestCase/Controller/CommunityProfilesControllerTest.php @@ -0,0 +1,75 @@ +markTestIncomplete('Not implemented yet.'); + } + + /** + * Test view method + * + * @return void + */ + public function testView() + { + $this->markTestIncomplete('Not implemented yet.'); + } + + /** + * Test add method + * + * @return void + */ + public function testAdd() + { + $this->markTestIncomplete('Not implemented yet.'); + } + + /** + * Test edit method + * + * @return void + */ + public function testEdit() + { + $this->markTestIncomplete('Not implemented yet.'); + } + + /** + * Test delete method + * + * @return void + */ + public function testDelete() + { + $this->markTestIncomplete('Not implemented yet.'); + } +} diff --git a/tests/TestCase/Model/Table/CommunityProfilesTableTest.php b/tests/TestCase/Model/Table/CommunityProfilesTableTest.php new file mode 100644 index 000000000..0d7e5fba2 --- /dev/null +++ b/tests/TestCase/Model/Table/CommunityProfilesTableTest.php @@ -0,0 +1,72 @@ +exists('CommunityProfiles') ? [] : ['className' => CommunityProfilesTable::class]; + $this->CommunityProfiles = TableRegistry::getTableLocator()->get('CommunityProfiles', $config); + } + + /** + * tearDown method + * + * @return void + */ + public function tearDown() + { + unset($this->CommunityProfiles); + + parent::tearDown(); + } + + /** + * Test initialize method + * + * @return void + */ + public function testInitialize() + { + $this->markTestIncomplete('Not implemented yet.'); + } + + /** + * Test validationDefault method + * + * @return void + */ + public function testValidationDefault() + { + $this->markTestIncomplete('Not implemented yet.'); + } +}