- Recent contributors
- Recent additions

Some options for including these views in the group homepage:

- Panelizer - Panelizer 3.0 allows us to Panelize different display modes differently
- Add these views as content to be rendered along with the node with a bit of glue code
- DisplaySuite (I suggest we not introduce DS as a dependency)

Commons groups teasers

Comments

ezra-g’s picture

For "discussing the topics" I suggest we use as static "topics" field for now and later generate this list dynamically.

ezra-g’s picture

Project: Commons Groups » Drupal Commons
Component: Code » Groups
Priority: Normal » Major

Moving this to the main Drupal Commons issue queue per #1812492: Consider using central issue queue for Commons projects.

ezra-g’s picture

Priority: Major » Critical

Bumping to "critical" so this gets worked on in time to avoid becoming a themeing blocker.

gnuget’s picture

Assigned: Unassigned » gnuget

I'm going to work on this.

ezra-g’s picture

Great! It's probably best to use Panelizer's ability to panelize different display modes to embed some views into the group teaser.

gnuget’s picture

Oks. yesterday i did a little investigation about how to complete this issue, this are the things to i will do:

- Create the views.
- Create a view mode using hook_entity_info_alter() (i'm not sure if is necessary create a new "view mode" or if i can use the "teaser" view mode without break other things).
- Create two pseudo-fields (one for each view) using hook_field_extra_fields().
- Adding the views into the pseudo-fields in the node using hook_node_view().
- Using panelizer for embed the views into the group teaser.
- Done!

In this way we avoid introduce DS as dependency and is used panelizer as you suggested.

Any thought or correction about the things to i plan to do, just let me know and i adjust the list of things to do.

ezra-g’s picture

We should be able to re-use the "recent content in this group" block and re-use the teaser view mode for the group content type (see admin/config/content/panelizer) and place them without any field altering as default Panelized content.

It may be necessary to create a 2nd region for the views that display on the bottom - The theme can take care of floating those next to one another.

gnuget’s picture

Status: Active » Needs review
StatusFileSize
new44.89 KB

I embed the two views into the group node teaser page.

Also, create a view called: Commons Contributors - Group with two display, one for the groups node teaser page and one for the group homepage.

And i added a block into the group homepage page.

Something to i need to mention is the groups roles names not match with the actual roles in commons.

here https://projects.invisionapp.com/share/FW3OD3SQ#/2438205 the role is organizers and in commons the role is administrator member.

ezra-g’s picture

Status: Needs review » Needs work

Thanks, gnuget!

This is a great start. There are some areas that need revision:

A) Recent Content in a group view is not displaying on group teasers (there may be an issue with the argument/context)
B) The new views should be panes rather than blocks for consistency with the other views and to simpify the UI when customizing pages through Panels/Panelizer, since panes can have default config in areas such as context
C) The views created should be in the commons_groups feature and the Panelized teaser settings should be part of commons group homepages feature (rather than groups directory), since we'd expect these settings to take effect everywhere group teasers are displayed.

This separation allows folks to customize display of the group homepage and teasers by disabling the module with the Panelizer settings but re-use the blocks and views in their own feature, without overriding the underlying Commons Groups feature.

D) Less critical: there are changes to the field_bases and field_instance files in this patch. Unrelated to this issue, we need to add some features_exclude lines to the Commons Groups info file. No need to do that in this issue, but if you do git checkout commons_groups.features.field_base.inc (for example) before rolling your patch, changes to those files won't appear in the patch.

gnuget’s picture

Oks, new patch.

- This time should be displayed the "recent content" into the group teasers correctly.

- Now is used panes instead of blocks

- I move the "Commons Contributors - Group" view into commons_group and the panelizer settings are in the "group homepage feature".

- This time is i not included the commons_groups.features.field_base.inc and the commons_groups.features.field_instance.inc fields in the patch

gnuget’s picture

Status: Needs work » Needs review
ezra-g’s picture

Status: Needs review » Fixed

Thanks, gnuget!

I ran with this and made revisions, including:
- Contributors/Topics text
- Revised image styles
- Group follow links

ay13 also did some themeing in Commons_origins to correspond with this.

http://drupalcode.org/project/commons_groups.git/commit/0b75738

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.