Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

group_settings: Use word role instead of group for system groups.

Shubham Padia80514f0618ac
diff --git a/web/src/user_group_edit.ts b/web/src/user_group_edit.ts
index f897c1c72de..4b9a68d7cff 100644
--- a/web/src/user_group_edit.ts
+++ b/web/src/user_group_edit.ts
@@ -607,7 +607,7 @@ function get_membership_status_context(group: UserGroup): {
function update_membership_status_text(group: UserGroup): void {
const args = get_membership_status_context(group);
- const rendered_membership_status = render_user_group_membership_status(args);
+ const rendered_membership_status = render_user_group_membership_status({...args, group});
const $edit_container = get_edit_container(group.id);
$edit_container.find(".membership-status").html(rendered_membership_status);
}
diff --git a/web/templates/user_group_settings/user_group_membership_status.hbs b/web/templates/user_group_settings/user_group_membership_status.hbs
index faaaf081922..48fc27955c2 100644
--- a/web/templates/user_group_settings/user_group_membership_status.hbs
+++ b/web/templates/user_group_settings/user_group_membership_status.hbs
@@ -1,14 +1,33 @@
{{#if is_direct_member}}
- {{t "You are a member of this group."}}
+ {{#if group.is_system_group}}
+ {{t "You have this role."}}
+ {{else}}
+ {{t "You are a member of this group."}}
+ {{/if}}
{{else if (not is_member)}}
- {{t "You are not a member of this group."}}
+ {{#if group.is_system_group}}
+ {{t "You do not have this role."}}
+ {{else}}
+ {{t "You are not a member of this group."}}
+ {{/if}}
{{else}}
- {{#tr}}
- You are a member of this group because you are a member of a subgroup (<z-subgroup-names></z-subgroup-names>).
- {{#*inline "z-subgroup-names" ~}}
- {{~#list_each associated_subgroup_names type="unit" as |name| ~}}
- <b class="highlighted-element">{{name}}</b>
- {{~/list_each ~}}
- {{~/inline}}
- {{/tr}}
+ {{#if group.is_system_group}}
+ {{#tr}}
+ You have this role because you have a higher role (<z-subgroup-names></z-subgroup-names>).
+ {{#*inline "z-subgroup-names" ~}}
+ {{~#list_each associated_subgroup_names type="unit" as |name| ~}}
+ <b class="highlighted-element">{{name}}</b>
+ {{~/list_each ~}}
+ {{~/inline}}
+ {{/tr}}
+ {{else}}
+ {{#tr}}
+ You are a member of this group because you are a member of a subgroup (<z-subgroup-names></z-subgroup-names>).
+ {{#*inline "z-subgroup-names" ~}}
+ {{~#list_each associated_subgroup_names type="unit" as |name| ~}}
+ <b class="highlighted-element">{{name}}</b>
+ {{~/list_each ~}}
+ {{~/inline}}
+ {{/tr}}
+ {{/if}}
{{/if}}
diff --git a/web/templates/user_group_settings/user_group_settings.hbs b/web/templates/user_group_settings/user_group_settings.hbs
index fb3cd0f65ea..bc4db203fc8 100644
--- a/web/templates/user_group_settings/user_group_settings.hbs
+++ b/web/templates/user_group_settings/user_group_settings.hbs
@@ -53,7 +53,11 @@
<div class="group_setting_section" data-group-section="permissions">
<div class="group-assigned-permissions">
<span class="no-permissions-for-group-text {{#unless group_has_no_permissions}}hide{{/unless}}">
- {{t 'This group has no assigned permissions.'}}
+ {{#if group.is_system_group}}
+ {{t 'This role has no assigned permissions.'}}
+ {{else}}
+ {{t 'This group has no assigned permissions.'}}
+ {{/if}}
</span>
{{> group_permission_settings .}}
</div>