diff options
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r-- | app/helpers/groups_helper.rb | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 129871ca3fd..2ced1bec5e9 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -126,21 +126,12 @@ module GroupsHelper def subgroup_creation_data(group) { + parent_group_url: group.parent && group_url(group.parent), parent_group_name: group.parent&.name, import_existing_group_path: new_group_path(parent_id: group.parent_id, anchor: 'import-group-pane') } end - def verification_for_group_creation_data - # overridden in EE - {} - end - - def require_verification_for_namespace_creation_enabled? - # overridden in EE - false - end - def group_name_and_path_app_data { base_path: root_url, @@ -160,6 +151,7 @@ module GroupsHelper new_project_path: new_project_path(namespace_id: group.id), new_subgroup_illustration: image_path('illustrations/subgroup-create-new-sm.svg'), new_project_illustration: image_path('illustrations/project-create-new-sm.svg'), + empty_projects_illustration: image_path('illustrations/empty-state/empty-projects-md.svg'), empty_subgroup_illustration: image_path('illustrations/empty-state/empty-subgroup-md.svg'), render_empty_state: 'true', can_create_subgroups: can?(current_user, :create_subgroup, group).to_s, @@ -167,6 +159,26 @@ module GroupsHelper } end + def group_readme_app_data(group_readme) + { + web_path: group_readme.present.web_path, + name: group_readme.present.name + } + end + + def show_group_readme?(group) + group.group_readme + end + + def group_settings_readme_app_data(group) + { + group_readme_path: group.group_readme&.present&.web_path, + readme_project_path: group.readme_project&.present&.path_with_namespace, + group_path: group.full_path, + group_id: group.id + } + end + def enabled_git_access_protocol_options_for_group case ::Gitlab::CurrentSettings.enabled_git_access_protocol when nil, "" |