diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 00000000..8566eb33 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +circles \ No newline at end of file diff --git a/.idea/circles.iml b/.idea/circles.iml new file mode 100644 index 00000000..5c7ca4a7 --- /dev/null +++ b/.idea/circles.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 00000000..6492560c --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..eb3f9729 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 00000000..10b171f2 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..71b0b171 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,612 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NoSubAdminRequired + #newTeam + team + newTeam + appName + CirclesController + teams + app.svc + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + + + + + + + + + + + + + + project + + + true + + + + DIRECTORY + + false + + + + + + + + + 1487154709467 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9591157b..4ec8c3f7 100644 --- a/LICENSE +++ b/LICENSE @@ -617,46 +617,3 @@ Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. - diff --git a/README.md b/README.md index d16a44e8..e251f01d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,17 @@ -# Teams app for Nextcloud +# Circles -Teams allows every user to create own groups of users for sharing. It's based on -an invitation concept. Every users needs to accept the team membership first -before shares to a team show up for this user. +Circles allows your users to create their own groups of users/colleagues/friends. +Those groups of users (or circles) can then be used by any other app for sharing purpose +(files, social feed, status update, messaging, ...) + +Differents type of circles can be created: + +- 'hidden' provides no interaction with peoples in the circles. An 'hidden' circle is just +a private shortcut if you wish to quickly share with a list of cloudusers. Other people from the circle +won't be able to interact/share with you or to each other. However, they can choose to leave/block it. +- 'society' allow everyone invited in the circle to interact with each others, within the limits of their +level. (admin, moderator, guest). +It's based on an invitation concept and requests could be initiated from both sides: +user and circle admin needs to mutually accept membership before shares to a circle show up for the clouduser. ![example screenshot](example.png) diff --git a/appinfo/app.php b/appinfo/app.php index c58d0d03..f915a787 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,31 +1,6 @@ - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -$navigationEntry = function () { - return [ - 'id' => 'teams', - 'order' => 10, - 'name' => \OC::$server->getL10N('teams')->t('Teams'), - 'href' => \OC::$server->getURLGenerator()->linkToRoute('teams.Teams.show'), - 'icon' => \OC::$server->getURLGenerator()->imagePath('teams', 'app.svg'), - ]; -}; -\OC::$server->getNavigationManager()->add($navigationEntry); \ No newline at end of file + +$app = new \OCA\Circles\AppInfo\Application(); + +$app->registerNavigation(); diff --git a/appinfo/database.xml b/appinfo/database.xml index be005aa2..027ce1b7 100644 --- a/appinfo/database.xml +++ b/appinfo/database.xml @@ -4,12 +4,10 @@ *dbname* true false - utf8 - - *dbprefix*teams_teams + *dbprefix*circles_groups @@ -30,43 +28,27 @@ - owner + description text true - 64 + 128 - - teams_name_owner - - name - - - owner - - - + + type + text + true + 8 + -
- - *dbprefix*teams_members + *dbprefix*circles_members - - - team_id + group_id integer true true @@ -80,11 +62,18 @@ 64 + + level + integer + true + 1 + + status text true - 128 + 8 @@ -92,15 +81,13 @@ true true - user_id + group_id - team_id + user_id -
- \ No newline at end of file diff --git a/appinfo/info.xml b/appinfo/info.xml index 9dc208ed..7b00a06a 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,13 +1,23 @@ - - teams - Teams - Manage your teams and share with them - 0.1 - AGPL + + circles + Circles + Circles + Circles + 0.0.1 + agpl Morris Jobke - Teams - + Maxence Lange + + https://github.com/nextcloud-gmbh/circles/wiki + + tools + files + https://github.com/nextcloud-gmbh/circles + https://github.com/nextcloud-gmbh/circles/issues + https://github.com/nextcloud-gmbh/circles.git + diff --git a/appinfo/routes.php b/appinfo/routes.php index 4f19c46a..a7f8ec48 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -21,13 +21,13 @@ return [ 'routes' => [ - ['name' => 'Teams#show', 'url' => '/', 'verb' => 'GET'], - ['name' => 'Teams#listTeams', 'url' => '/teams', 'verb' => 'GET'], - ['name' => 'Teams#create', 'url' => '/teams', 'verb' => 'PUT'], - ['name' => 'Teams#update', 'url' => '/teams/{id}', 'verb' => 'POST', 'requirements' => ['id' => '\d+'],], - ['name' => 'Teams#delete', 'url' => '/teams/{id}', 'verb' => 'DELETE', 'requirements' => ['id' => '\d+'],], - ['name' => 'Teams#listMembers', 'url' => '/teams/{id}/members', 'verb' => 'GET', 'requirements' => ['id' => '\d+'],], - ['name' => 'Teams#addMember', 'url' => '/teams/{id}/members', 'verb' => 'PUT', 'requirements' => ['id' => '\d+'],], - ['name' => 'Teams#removeMember', 'url' => '/teams/{id}/members', 'verb' => 'DELETE', 'requirements' => ['id' => '\d+'],], + ['name' => 'Circles#navigate', 'url' => '/', 'verb' => 'GET'], + // ['name' => 'Teams#listTeams', 'url' => '/teams', 'verb' => 'GET'], + // ['name' => 'Teams#create', 'url' => '/teams', 'verb' => 'PUT'], + // ['name' => 'Teams#update', 'url' => '/teams/{id}', 'verb' => 'POST', 'requirements' => ['id' => '\d+'],], + // ['name' => 'Teams#delete', 'url' => '/teams/{id}', 'verb' => 'DELETE', 'requirements' => ['id' => '\d+'],], + // ['name' => 'Teams#listMembers', 'url' => '/teams/{id}/members', 'verb' => 'GET', 'requirements' => ['id' => '\d+'],], + // ['name' => 'Teams#addMember', 'url' => '/teams/{id}/members', 'verb' => 'PUT', 'requirements' => ['id' => '\d+'],], + // ['name' => 'Teams#removeMember', 'url' => '/teams/{id}/members', 'verb' => 'DELETE', 'requirements' => ['id' => '\d+'],], ], ]; \ No newline at end of file diff --git a/css/navigation.css b/css/navigation.css new file mode 100644 index 00000000..0bbde65d --- /dev/null +++ b/css/navigation.css @@ -0,0 +1,25 @@ +#loading_members { + height: 50px; + margin: 0 auto; + padding: 20px; +} + +#app-navigation .navigation-element { + padding: 3px 12px; +} + +#app-navigation .navigation-element input { + width: 100%; + box-sizing: border-box; +} + +#app-content { + padding: 3px 12px; +} + +#app-navigation .header { + padding: 0 12px; + line-height: 44px; + min-height: 44px; + border-bottom: 1px solid #eee; +} diff --git a/img/app.svg b/img/app.svg index b3cf71b8..4e5be881 100644 --- a/img/app.svg +++ b/img/app.svg @@ -1,4 +1 @@ - - - - + \ No newline at end of file diff --git a/js/navigation.js b/js/navigation.js new file mode 100644 index 00000000..db87f9bf --- /dev/null +++ b/js/navigation.js @@ -0,0 +1,163 @@ +/** + * @copyright Copyright (c) 2016 Morris Jobke + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +// +// $(document).ready(function() { +// var removeMember = function() { +// var teamId = $('#app-navigation').find('.active').first().data('navigation'), +// memberId = $(this).data('user_id'); +// +// $.ajax({ +// method: 'DELETE', +// url: OC.linkTo('teams', 'teams/' + teamId + '/members'), +// data: { +// userId: memberId +// } +// }).done(function() { +// // TODO re-render in JS +// location.reload(); +// }).fail(function(){ +// // TODO on failure +// }); +// }; +// +// var openTeam = function() { +// var teamId = $(this).data('navigation'); +// $('#app-navigation').find('.active').removeClass('active'); +// $(this).addClass('active'); +// +// $('#emptycontent').addClass('hidden'); +// $('#loading_members').removeClass('hidden'); +// $('#container').addClass('hidden'); +// $('#container').find('.memberList').empty(); +// +// $.get( +// OC.linkTo('teams', 'teams/' + teamId + '/members'), +// [], +// function(result) { +// $('#loading_members').addClass('hidden'); +// +// var $memberList = $('#container').find('.memberList'); +// +// _.each(result.members, function(member){ +// $memberList.append( +// $('
  • ') +// .data('user_id', member.user_id) +// .text(member.user_id + ' (' + member.status + ')') +// .on('click', removeMember) +// ); +// }); +// +// $('#container').removeClass('hidden'); +// } +// ).fail(function(){ +// // TODO on failure +// $('#loading_members').addClass('hidden'); +// $('#emptycontent').removeClass('hidden'); +// }); +// }; +// +// $('#app-navigation').find('a').on('click', openTeam); +// +// $.get( +// OC.linkTo('teams', 'teams'), +// [], +// function(result) { +// $navigation = $('#app-navigation'); +// $teamsNavigation = $navigation.find('.teams'); +// +// $teamsNavigation.append( +// $('
  • ').addClass('header').text('My teams') +// ); +// +// _.each(result.myTeams, function(team){ +// $teamsNavigation.append( +// $('
  • ').append( +// $('').data('navigation', team.id).append( +// $('').addClass('no-icon').text(team.name) +// ).on('click', openTeam) +// ) +// ); +// }); +// +// +// $teamsNavigation.append( +// $('
  • ').addClass('header').text('Other teams') +// ); +// +// _.each(result.otherTeams, function(team){ +// $teamsNavigation.append( +// $('
  • ').append( +// $('').data('navigation', team.id).append( +// $('').addClass('no-icon').text(team.name + ' by ' + team.owner + ' (' + team.status + ')') +// ).on('click', openTeam) +// ) +// ); +// }); +// } +// ).fail(function(){ +// // TODO on failure +// }); +// +// var createTeam = function(e){ +// if (e.keyCode === 13) { +// $.ajax({ +// method: 'PUT', +// url: OC.linkTo('teams', 'teams'), +// data: { +// name: $('#newTeam').val() +// } +// }).done(function() { +// // TODO re-render in JS +// location.reload(); +// }).fail(function(){ +// // TODO on failure +// }); +// } +// }; +// +// $('#newTeam').on('keyup', createTeam); +// +// +// +// var addMember = function(e){ +// if (e.keyCode === 13) { +// var teamId = $('#app-navigation').find('.active').first().data('navigation'); +// +// $.ajax({ +// method: 'PUT', +// url: OC.linkTo('teams', 'teams/' + teamId + '/members'), +// data: { +// userId: $('#addMember').val() +// } +// }).done(function() { +// // TODO re-render in JS +// location.reload(); +// $('#addMember').val(''); +// }).fail(function(){ +// // TODO on failure +// }); +// } +// }; +// +// $('#addMember').on('keyup', addMember); +// +// +// +// }); \ No newline at end of file diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php new file mode 100644 index 00000000..65c09e51 --- /dev/null +++ b/lib/AppInfo/Application.php @@ -0,0 +1,162 @@ +getContainer(); + $this->appName = $container->query('AppName'); + + /** + * Services + */ + $container->registerService( + 'MiscService', function ($c) { + return new MiscService($c->query('Logger'), $c->query('AppName')); + } + ); + + +// $container->registerService( +// 'ConfigService', function ($c) { +// return new ConfigService( +// $c->query('AppName'), $c->query('CoreConfig'), $c->query('UserId'), +// $c->query('MiscService') +// ); +// } +// ); + +// $container->registerService( +// 'ApiService', function ($c) { +// return new ApiService( +// $c->query('ConfigService'), $c->query('FileService'), $c->query('MiscService') +// ); +// } +// ); + + + /** + * Controllers + */ +// $container->registerService( +// 'SettingsController', function ($c) { +// return new SettingsController( +// $c->query('AppName'), $c->query('Request'), $c->query('ConfigService'), +// $c->query('MiscService') +// ); +// } +// ); + + $container->registerService( + 'CirclesController', function ($c) { + return new CirclesController( + $c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('L10N'), + $c->query('MiscService') + ); + } + ); + + + /** + * Mapper + */ +// $container->registerService( +// 'DepositionFilesMapper', function ($c) { +// return new DepositionFilesMapper( +// $c->query('ServerContainer') +// ->getDatabaseConnection() +// ); +// } +// ); + + // Translates + $container->registerService( + 'L10N', function ($c) { + return $c->query('ServerContainer') + ->getL10N($c->query('AppName')); + } + ); + + /** + * Core + */ + $container->registerService( + 'Logger', function ($c) { + return $c->query('ServerContainer') + ->getLogger(); + } + ); + $container->registerService( + 'CoreConfig', function ($c) { + return $c->query('ServerContainer') + ->getConfig(); + } + ); + + $container->registerService( + 'UserId', function ($c) { + $user = $c->query('ServerContainer') + ->getUserSession() + ->getUser(); + + return is_null($user) ? '' : $user->getUID(); + } + ); + + $container->registerService( + 'UserManager', function ($c) { + return $c->query('ServerContainer') + ->getUserManager(); + } + ); + } + + + public function registerNavigation() { + + $this->getContainer() + ->getServer() + ->getNavigationManager() + ->add( + function () { + return [ + 'id' => $this->appName, + 'order' => 5, + 'href' => \OC::$server->getURLGenerator() + ->linkToRoute('circles.Circles.navigate'), + 'icon' => \OC::$server->getURLGenerator() + ->imagePath($this->appName, 'app.svg'), + 'name' => \OC::$server->getL10N($this->appName) + ->t('Circles') + ]; + } + ); + } + + +// +// public function registerSettingsAdmin() { +// \OCP\App::registerAdmin( +// $this->getContainer() +// ->query('AppName'), 'lib/admin' +// ); +// } +} + diff --git a/lib/Controller/CirclesController.php b/lib/Controller/CirclesController.php new file mode 100644 index 00000000..05badb06 --- /dev/null +++ b/lib/Controller/CirclesController.php @@ -0,0 +1,260 @@ +userId = $userId; + $this->l10n = $l10n; + $this->miscService = $miscService; + } + + /** + * @NoCSRFRequired + * @NoAdminRequired + * @NoSubAdminRequired + * + * @return TemplateResponse + */ + public function navigate() { + + return new TemplateResponse( + 'circles', 'navigate', [ + ] + ); + } + + /** + * @NoAdminRequired + * @NoSubAdminRequired + * + * @param string $name + * + * @return DataResponse + */ +// public function create($name) { +// try { +// $id = $this->dbHandler->createTeam($name, $this->userId); +// } catch (TeamExists $e) { +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('Team already exists.') +// ], +// Http::STATUS_CONFLICT +// ); +// } +// return new DataResponse( +// [ +// 'id' => $id, +// 'name' => $name, +// 'owner' => $this->userId, +// ], +// Http::STATUS_CREATED +// ); +// } + + /** + * @NoAdminRequired + * @NoSubAdminRequired + * + * @param int $id + * @param string $name + * + * @return DataResponse + */ +// public function rename($id, $name) { +// +// $affectedRows = $this->dbHandler->updateTeam($id, $this->userId, $name); +// +// if ($affectedRows === 1) { +// return new DataResponse( +// [ +// 'id' => $id, +// 'name' => $name, +// 'owner' => $this->userId, +// ], +// Http::STATUS_OK +// ); +// } +// +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('Unable to update team name.') +// ], +// Http::STATUS_FORBIDDEN +// ); +// } + + /** + * @NoAdminRequired + * @NoSubAdminRequired + * + * @param int $id + * + * @return DataResponse + */ +// public function delete($id) { +// $affectedRows = $this->dbHandler->deleteTeam($id, $this->userId); +// +// if ($affectedRows === 1) { +// return new DataResponse( +// [], +// Http::STATUS_NO_CONTENT +// ); +// } +// +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('Unable to delete team.') +// ], +// Http::STATUS_INTERNAL_SERVER_ERROR +// ); +// } + /** + * @NoAdminRequired + * @NoSubAdminRequired + * + * @return DataResponse + */ +// public function listTeams() { +// $myTeams = $this->dbHandler->getTeamsByAdmin($this->userId); +// $otherTeams = $this->dbHandler->getTeamsByMember($this->userId); +// +// return new DataResponse( +// [ +// 'myTeams' => $myTeams, +// 'otherTeams' => $otherTeams, +// ], +// Http::STATUS_OK +// ); +// } + + /** + * @NoAdminRequired + * @NoSubAdminRequired + * + * @param int $id + * + * @return DataResponse + */ +// public function listMembers($id) { +// if (!( +// $this->dbHandler->isOwner($id, $this->userId) || +// $this->dbHandler->isMember($id, $this->userId) +// )) { +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('User is not owner nor member of the team.') +// ], +// Http::STATUS_FORBIDDEN +// ); +// } +// +// try { +// $members = $this->dbHandler->getMembers($id); +// return new DataResponse( +// [ +// 'members' => $members, +// ], +// Http::STATUS_OK +// ); +// } catch (TeamDoesNotExists $e){ +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('Team does not exist.') +// ], +// Http::STATUS_NOT_FOUND +// ); +// } +// } + + /** + * @NoAdminRequired + * @NoSubAdminRequired + * + * @param int $id + * @param string $userId user id of new member + * + * @return DataResponse + */ +// public function addMember($id, $userId) { +// if (!$this->dbHandler->isOwner($id, $this->userId)) { +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('User is not owner of the team.') +// ], +// Http::STATUS_FORBIDDEN +// ); +// } +// +// $this->dbHandler->addMember($id, $userId); +// return new DataResponse( +// [], +// Http::STATUS_CREATED +// ); +// } + + /** + * @NoAdminRequired + * @NoSubAdminRequired + * + * @param int $id + * @param string $userId user id of member + * + * @return DataResponse + */ +// public function removeMember($id, $userId) { +// if (!$this->dbHandler->isOwner($id, $this->userId)) { +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('User is not owner of the team.') +// ], +// Http::STATUS_FORBIDDEN +// ); +// } +// +// $affectedRows = $this->dbHandler->removeMember($id, $userId); +// +// if ($affectedRows === 1) { +// return new DataResponse( +// [], +// Http::STATUS_NO_CONTENT +// ); +// } +// +// return new DataResponse( +// [ +// 'message' => (string)$this->l10n->t('Unable to remove team member.') . $affectedRows +// ], +// Http::STATUS_INTERNAL_SERVER_ERROR +// ); +// } +} \ No newline at end of file diff --git a/lib/Exceptions/MemberExists.php b/lib/Exceptions/MemberExists.php index 5c8d3ac9..43cf1461 100644 --- a/lib/Exceptions/MemberExists.php +++ b/lib/Exceptions/MemberExists.php @@ -1,25 +1,6 @@ - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -namespace OCA\Teams\Exceptions; +namespace OCA\Circles\Exceptions; class MemberExists extends \Exception { diff --git a/lib/Exceptions/TeamDoesNotExist.php b/lib/Exceptions/TeamDoesNotExist.php index 6dc3f032..2e91b2c9 100644 --- a/lib/Exceptions/TeamDoesNotExist.php +++ b/lib/Exceptions/TeamDoesNotExist.php @@ -1,25 +1,6 @@ - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -namespace OCA\Teams\Exceptions; +namespace OCA\Circles\Exceptions; class TeamDoesNotExists extends \Exception { diff --git a/lib/Exceptions/TeamExists.php b/lib/Exceptions/TeamExists.php index b27a5155..c85e9209 100644 --- a/lib/Exceptions/TeamExists.php +++ b/lib/Exceptions/TeamExists.php @@ -1,25 +1,6 @@ - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -namespace OCA\Teams\Exceptions; +namespace OCA\Circles\Exceptions; class TeamExists extends \Exception { diff --git a/lib/Service/MiscService.php b/lib/Service/MiscService.php new file mode 100644 index 00000000..c88faeef --- /dev/null +++ b/lib/Service/MiscService.php @@ -0,0 +1,26 @@ +logger = $logger; + $this->appName = $appName; + } + + public function log($message, $level = 2) { + $data = array( + 'app' => $this->appName, + 'level' => $level + ); + + $this->logger->log($level, $message, $data); + } +} \ No newline at end of file diff --git a/templates/navigate.php b/templates/navigate.php new file mode 100644 index 00000000..85a37890 --- /dev/null +++ b/templates/navigate.php @@ -0,0 +1,50 @@ + + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +script('circles', 'navigation'); +style('circles', 'navigation'); + +?> + + +
    + +
      +
      + +
      +
      +
      +

      t('No team selected')); ?>

      +
      + + + + +