Problem/Motivation
Currently the Cmis Field Formatter show only link
Steps to reproduce
Proposed resolution
Add new FieldFormatter to show CMIS Browser
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | interdiff-15-17.patch | 7.58 KB | liber_t |
| #17 | cmis-browser_field_formatter-3164884-17.patch | 28.79 KB | liber_t |
| #2 | Capture d’écran_2020-08-12_20-03-55.png | 48.21 KB | liber_t |
Comments
Comment #2
liber_tComment #3
liber_tImprove code and add settings (hide cmis operations, hide breadcrumb) OK
Comment #4
liber_tComment #5
liber_tIf instantiate a new CMIS field, I have an error:
Error: Call to a member function getCmisUrl() on null in Drupal\cmis\CmisConnectionApi->setDefaultParameters() (line 144 of modules/contrib/cmis/src/CmisConnectionApi.php).Comment #6
liber_tAnother bug,
If I am in node with Cmis browser field and I upload file or create folder, I am redirect to cmis url not the node url
Comment #7
liber_tFix cache in browser widget & form redirect (upload and create folder)
Comment #8
liber_tImplement permission (Action CAN_CREATE_FOLDER and CAN_CREATE_DOCUMENT) in operation route
Depend on https://www.drupal.org/project/cmis/issues/3165959
Comment #9
liber_tAdd check permission Action::CAN_DELETE_OBJECT in delete link.
I don't remove "access cmis operations" permission in this patch. I'm going to deleting in "Add permission per entity" issue
Comment #10
liber_tComment #11
liber_tFix widget title and remove cmis operations permissions
Can you replace
_permission: 'access cmis operations'per
_custom_access: '\Drupal\cmis\Controller\CmisRepositoryController::access'when the "Add permission per entity" issue as merged in routing.yml ?
Regards,
ps: 9 and 11 is same patch (just number of comment as been changed
Comment #12
liber_tMissing FieldFormatter/CmisFieldBrowser.php
Comment #13
grimreaperComment #14
grimreaperNope. This is the schema of the widget.
You need to make a schema for the field formatter.
$this->current->getId() put into a variable.
A comment on why this if would be appreciated.
This needs a comment.
Unused variable.
Uneeded empty line.
Uneeded empty line.
Put $this->element->getId() in a variable to avoid several calls.
#type first please :)
No space before punctuation with double points in english :)
I understand that there is currently no cache mecanism possible because the content displayed inside is from an external source.
Maybe creating a cache tag per folder ID and flushing this cache tag when modifying a folder content. But the current code base will not help to do that.
To avoid preventing the whole page to be cacheable, maybe we can do a lazy_builder approach. See https://github.com/Drupal-FR/site-drupalfr/blob/8.x-1.x/www/modules/cust...
-1 needs a comment.
Unused statement.
Why add this? It does not seem to be in the annotation.
Now, I will manually test the patch.
Comment #15
grimreaperAlso, here is a rebased patch, because patch from comment 12 didn't apply any more.
I made some changes of the previous review.
Comment #16
grimreaperComment #17
liber_tAll point is ok
Comment #18
liber_tComment #19
grimreaperSeen together. When the show breadcrumb option is unchecked, it is ok on the first display of the browser. But when going into a folder, then the breadcrumb is displayed again.
Comment #20
grimreaperSchema.yml is wrong.
Comment #21
grimreaperSeen together about the show breadcrumb settings not transmitted. I have created a child issue because currently with the module architecture, it is difficult/impossible to do better in a generic way.
Going to merge the patch.
Comment #23
grimreaper