Problem/Motivation
As of #2571927: WYSIWYG Media Library No Files, the Media Browser will show files uploaded via the wysiwyg when the **Any** option is selected, but that is not the default behavior of Atrium's space reference plugin. Instead, it aims for the current space, which means WYSIWYG-uploaded content is not displayed. For sites that have "thinner walls" in their use of Atrium or make heavy use of the WYSIWYG media button, a way to sidestep this default would be helpful.
Proposed resolution
Add a new variable `oa_core_group_reference_default_current`, when it is explicitly FALSY it will cause views-based filters to default to Any.
Comment | File | Size | Author |
---|---|---|---|
#2 | openatrium_oa-core_default-space-filter-to-any-2694493-1.patch | 2.21 KB | Grayside |
Comments
Comment #2
Grayside CreditAttribution: Grayside at Phase2 commentedComment #3
Grayside CreditAttribution: Grayside at Phase2 commentedAdding a patch to Atrium profile to pull in the patch in #1.
Comment #4
mpotter CreditAttribution: mpotter at Phase2 commentedThe second part of this patch in #2 looks ok where you use oa_core_group_reference_default_current variable to set #convert_empty_to_current. However, earlier in the patch it looks like you are also using this variable to bypass any existing default setting in the view itself. That shouldn't be necessary and I think will cause regressions elsewhere in Atrium if this variable is set to true.
Was that extra step needed to get this working in the WYSIWYG?
Comment #5
Grayside CreditAttribution: Grayside at Phase2 commentedThe functionality that uses #convert_empty_to_current only applies to views tagged 'admin'. Media views are not tagged admin.
I added the first change block to the views plugin rather than change oa_core_select2widget_entity_validate_field() to localize impact as much as possible.
Comment #6
mpotter CreditAttribution: mpotter at Phase2 commentedOK, that makes sense. I'm going ahead with the commit on this then since sites need to explicitly change the variable to get this behavior.
A better long term solution is probably to add a plugin for Media Browser that shows "WYSIWYG Media" that has been embedded and doesn't belong to a space. Or maybe removing the Atrium customizations to the Library tab and creating a separate "Space Media" tab for Atrium. But those are larger issues than this, and don't want to block this one till then.
Committed to 130986a.