switching to circles

improved version of teams
This commit is contained in:
Maxence Lange 2017-02-16 00:04:00 -01:00
parent d32b5ae519
commit 039326fd2b
23 changed files with 1429 additions and 190 deletions

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
circles

28
.idea/circles.iml Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="PHP Runtime" type="php">
<CLASSES>
<root url="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/standard" />
</CLASSES>
<SOURCES>
<root url="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/standard" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="PHP" type="php">
<CLASSES>
<root url="file://$USER_HOME$/sites/nextcloud/libs-server" />
</CLASSES>
<SOURCES>
<root url="file://$USER_HOME$/sites/nextcloud/libs-server" />
</SOURCES>
</library>
</orderEntry>
</component>
</module>

15
.idea/deployment.xml Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" serverName="local" autoUploadExternalChanges="true">
<serverData>
<paths name="local">
<serverdata>
<mappings>
<mapping deploy="circles" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ALWAYS" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/circles.iml" filepath="$PROJECT_DIR$/.idea/circles.iml" />
</modules>
</component>
</project>

4
.idea/php.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

612
.idea/workspace.xml Normal file
View File

@ -0,0 +1,612 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9183405f-2f2c-46fc-812e-ff40e6b62383" name="Default" comment="">
<change type="DELETED" beforePath="$PROJECT_DIR$/img/app.svg" afterPath="" />
<change type="MOVED" beforePath="$PROJECT_DIR$/js/teams.js" afterPath="$PROJECT_DIR$/js/navigation.js" />
<change type="MOVED" beforePath="$PROJECT_DIR$/lib/Controller/TeamsController.php" afterPath="$PROJECT_DIR$/lib/Controller/CirclesController.php" />
<change type="MOVED" beforePath="$PROJECT_DIR$/templates/show.php" afterPath="$PROJECT_DIR$/templates/navigate.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/LICENSE" afterPath="$PROJECT_DIR$/LICENSE" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/appinfo/app.php" afterPath="$PROJECT_DIR$/appinfo/app.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/appinfo/database.xml" afterPath="$PROJECT_DIR$/appinfo/database.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/appinfo/info.xml" afterPath="$PROJECT_DIR$/appinfo/info.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/appinfo/routes.php" afterPath="$PROJECT_DIR$/appinfo/routes.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/Exceptions/MemberExists.php" afterPath="$PROJECT_DIR$/lib/Exceptions/MemberExists.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/Exceptions/TeamDoesNotExist.php" afterPath="$PROJECT_DIR$/lib/Exceptions/TeamDoesNotExist.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/Exceptions/TeamExists.php" afterPath="$PROJECT_DIR$/lib/Exceptions/TeamExists.php" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="Application.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/AppInfo/Application.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="90" column="30" lean-forward="false" selection-start-line="90" selection-start-column="30" selection-end-line="90" selection-end-column="30" />
<folding>
<element signature="e#39#85#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="CirclesController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/Controller/CirclesController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-34">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="database.xml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/appinfo/database.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="13" column="29" lean-forward="true" selection-start-line="13" selection-start-column="29" selection-end-line="13" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="MiscService.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/Service/MiscService.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="example.png" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>NoSubAdminRequired</find>
<find>#newTeam</find>
<find>team</find>
<find>newTeam</find>
<find>appName</find>
<find>CirclesController</find>
<find>teams</find>
<find>app.svc</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/lib/Controller/TeamsController.php" />
<option value="$PROJECT_DIR$/lib/DatabaseHandler.php" />
<option value="$PROJECT_DIR$/css/teams.css" />
<option value="$PROJECT_DIR$/templates/show.php" />
<option value="$PROJECT_DIR$/js/teams.js" />
<option value="$PROJECT_DIR$/appinfo/database.xml" />
<option value="$PROJECT_DIR$/appinfo/app.php" />
<option value="$PROJECT_DIR$/appinfo/routes.php" />
<option value="$PROJECT_DIR$/css/navigation.css" />
<option value="$PROJECT_DIR$/templates/navigate.php" />
<option value="$PROJECT_DIR$/lib/Service/MiscService.php" />
<option value="$PROJECT_DIR$/lib/Controller/CirclesController.php" />
<option value="$PROJECT_DIR$/lib/Exceptions/MemberExists.php" />
<option value="$PROJECT_DIR$/lib/Exceptions/TeamDoesNotExist.php" />
<option value="$PROJECT_DIR$/lib/Exceptions/TeamExists.php" />
<option value="$PROJECT_DIR$/LICENSE" />
<option value="$PROJECT_DIR$/js/navigation.js" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/appinfo/info.xml" />
<option value="$PROJECT_DIR$/lib/AppInfo/Application.php" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" interpreter_name="PHP 7.1">
<include_path>
<path value="$USER_HOME$/sites/nextcloud/libs-server" />
</include_path>
</component>
<component name="ProjectFrameBounds">
<option name="width" value="1920" />
<option name="height" value="1044" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="External Libraries" />
<option name="myItemType" value="com.jetbrains.php.config.library.PhpExternalLibrariesNodePatcher$PatchedExternalLibrariesNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Controller" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="AppInfo" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="img" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="circles" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="appinfo" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="js.eslint.eslintPackage" value="" />
<property name="settings.editor.selected.configurable" value="reference.settings.deploy.options" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
</key>
</component>
<component name="RunManager">
<configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
<config-file value="" />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
<method />
</configuration>
<configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
<TestRunner />
<method />
</configuration>
<configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
<BehatRunner />
<method />
</configuration>
<configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
<method />
</configuration>
<configuration default="true" type="PhpSpecConfigurationType" factoryName="PHPSpec">
<PhpTestRunnerSettings />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run" />
<scripts />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
<node-interpreter>project</node-interpreter>
<node-options />
<working-directory />
<pass-parent-env>true</pass-parent-env>
<envs />
<ui />
<extra-mocha-options />
<test-kind>DIRECTORY</test-kind>
<test-directory />
<recursive>false</recursive>
<method />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="9183405f-2f2c-46fc-812e-ff40e6b62383" name="Default" comment="" />
<created>1487154709467</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1487154709467</updated>
<workItem from="1487154710951" duration="12392000" />
<workItem from="1487205647436" duration="1251000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="13643000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1920" height="1044" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32978722" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32978722" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/lib/AppInfo/Application.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1224">
<caret line="78" column="43" lean-forward="false" selection-start-line="78" selection-start-column="43" selection-end-line="78" selection-end-column="43" />
<folding>
<element signature="e#39#85#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Controller/CirclesController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Exceptions/MemberExists.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="21" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Exceptions/TeamDoesNotExist.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Exceptions/TeamExists.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="1" lean-forward="false" selection-start-line="6" selection-start-column="1" selection-end-line="6" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Service/MiscService.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="10" column="21" lean-forward="false" selection-start-line="10" selection-start-column="21" selection-end-line="10" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/LICENSE">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="10523">
<caret line="619" column="0" lean-forward="false" selection-start-line="619" selection-start-column="0" selection-end-line="619" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/navigation.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="33" column="30" lean-forward="true" selection-start-line="33" selection-start-column="30" selection-end-line="33" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/css/teams.css" />
<entry file="file://$PROJECT_DIR$/appinfo/app.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/sites/nextcloud/libs-server/lib/public/AppFramework/App.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="200">
<caret line="66" column="20" lean-forward="false" selection-start-line="66" selection-start-column="20" selection-end-line="66" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/css/navigation.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/appinfo/routes.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="32" column="2" lean-forward="true" selection-start-line="32" selection-start-column="2" selection-end-line="32" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Exceptions/MemberExists.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="21" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/templates/navigate.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="37" column="37" lean-forward="true" selection-start-line="37" selection-start-column="37" selection-end-line="37" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/navigation.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="33" column="30" lean-forward="false" selection-start-line="33" selection-start-column="30" selection-end-line="33" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/DatabaseHandler.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="21" column="14" lean-forward="false" selection-start-line="21" selection-start-column="14" selection-end-line="21" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="34">
<caret line="2" column="12" lean-forward="true" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/LICENSE">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="499">
<caret line="619" column="0" lean-forward="false" selection-start-line="619" selection-start-column="0" selection-end-line="619" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/appinfo/info.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="24" column="0" lean-forward="true" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Service/MiscService.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Exceptions/TeamDoesNotExist.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Exceptions/TeamExists.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="1" lean-forward="false" selection-start-line="6" selection-start-column="1" selection-end-line="6" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/appinfo/database.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="13" column="29" lean-forward="true" selection-start-line="13" selection-start-column="29" selection-end-line="13" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/Controller/CirclesController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-34">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/AppInfo/Application.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="90" column="30" lean-forward="false" selection-start-line="90" selection-start-column="30" selection-end-line="90" selection-end-column="30" />
<folding>
<element signature="e#39#85#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

43
LICENSE
View File

@ -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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <http://www.gnu.org/licenses/>.
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
<http://www.gnu.org/licenses/>.

View File

@ -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)

View File

@ -1,31 +1,6 @@
<?php
/**
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/
$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);
$app = new \OCA\Circles\AppInfo\Application();
$app->registerNavigation();

View File

@ -4,12 +4,10 @@
<name>*dbname*</name>
<create>true</create>
<overwrite>false</overwrite>
<charset>utf8</charset>
<table>
<name>*dbprefix*teams_teams</name>
<name>*dbprefix*circles_groups</name>
<declaration>
<field>
@ -30,43 +28,27 @@
</field>
<field>
<name>owner</name>
<name>description</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
<length>128</length>
</field>
<index>
<name>teams_name_owner</name>
<field>
<name>name</name>
</field>
<field>
<name>owner</name>
</field>
</index>
<field>
<name>type</name>
<type>text</type>
<notnull>true</notnull>
<length>8</length>
</field>
</declaration>
</table>
<table>
<name>*dbprefix*teams_members</name>
<name>*dbprefix*circles_members</name>
<declaration>
<!--<field>
<name>id</name>
<type>integer</type>
<notnull>true</notnull>
<autoincrement>true</autoincrement>
<unsigned>true</unsigned>
<primary>true</primary>
<length>8</length>
</field>-->
<field>
<name>team_id</name>
<name>group_id</name>
<type>integer</type>
<notnull>true</notnull>
<unsigned>true</unsigned>
@ -80,11 +62,18 @@
<length>64</length>
</field>
<field>
<name>level</name>
<type>integer</type>
<notnull>true</notnull>
<length>1</length>
</field>
<field>
<name>status</name>
<type>text</type>
<notnull>true</notnull>
<length>128</length>
<length>8</length>
</field>
<index>
@ -92,15 +81,13 @@
<primary>true</primary>
<unique>true</unique>
<field>
<name>user_id</name>
<name>group_id</name>
</field>
<field>
<name>team_id</name>
<name>user_id</name>
</field>
</index>
</declaration>
</table>
</database>

View File

@ -1,13 +1,23 @@
<?xml version="1.0"?>
<info>
<id>teams</id>
<name>Teams</name>
<description>Manage your teams and share with them</description>
<version>0.1</version>
<licence>AGPL</licence>
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>circles</id>
<name>Circles</name>
<summary>Circles</summary>
<description>Circles</description>
<version>0.0.1</version>
<licence>agpl</licence>
<author>Morris Jobke</author>
<namespace>Teams</namespace>
<author>Maxence Lange</author>
<documentation>
<admin>https://github.com/nextcloud-gmbh/circles/wiki</admin>
</documentation>
<category>tools</category>
<category>files</category>
<website>https://github.com/nextcloud-gmbh/circles</website>
<bugs>https://github.com/nextcloud-gmbh/circles/issues</bugs>
<repository type="git">https://github.com/nextcloud-gmbh/circles.git</repository>
<!--<screenshot>https://raw.githubusercontent.com/nextcloud-gmbh/circles/master/screenshots/circlespng</screenshot>-->
<dependencies>
<nextcloud min-version="11" max-version="12"/>
</dependencies>

View File

@ -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+'],],
],
];

25
css/navigation.css Normal file
View File

@ -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;
}

View File

@ -1,4 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" viewBox="0 0 32 32">
<path style="block-progression:tb;color:#000000;text-transform:none;text-indent:0" d="m8.24 4.42c-2.2265 0-4.1153 1.6283-4.1153 3.7296 0.0158 0.66417 0.0752 1.4832 0.47155 3.2152v0.0429l0.0429 0.0429c0.12723 0.36445 0.31239 0.57294 0.55728 0.85739 0.24489 0.28444 0.53685 0.61924 0.81448 0.90025 0.0327 0.0331 0.0536 0.0535 0.0857 0.0858 0.0551 0.23961 0.12176 0.49747 0.17147 0.72878 0.13227 0.61541 0.11871 1.0512 0.0857 1.2003-0.95674 0.33594-2.147 0.73601-3.2151 1.2003-0.59962 0.26069-1.1422 0.49348-1.5861 0.77165-0.44388 0.27818-0.88534 0.48834-1.0288 1.1146-0.002 0.0285-0.002 0.0572 0 0.0858-0.1402 1.2874-0.35229 3.1806-0.51441 4.4584-0.035 0.26898 0.10676 0.55252 0.34294 0.68591 1.9392 1.0475 4.9181 1.4691 7.8876 1.4576 2.9695-0.0116 5.9247-0.45797 7.8019-1.4576 0.23617-0.13338 0.37794-0.41693 0.34294-0.68591-0.0518-0.39943-0.11534-1.3001-0.17147-2.1863-0.0561-0.88623-0.10486-1.758-0.17147-2.2721-0.0232-0.12744-0.0835-0.2479-0.17147-0.34295-0.59633-0.71211-1.4873-1.1474-2.5292-1.5862-0.95121-0.40054-2.0664-0.81649-3.1722-1.2861-0.0619-0.13788-0.12337-0.53903 0-1.1575 0.0331-0.16606 0.085-0.34392 0.12861-0.51443 0.10392-0.1164 0.18492-0.21152 0.30007-0.34296 0.2456-0.28032 0.50949-0.57438 0.72875-0.85738 0.21926-0.28301 0.39864-0.52579 0.51441-0.85739l0.0429-0.0429c0.44807-1.8085 0.44831-2.5631 0.47155-3.2152v-0.0429c0-2.1013-1.8888-3.7296-4.1153-3.7296zm11.772-3.4224c-3.2461 0-5.9999 2.3739-5.9999 5.4374 0.023 0.9683 0.10964 2.1624 0.68749 4.6874v0.0625l0.0625 0.0625c0.1855 0.53134 0.45545 0.83529 0.81249 1.25 0.35704 0.4147 0.7827 0.90279 1.1875 1.3125 0.0476 0.0482 0.0781 0.0781 0.12499 0.12502 0.0803 0.34932 0.17752 0.72527 0.25 1.0625 0.19284 0.8972 0.17306 1.5326 0.12501 1.75-1.3949 0.48977-3.1303 1.073-4.6874 1.75-0.87422 0.38005-1.6653 0.71943-2.3125 1.125-0.64717 0.40555-1.2908 0.71195-1.5 1.625-0.003 0.0416-0.003 0.0834 0 0.12502-0.20442 1.8769-0.51363 4.637-0.74999 6.4999-0.051 0.39215 0.15566 0.80553 0.49999 0.99999 2.8273 1.5272 7.1704 2.1419 11.5 2.125 4.3294-0.0168 8.6379-0.66766 11.375-2.125 0.34433-0.19446 0.55102-0.60784 0.49999-0.99999-0.0755-0.58232-0.16816-1.8954-0.25-3.1875-0.0818-1.292-0.15288-2.563-0.24998-3.3125-0.0339-0.18578-0.12172-0.36141-0.25-0.49999-0.86942-1.0382-2.1684-1.6728-3.6875-2.3125-1.3868-0.58395-3.0127-1.1904-4.6249-1.875-0.0902-0.20102-0.17988-0.78586 0-1.6875 0.0483-0.2421 0.12394-0.50141 0.1875-0.74999 0.15152-0.1697 0.26961-0.30838 0.4375-0.5 0.35807-0.40868 0.74281-0.83739 1.0625-1.25 0.31967-0.41259 0.58121-0.76654 0.74999-1.25l0.0625-0.0625c0.65328-2.6366 0.65362-3.7367 0.6875-4.6874v-0.0625c0-3.0635-2.7538-5.4374-5.9999-5.4374z" fill="#FFF"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" height="34" width="62" viewBox="0 0 62.000002 34"><path style="text-decoration-color:#000;isolation:auto;mix-blend-mode:normal;block-progression:tb;text-decoration-line:none;text-indent:0;text-transform:none;text-decoration-style:solid" fill="#fff" d="M31.6 4c-5.95 0-10.947 4.075-12.473 9.555-1.333-2.93-4.266-5.01-7.674-5.01C6.815 8.546 3 12.36 3 17c0 4.64 3.814 8.453 8.453 8.454 3.41 0 6.34-2.08 7.672-5.01C20.65 25.923 25.65 30 31.6 30c5.918 0 10.89-4.03 12.448-9.465 1.354 2.878 4.242 4.918 7.61 4.92 4.64 0 8.456-3.816 8.456-8.456s-3.816-8.455-8.455-8.454c-3.37 0-6.26 2.04-7.614 4.918C42.486 8.03 37.518 4 31.6 4zm0 4.962A8 8 0 0 1 39.64 17a8 8 0 0 1-8.04 8.038 8 8 0 0 1-8.037-8.04A8 8 0 0 1 31.6 8.963zm-20.147 4.546a3.454 3.454 0 0 1 3.49 3.49 3.455 3.455 0 0 1-3.49 3.494A3.455 3.455 0 0 1 7.963 17a3.454 3.454 0 0 1 3.49-3.492zm40.205 0a3.455 3.455 0 0 1 3.493 3.49 3.455 3.455 0 0 1-3.492 3.494A3.455 3.455 0 0 1 48.168 17a3.454 3.454 0 0 1 3.49-3.492z" color="#000" white-space="normal"/></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

163
js/navigation.js Normal file
View File

@ -0,0 +1,163 @@
/**
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/
//
// $(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(
// $('<li>')
// .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(
// $('<li>').addClass('header').text('My teams')
// );
//
// _.each(result.myTeams, function(team){
// $teamsNavigation.append(
// $('<li>').append(
// $('<a>').data('navigation', team.id).append(
// $('<span>').addClass('no-icon').text(team.name)
// ).on('click', openTeam)
// )
// );
// });
//
//
// $teamsNavigation.append(
// $('<li>').addClass('header').text('Other teams')
// );
//
// _.each(result.otherTeams, function(team){
// $teamsNavigation.append(
// $('<li>').append(
// $('<a>').data('navigation', team.id).append(
// $('<span>').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);
//
//
//
// });

162
lib/AppInfo/Application.php Normal file
View File

@ -0,0 +1,162 @@
<?php
namespace OCA\Circles\AppInfo;
use \OCA\Circles\Controller\CirclesController;
//use \OCA\Circles\Service\ConfigService;
//use \OCA\Circles\Service\ApiService;
use \OCA\Circles\Service\MiscService;
use OCP\AppFramework\App;
use OCP\Util;
class Application extends App {
/** @var string */
private $appName;
/**
* @param array $params
*/
public function __construct(array $params = array()) {
parent::__construct('circles', $params);
$container = $this->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'
// );
// }
}

View File

@ -0,0 +1,260 @@
<?php
namespace OCA\Circles\Controller;
use OCA\Circles\Service\MiscService;
use OCA\Circles\Exceptions\TeamDoesNotExists;
use OCA\Circles\Exceptions\TeamExists;
use OC\AppFramework\Http;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
class CirclesController extends Controller {
/** @var string */
private $userId;
/** @var IL10N */
private $l10n;
/** @var MiscService */
private $miscService;
public function __construct(
$appName,
IRequest $request,
$userId,
IL10N $l10n,
MiscService $miscService
) {
parent::__construct($appName, $request);
$this->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
// );
// }
}

View File

@ -1,25 +1,6 @@
<?php
/**
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Teams\Exceptions;
namespace OCA\Circles\Exceptions;
class MemberExists extends \Exception {

View File

@ -1,25 +1,6 @@
<?php
/**
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Teams\Exceptions;
namespace OCA\Circles\Exceptions;
class TeamDoesNotExists extends \Exception {

View File

@ -1,25 +1,6 @@
<?php
/**
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Teams\Exceptions;
namespace OCA\Circles\Exceptions;
class TeamExists extends \Exception {

View File

@ -0,0 +1,26 @@
<?php
namespace OCA\Circles\Service;
use OCP\ILogger;
class MiscService {
private $logger;
private $appName;
public function __construct(ILogger $logger, $appName) {
$this->logger = $logger;
$this->appName = $appName;
}
public function log($message, $level = 2) {
$data = array(
'app' => $this->appName,
'level' => $level
);
$this->logger->log($level, $message, $data);
}
}

50
templates/navigate.php Normal file
View File

@ -0,0 +1,50 @@
<?php
/**
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/
script('circles', 'navigation');
style('circles', 'navigation');
?>
<div id="app-navigation">
<div class="navigation-element">
<label for="newTeam" class="hidden-visually"><?php p($l->t('New team')); ?></label>
<input id="newTeam" type="text" placeholder="<?php p($l->t('New team')); ?>"/>
</div>
<ul class="teams"></ul>
</div>
<div id="app-content">
<div id="emptycontent">
<div class="icon-user"></div>
<h2><?php p($l->t('No team selected')); ?></h2>
</div>
<div id="container" class="hidden">
<label for="addMember" class="hidden-visually"><?php p($l->t('Add team member')); ?></label>
<input id="addMember" type="text" placeholder="<?php p($l->t('Add team member')); ?>"/>
<ul class="memberList"></ul>
</div>
<div id="loading_members" class="icon-loading hidden"></div>
</div>