Tested on OG 7.x-2.x with clean Drupal install.

After you install OG with OG UI and visit OG permissions overview or OG roles overview pages in OG config you hit a UX flow wall.
"No group types available" is printed. Without any info or link for new OG users what's the next step.

Image is attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alesr’s picture

Status: Active » Needs review
FileSize
542 bytes
10.52 KB

A picture is worth a thousand words.
Compare og_before.png and og_after.png

Image and patch are attached.

amitaibu’s picture

Status: Needs review » Needs work
+++ b/og_ui/og_ui.admin.incundefined
@@ -260,7 +260,7 @@ function og_ui_group_types_overview($type) {
+    '#empty' => t('No group types available. Edit or !add_new and set it to behave as a group.', array('!add_new' => l(t('add a new content type'), 'admin/structure/types/add'))),

Instead of !add new, you can use <a href="@url">add a new content...

Like this the message can be translated as once sentence.

alesr’s picture

Status: Needs work » Needs review
FileSize
553 bytes

Thanks for review Amitaibu.
I made a new patch that is translator friendlier.

amitaibu’s picture

Status: Needs review » Needs work
+++ b/og_ui/og_ui.admin.incundefined
@@ -260,7 +260,7 @@ function og_ui_group_types_overview($type) {
+    '#empty' => t('No group types available. Edit or <a href="@url">add a new content type</a> and set it to behave as a group.', array('@url' => base_path() . 'admin/structure/types/add')),

Don't use base_path(), always use l()

alesr’s picture

Are you sure about l()? Because after your suggestion from #2 I changed the link to <a href="@url">... so the translators would be happy.
If I use it in array('@url' =>l('text', 'path')), <a href> inside <a href> is generated.
url() is I guess a better solution in this case or am I wrong?

Do you agree with the part of code below so I can make the final patch?
array('@url' => url('admin/structure/types/add'))

alesr’s picture

Status: Needs work » Needs review
amitaibu’s picture

> Are you sure about l()?

Sorry I meant url()

alesr’s picture

FileSize
544 bytes

Ok, here is the patch with url().

alesr’s picture

Status: Needs review » Patch (to be ported)

@Amitaibu, can you commit this to -dev.
I have to patch every installation with this until it's not in the -dev.

The patch from #8 should be ready.

alesr’s picture

Status: Patch (to be ported) » Needs review
amitaibu’s picture

Status: Needs review » Fixed

Thanks.

Status: Fixed » Closed (fixed)

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