Skip to content

Commit 3d9dfde

Browse files
committed
chore: concept/approval notice to group members
1 parent a6c59db commit 3d9dfde

File tree

4 files changed

+33
-20
lines changed

4 files changed

+33
-20
lines changed

languages/en.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
'group_tools:group:concept:profile:publish' => "Remove draft status",
230230
'group_tools:group:concept:profile:publish:confirm' => "Are you sure your group is ready to be used by the community?",
231231
'group_tools:group:concept:profile:description' => "This group is still in concept, when you're ready click the button at the top of the profile.",
232+
'group_tools:group:concept:profile:description:user' => "This group is still in concept.",
232233
'group_tools:group:concept:profile:retention' => "This group will be removed %s",
233234
'group_tools:action:remove_concept_status:success:approval' => "The group is now awaiting approval by a site administrator",
234235
'group_tools:action:remove_concept_status:success:published' => "The group is now available on the community",
@@ -266,6 +267,7 @@
266267
// group admin approve
267268
'group_tools:group:admin_approve:notice' => "New groups need to be approved by a site administrator. You can make/edit the group, but it won't be visible to other users until approved by a site administrator.",
268269
'group_tools:group:admin_approve:notice:profile' => "This group is awaiting approval by a site administrator. You can edit the group, but it won't be visible to other users until approved by a site administrator.",
270+
'group_tools:group:admin_approve:notice:profile:user' => "This group is awaiting approval by a site administrator.",
269271
'group_tools:group:admin_approve:decline:title' => "Decline the group approval request",
270272
'group_tools:group:admin_approve:decline:description' => "Here you can give a reason why the group '%s' isn't being approved. The group owner will receive a notification that the group was declined and the reason why. After the group is declined it'll be removed.",
271273
'group_tools:group:admin_approve:decline:reason' => "Reason for declining the group",

languages/nl.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php
22
/**
33
* This file was created by Translation Editor v14.0.4
4-
* On 2026-02-04 15:03
4+
* On 2026-02-06 09:15
55
*/
66

77
return array (
8+
'group_tools:group:concept:profile:description:user' => 'Deze groep is nog in concept.',
9+
'group_tools:group:admin_approve:notice:profile:user' => 'Deze groep wacht op goedkeuring door een site beheerder.',
810
'group_tools:upgrade:2026020401:title' => 'Migreer groep concept / goedkeuring status',
911
'group_tools:upgrade:2026020401:description' => 'Er zijn wijzigingen doorgevoerd in hoe wordt opgeslagen dat een groep in concept is of wacht op goedkeuring',
1012
'group_tools:group:edit:suggested' => 'Vergelijkbare groepen',

views/default/group_tools/extends/groups/edit/admin_approve.php

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,32 @@
1818
echo elgg_view_message('notice', elgg_echo('group_tools:group:admin_approve:notice'));
1919
} elseif ((bool) $entity->admin_approval) {
2020
// group profile / edit form
21-
$message = elgg_echo('group_tools:group:admin_approve:notice:profile');
2221
$link = '';
2322

24-
if ($entity->canEdit() && (bool) elgg_get_plugin_setting('creation_reason', 'group_tools')) {
25-
$count = $entity->getAnnotations([
26-
'count' => true,
27-
'wheres' => [
28-
function(QueryBuilder $qb, $main_alias) {
29-
return $qb->compare("{$main_alias}.name", 'like', 'approval_reason:%', ELGG_VALUE_STRING);
30-
},
31-
],
32-
]);
33-
if (!empty($count)) {
34-
$link = elgg_view('output/url', [
35-
'text' => elgg_echo('group_tools:group:admin_approve:reasons'),
36-
'href' => elgg_http_add_url_query_elements('ajax/view/group_tools/group/reasons', [
37-
'guid' => $entity->guid,
38-
]),
39-
'class' => 'elgg-lightbox',
23+
if ($entity->canEdit()) {
24+
$message = elgg_echo('group_tools:group:admin_approve:notice:profile');
25+
26+
if ((bool) elgg_get_plugin_setting('creation_reason', 'group_tools')) {
27+
$count = $entity->getAnnotations([
28+
'count' => true,
29+
'wheres' => [
30+
function (QueryBuilder $qb, $main_alias) {
31+
return $qb->compare("{$main_alias}.name", 'like', 'approval_reason:%', ELGG_VALUE_STRING);
32+
},
33+
],
4034
]);
35+
if (!empty($count)) {
36+
$link = elgg_view('output/url', [
37+
'text' => elgg_echo('group_tools:group:admin_approve:reasons'),
38+
'href' => elgg_http_add_url_query_elements('ajax/view/group_tools/group/reasons', [
39+
'guid' => $entity->guid,
40+
]),
41+
'class' => 'elgg-lightbox',
42+
]);
43+
}
4144
}
45+
} else {
46+
$message = elgg_echo('group_tools:group:admin_approve:notice:profile:user');
4247
}
4348

4449
echo elgg_view_message('notice', $message, ['link' => $link]);

views/default/group_tools/extends/groups/profile/concept.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
use Elgg\Values;
99

1010
$entity = elgg_extract('entity', $vars);
11-
if (!$entity instanceof \ElggGroup || !$entity->canEdit() || !(bool) $entity->is_concept) {
11+
if (!$entity instanceof \ElggGroup || !(bool) $entity->is_concept) {
1212
return;
1313
}
1414

15-
$content = elgg_echo('group_tools:group:concept:profile:description');
15+
if ($entity->canEdit()) {
16+
$content = elgg_echo('group_tools:group:concept:profile:description');
17+
} else {
18+
$content = elgg_echo('group_tools:group:concept:profile:description:user');
19+
}
1620

1721
$retention = (int) elgg_get_plugin_setting('concept_groups_retention', 'group_tools');
1822
if ($retention > 0) {

0 commit comments

Comments
 (0)