diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
commit | 143f196f8b3c40ceb7e9335a8dcc712b079519b9 (patch) | |
tree | 909df13e1f99b456287934741ba466b506e01129 /app/presenters | |
parent | 575ccb036ea14c6a899482a83bd985ffbc992077 (diff) | |
download | gitlab-ce-143f196f8b3c40ceb7e9335a8dcc712b079519b9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/project_presenter.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 6d370f6241c..81018398d5d 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -21,7 +21,6 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated def statistics_anchors(show_auto_devops_callout:) [ - license_anchor_data, commits_anchor_data, branches_anchor_data, tags_anchor_data, @@ -32,6 +31,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated def statistics_buttons(show_auto_devops_callout:) [ readme_anchor_data, + license_anchor_data, changelog_anchor_data, contribution_guide_anchor_data, autodevops_anchor_data(show_auto_devops_callout: show_auto_devops_callout), @@ -41,15 +41,14 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated end def empty_repo_statistics_anchors - [ - license_anchor_data - ].compact.select { |item| item.is_link } + [] end def empty_repo_statistics_buttons [ new_file_anchor_data, readme_anchor_data, + license_anchor_data, changelog_anchor_data, contribution_guide_anchor_data, gitlab_ci_anchor_data @@ -227,17 +226,18 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated icon = statistic_icon('scale') if repository.license_blob.present? - AnchorData.new(true, - icon + content_tag(:strong, license_short_name, class: 'project-stat-value'), - license_path) + AnchorData.new(false, + icon + content_tag(:span, license_short_name, class: 'project-stat-value'), + license_path, + 'default') else if current_user && can_current_user_push_to_default_branch? - AnchorData.new(true, - content_tag(:span, icon + _('Add license'), class: 'add-license-link d-flex'), + AnchorData.new(false, + content_tag(:span, statistic_icon + _('Add LICENSE'), class: 'add-license-link d-flex'), add_license_path) else - AnchorData.new(true, - icon + content_tag(:strong, _('No license. All rights reserved'), class: 'project-stat-value'), + AnchorData.new(false, + icon + content_tag(:span, _('No license. All rights reserved'), class: 'project-stat-value'), nil) end end |