Skip to content
Snippets Groups Projects
Commit 083003bf authored by Oswaldo Ferreir's avatar Oswaldo Ferreir
Browse files

Improve methods naming

parent c445ef53
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,7 +7,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
 
presents :project
 
def project_stat_anchor_items(show_auto_devops_callout:)
def statistics_anchors(show_auto_devops_callout:)
[
files_anchor_data,
commits_anchor_data,
Loading
Loading
@@ -23,7 +23,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
].compact.reject { |i| !i[:enabled] }
end
 
def project_stat_button_items(show_auto_devops_callout:)
def statistics_buttons(show_auto_devops_callout:)
[
changelog_anchor_data,
license_anchor_data,
Loading
Loading
@@ -35,14 +35,14 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
].compact.reject { |i| i[:enabled] }
end
 
def empty_project_stat_anchor_items
def empty_repo_statistics_anchors
[
autodevops_anchor_data,
kubernetes_cluster_anchor_data
].compact.reject { |i| !i[:enabled] }
end
 
def empty_project_stat_button_items
def empty_repo_statistics_buttons
[
new_file_anchor_data,
readme_anchor_data,
Loading
Loading
Loading
Loading
@@ -33,8 +33,8 @@
.prepend-top-20
 
%nav.project-stats{ class: container_class }
= render 'stat_anchor_list', anchors: @project.empty_project_stat_anchor_items
= render 'stat_anchor_list', anchors: @project.empty_project_stat_button_items
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons
 
- if can?(current_user, :push_code, @project)
%div{ class: [container_class, ("limit-container-width-sm" unless fluid_layout)] }
Loading
Loading
- project_stat_items_args = { show_auto_devops_callout: show_auto_devops_callout?(@project) }
- @no_container = true
- breadcrumb_title "Details"
- @content_class = "limit-container-width" unless fluid_layout
- @project = @project.present(current_user: current_user)
- show_auto_devops_callout = show_auto_devops_callout?(@project)
 
= content_for :meta_tags do
= auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity")
Loading
Loading
@@ -16,8 +16,8 @@
 
- if can?(current_user, :download_code, @project)
%nav.project-stats{ class: container_class }
= render 'stat_anchor_list', anchors: @project.project_stat_anchor_items(project_stat_items_args)
= render 'stat_anchor_list', anchors: @project.project_stat_button_items(project_stat_items_args)
= render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout)
= render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout)
 
 
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment