Commit bf249550 authored by Robert Speicher's avatar Robert Speicher

number_with_delimiter most of the things

parent 7945cf41
......@@ -8,17 +8,17 @@
%li{class: ('active' if @scope.nil?)}
= link_to admin_builds_path do
Running
%span.badge.js-running-count= @all_builds.running_or_pending.count(:id)
%span.badge.js-running-count= number_with_delimiter(@all_builds.running_or_pending.count(:id))
%li{class: ('active' if @scope == 'finished')}
= link_to admin_builds_path(scope: :finished) do
Finished
%span.badge.js-running-count= @all_builds.finished.count(:id)
%span.badge.js-running-count= number_with_delimiter(@all_builds.finished.count(:id))
%li{class: ('active' if @scope == 'all')}
= link_to admin_builds_path(scope: :all) do
All
%span.badge.js-totalbuilds-count= @all_builds.count(:id)
%span.badge.js-totalbuilds-count= number_with_delimiter(@all_builds.count(:id))
.gray-content-block
#{(@scope || 'running').capitalize} builds
......
......@@ -6,35 +6,35 @@
%p
Forks
%span.light.pull-right
= ForkedProjectLink.count
= number_with_delimiter(ForkedProjectLink.count)
%p
Issues
%span.light.pull-right
= Issue.count
= number_with_delimiter(Issue.count)
%p
Merge Requests
%span.light.pull-right
= MergeRequest.count
= number_with_delimiter(MergeRequest.count)
%p
Notes
%span.light.pull-right
= Note.count
= number_with_delimiter(Note.count)
%p
Snippets
%span.light.pull-right
= Snippet.count
= number_with_delimiter(Snippet.count)
%p
SSH Keys
%span.light.pull-right
= Key.count
= number_with_delimiter(Key.count)
%p
Milestones
%span.light.pull-right
= Milestone.count
= number_with_delimiter(Milestone.count)
%p
Active Users
%span.light.pull-right
= User.active.count
= number_with_delimiter(User.active.count)
.col-md-4
%h4
Features
......@@ -99,7 +99,7 @@
%h4 Projects
.data
= link_to admin_namespaces_projects_path do
%h1= Project.count
%h1= number_with_delimiter(Project.count)
%hr
= link_to('New Project', new_project_path, class: "btn btn-new")
.col-sm-4
......@@ -107,7 +107,7 @@
%h4 Users
.data
= link_to admin_users_path do
%h1= User.count
%h1= number_with_delimiter(User.count)
%hr
= link_to 'New User', new_admin_user_path, class: "btn btn-new"
.col-sm-4
......@@ -115,7 +115,7 @@
%h4 Groups
.data
= link_to admin_groups_path do
%h1= Group.count
%h1= number_with_delimiter(Group.count)
%hr
= link_to 'New Group', new_admin_group_path, class: "btn btn-new"
......
- page_title "Groups"
%h3.page-title
Groups (#{@groups.total_count})
Groups (#{number_with_delimiter(@groups.total_count)})
= link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
%p.light
......
......@@ -8,27 +8,27 @@
%li{class: "#{'active' unless params[:filter]}"}
= link_to admin_users_path do
Active
%small.pull-right= User.active.count
%small.pull-right= number_with_delimiter(User.active.count)
%li{class: "#{'active' if params[:filter] == "admins"}"}
= link_to admin_users_path(filter: "admins") do
Admins
%small.pull-right= User.admins.count
%small.pull-right= number_with_delimiter(User.admins.count)
%li.filter-two-factor-enabled{class: "#{'active' if params[:filter] == 'two_factor_enabled'}"}
= link_to admin_users_path(filter: 'two_factor_enabled') do
2FA Enabled
%small.pull-right= User.with_two_factor.count
%small.pull-right= number_with_delimiter(User.with_two_factor.count)
%li.filter-two-factor-disabled{class: "#{'active' if params[:filter] == 'two_factor_disabled'}"}
= link_to admin_users_path(filter: 'two_factor_disabled') do
2FA Disabled
%small.pull-right= User.without_two_factor.count
%small.pull-right= number_with_delimiter(User.without_two_factor.count)
%li{class: "#{'active' if params[:filter] == "blocked"}"}
= link_to admin_users_path(filter: "blocked") do
Blocked
%small.pull-right= User.blocked.count
%small.pull-right= number_with_delimiter(User.blocked.count)
%li{class: "#{'active' if params[:filter] == "wop"}"}
= link_to admin_users_path(filter: "wop") do
Without projects
%small.pull-right= User.without_projects.count
%small.pull-right= number_with_delimiter(User.without_projects.count)
%hr
= form_tag admin_users_path, method: :get, class: 'form-inline' do
.form-group
......@@ -42,7 +42,7 @@
%section.col-md-9
.panel.panel-default
.panel-heading
Users (#{@users.total_count})
Users (#{number_with_delimiter(@users.total_count)})
.panel-head-actions
.dropdown.inline
%a.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"}
......
......@@ -29,13 +29,13 @@
= icon('cog fw')
%span
Runners
%span.count= Ci::Runner.count(:all)
%span.count= number_with_delimiter(Ci::Runner.count(:all))
= nav_link path: 'builds#index' do
= link_to admin_builds_path do
= icon('link fw')
%span
Builds
%span.count= Ci::Build.count(:all)
%span.count= number_with_delimiter(Ci::Build.count(:all))
= nav_link(controller: :logs) do
= link_to admin_logs_path, title: 'Logs' do
= icon('file-text fw')
......@@ -80,7 +80,7 @@
= icon('exclamation-circle fw')
%span
Abuse Reports
%span.count= AbuseReport.count(:all)
%span.count= number_with_delimiter(AbuseReport.count(:all))
= nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do
= link_to admin_application_settings_path, title: 'Settings' do
......
......@@ -24,13 +24,13 @@
= icon('exclamation-circle fw')
%span
Issues
%span.count= current_user.assigned_issues.opened.count
%span.count= number_with_delimiter(current_user.assigned_issues.opened.count)
= nav_link(path: 'dashboard#merge_requests') do
= link_to assigned_mrs_dashboard_path, title: 'Merge Requests', class: 'shortcuts-merge_requests' do
= icon('tasks fw')
%span
Merge Requests
%span.count= current_user.assigned_merge_requests.opened.count
%span.count= number_with_delimiter(current_user.assigned_merge_requests.opened.count)
= nav_link(controller: :snippets) do
= link_to dashboard_snippets_path, title: 'Snippets' do
= icon('clipboard fw')
......
......@@ -25,14 +25,14 @@
%span
Issues
- if current_user
%span.count= Issue.opened.of_group(@group).count
%span.count= number_with_delimiter(Issue.opened.of_group(@group).count)
= nav_link(path: 'groups#merge_requests') do
= link_to merge_requests_group_path(@group), title: 'Merge Requests' do
= icon('tasks fw')
%span
Merge Requests
- if current_user
%span.count= MergeRequest.opened.of_group(@group).count
%span.count= number_with_delimiter(MergeRequest.opened.of_group(@group).count)
= nav_link(controller: [:group_members]) do
= link_to group_group_members_path(@group), title: 'Members' do
= icon('users fw')
......
......@@ -27,7 +27,7 @@
= icon('envelope-o fw')
%span
Emails
%span.count= current_user.emails.count + 1
%span.count= number_with_delimiter(current_user.emails.count + 1)
- unless current_user.ldap_user?
= nav_link(controller: :passwords) do
= link_to edit_profile_password_path, title: 'Password' do
......@@ -45,7 +45,7 @@
= icon('key fw')
%span
SSH Keys
%span.count= current_user.keys.count
%span.count= number_with_delimiter(current_user.keys.count)
= nav_link(controller: :preferences) do
= link_to profile_preferences_path, title: 'Preferences' do
-# TODO (rspeicher): Better icon?
......
......@@ -44,7 +44,7 @@
= icon('cubes fw')
%span
Builds
%span.count.builds_counter= @project.builds.running_or_pending.count(:all)
%span.count.builds_counter= number_with_delimiter(@project.builds.running_or_pending.count(:all))
- if project_nav_tab? :graphs
= nav_link(controller: %w(graphs)) do
......@@ -67,7 +67,7 @@
%span
Issues
- if @project.default_issues_tracker?
%span.count.issue_counter= @project.issues.opened.count
%span.count.issue_counter= number_with_delimiter(@project.issues.opened.count)
- if project_nav_tab? :merge_requests
= nav_link(controller: :merge_requests) do
......@@ -75,7 +75,7 @@
= icon('tasks fw')
%span
Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count
%span.count.merge_counter= number_with_delimiter(@project.merge_requests.opened.count)
- if project_nav_tab? :settings
= nav_link(controller: [:project_members, :teams]) do
......
......@@ -7,7 +7,7 @@
- if @issues.present?
.issuable-filter-count
%span.pull-right
= @issues.total_count
= number_with_delimiter(@issues.total_count)
issues for this filter
= paginate @issues, theme: "gitlab"
......@@ -7,7 +7,7 @@
- if @merge_requests.present?
.issuable-filter-count
%span.pull-right
= @merge_requests.total_count
= number_with_delimiter(@merge_requests.total_count)
merge requests for this filter
= paginate @merge_requests, theme: "gitlab"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment