100 Commits
Author SHA1 Message Date
Marco NassabainandBenjamin Brahmer be45dd9830 📝 Update CHANGELOG
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-06-16 11:31:11 +02:00
Marco NassabainandBenjamin Brahmer b5186b01f1 🚑 Item: set id to null in clone function
This is done to set the id to null BEFORE resetting the updated fields.
The purpose of this is to avoid explicitly adding a NULL id into the DB,
which provokes an error in some DBMS (like postgres).

Fixes #1375

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-06-16 11:31:11 +02:00
Marco NassabainandSean Molenaar b0b08326a8 🩹 Fix rebase issues
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 31c4e2830a 🧹 Cleanup css
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 7be636f26a 💄 Hide social media sharing if apps disabled
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar f6a5b8e29a 💄 Update dropdown: center checkmark
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 3494e60290 Shared items: show sharer display name
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 299c3428e1 Share dropdown: catch sharee api error, show msg
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 0f6a0d7902 🐛 Share dropdown: only show results of most recent search
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 8c2603b93f 💡 Fix css indentation
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar a8c928b316 ♻️ 💄 Refactor dropdown + fix opacity + realign
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 00f2fbcfd2 🚑 Fix HTML tags error + indentation
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar d95e7c3f43 💡 part.content.php: Fix indentation
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 996197d7ae 🔀 Fix latest broken merge
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 792082e2e0 Social share: show if socialsharing app active
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar c14fa3eaf6 💡 ShareController: add comments to new fcts
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar a86f78a0a7 🔀 Fix last broken merge
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 3d9027a914 ShareController: catch share error & display
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 3a02101e66 ♻️ ShareController: refactor dictionary + fncts
- updated dictionary structure to contain share status
- divided code into functions
- adapted code to match new implementation

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar f7820fffd0 💄 News Item: make sharedBy name unclickable
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 467b4dea57 💄 News Item: fix appearance for shared items
- if the article has no author and is shared it's displayed as:
"shared by ..." instead of "- shared by ..."

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 7bde786c8c ♻️ Refactor dropdown menu code
- reorder html tags
- fix indentation
- adapt css to changes

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 099ec7f418 Show shared_by in every view
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 4fcd483030 🧹 Cleanup ShareController & ShareResource
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 04cf2672c3 🎨 Adapt front-end to match new implementation
- remove share-specific code since new solution uses dummy feeds

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 9e2ef5df9d 📝 Update CHANGELOG and AUTHORS
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar cfea34ba14 🧹 Cleanup code to match master
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 96846e1266 🔥 Remove changes to back-end from front-end pr
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar ce1db3f5dc ✏️ Cleanup part.content.php + fix typo
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar a77cdad828 💄 Update dropdown style
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 9876441799 ✏️ Updated labels (interface)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 00f48c70dd 💡 ContentController: update comments feed cache
- shared items are still in the owners feeds
- since we don't have access to those feeds, we don't cache them

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar dc407c5d7d 🩹 ContentController: Remove unused ShareResource
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar edc7092ac2 🍱 Remove google logo (no more google+)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar d192abef88 Run.js: Include shared route in regex
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar d935a7b26e ✏️ Fix indentation problems in navigation.css
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 2e921f64db ✏️ Remove placeholder share link
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar e7afafba29 🎨 Cleanup code marco in ShareController
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar a990183265 Update jasmine tests to use share data
- explicitly state that isShared = false
- we don't track unreadCount of feeds we don't own
=> a shared item is still in the sharers feed
- cache only gets updated for current users feeds

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 02a84c583f added nextcloud router
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar e5ccff97a6 Shared menu: get and show sharedCount
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 29a68a10e8 Run.js: Subscribe to 'shared' (sharedCount)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
marco.nassabain@etu.unistra.frandSean Molenaar ea4178620b 🎨 create ShareController and moved share logic
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
marco.nassabain@etu.unistra.frandSean Molenaar 4a86db338d 🎨 rename UserResource to ShareResource
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
marco.nassabain@etu.unistra.frandSean Molenaar 4b1102972e 🐛 Use the sharee api to get users for sharing
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco NassabainandSean Molenaar 391dd25293 🩹 Fix rebase issues
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar bf85a5883a 🩹 Item: change $sharedBy to string|null in annot.
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar a6f9e4495b 🩹 Fix rebase errors
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 486e651ed6 🎨 Rename $l to $l10n
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 307534cc29 Added test for sharedByDisplayName field
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 413c4b8914 🩹 Fix sharedByDisplayName bug:
- setting sharedByDisplayName shouldn't mark it as updated

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar d5b9fbba3d ✏️ Fix comments in ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 9e9bd24c5f Add + update sharer display name tests
- added testMapSharedByDisplayNames
- updated ItemController tests to expect call to function

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 1a5ca74172 Add sharer display name into shared items
- Add mapSharedByDisplayNames in ShareService
- Update ItemController to call function on items

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar bbdd95c30d 🔥 Remove UserManager code from ItemMapper & tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 4d0a82d429 ✏️ Fix phpcs indentation error
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar c2c92a3f5a 🩹 Fix issues after rebase
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 276460a240 🩹 Item: mark categoriesJson as updated in clone
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 35dc4cf033 🗃 Update share migration version
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar af84bbf204 Item: update tests - include sharer display name
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 7306370ece Item: add sharer display name in findEntities
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 8674d558fc Update Item model: add sharedByDisplayName
- added field + setters + getters
- include field in serialized Item

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 0fdd88df55 🧹 ShareService: rename $url to $urlGenerator
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar a754b437e0 Update test to include localization
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 7f3c63a2a4 🎨 ShareService: update dummy feed URL
- add IURLGenerator DI
- update url to "http://serverurl/news/sharedwithme"
- updated tests: added DI + adapted expected url

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 920ae54a2c 🌐 ShareService: Localize dummy feed title
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar b0c42e4cd7 ♻️ Item: Remove isShared
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 2cba1e4146 🧹 Cleanup code, remove spaces, rename variables
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 4612ed9bf0 🎨 Share migration: remove shared_by default value
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar e5d439ee7e 🚑 Fix newsItem insert error
- add Item::__clone method resetting updated fields
- set item id to null in ShareService

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 5c5578b16e Update ItemServiceTest: remove share tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar e6eb878c4f WIP add ShareServiceTest
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 25e2efd54a Update ItemTest - remove sharedWith field
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 293300166d 🚑 Fix exception handling in ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 88fa9886ae Update ItemController share tests
- use ShareService and shareItemWithUser function

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 1a582f2a7a 🚑 Fix ItemController::share
- call correct ShareService function
- correct ShareService className annotation

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar d92d77c066 🚑 Fix errors in ShareService
- change argument $id to $itemId
- import Exceptions

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar d275a5b9e7 🩹 Patch ItemControllerTest to mock shareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 409c835433 🩹 Patch ItemController + test to use ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar dd818c6203 🚑 Fix circular inclusion: create ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 8fd3975907 🎨 Update share migration
- remove shared_with column
- make shared_by nullable

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar e96d7c9b1e 🎨 Item.php: make shared_by nullable
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 6a6f89ff94 🎨 Item.php: Remove shared_with
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 54a228eca5 Add FeedService DI into ItemService in tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 26569fd4a2 Add FeedServiceV2 DI into ItemServiceV2
- used for finding dummy share feed

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 2ee5112760 🔥 Remove old share logic from tests & old tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 9bd27da9ba 🔥 Remove old share item logic & functions
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar d2e831fbaa 🎨 Update item share: add items to dummy feed
- create/find a 'shared with me' dummy feed
- clone item, initialize fields, add to dummy feed

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 525c47bd01 📝 Update CHANGELOG and AUTHORS
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 4a7e092b98 🔥 Remove front-end edit from back-end pr
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar a1edb03e19 🔥 Remove changes from front-end for back-end pr
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar f708e40b75 ✏️ Fix share test name typo
- testFindAllShared => testFindAllSharedWithUser

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 80dec257c2 Update find shared items tests
- testFindAllSharedWithUser
- testFindAllSharedWithUserHideRead
- testFindAllSharedWithUserSearch

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar af02560363 🎨 ItemMapperV2: add new offset code (findShared)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 8de50d44b6 ItemMapperPaginatedTest: update tests
Adapted folder/feed/item tests to take account for shared data
- testFindAllItemsStarredSearch
- testFindAllFeed
- testFindAllFeedInverted
- testFindAllFeedHideRead
- testFindAllFeedSearch
- testFindAllFolderIdNull
- testFindAllFolderHideRead
- testFindAllFolderHideReadInvertOrder
- testFindAllFolderSearchId

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 702d611f35 🔀 Resolving merge: moving shared tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 85dbed9ffa 🧹 Cleanup test files: added new lines
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar fc8670f5be ItemMapperTest: add tests for findAllSharedAfter
- testFindAllSharedAfter
- testFindAllSharedAfterHideRead

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar cbe1ca6b4d ItemMapperTest: test findAllSharedWithUser func
- testFindAllSharedWithUser
- testFindAllSharedWithUserHideRead
- testFindAllSharedWithUserSearch

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco NassabainandSean Molenaar 5c359a8d42 ItemServiceTest: test share functions
- testFindAllShared
- testFindAllNewShared
- testSharedCount

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00