diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 21:06:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 21:06:14 +0300 |
commit | b08279013423a66f06f5edde4e067f328fe135bd (patch) | |
tree | 47aca1a9b0655cd7861bddf31ec17d4b302fc4ea /app | |
parent | 4584eb0e07d372d6014de16ab359965475184c99 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/header.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/pages/dashboard/todos/index/todos.js | 5 | ||||
-rw-r--r-- | app/controllers/dashboard/todos_controller.rb | 4 | ||||
-rw-r--r-- | app/views/projects/issues/_issue.html.haml | 5 |
4 files changed, 11 insertions, 8 deletions
diff --git a/app/assets/javascripts/header.js b/app/assets/javascripts/header.js index 3d846310008..fdd27e08793 100644 --- a/app/assets/javascripts/header.js +++ b/app/assets/javascripts/header.js @@ -15,11 +15,10 @@ import { parseBoolean } from '~/lib/utils/common_utils'; */ export default function initTodoToggle() { $(document).on('todo:toggle', (e, count) => { - const parsedCount = parseInt(count, 10); const $todoPendingCount = $('.todos-count'); - $todoPendingCount.text(highCountTrim(parsedCount)); - $todoPendingCount.toggleClass('hidden', parsedCount === 0); + $todoPendingCount.text(highCountTrim(count)); + $todoPendingCount.toggleClass('hidden', count === 0); }); } diff --git a/app/assets/javascripts/pages/dashboard/todos/index/todos.js b/app/assets/javascripts/pages/dashboard/todos/index/todos.js index d51d411f3c6..567ff41eb4e 100644 --- a/app/assets/javascripts/pages/dashboard/todos/index/todos.js +++ b/app/assets/javascripts/pages/dashboard/todos/index/todos.js @@ -4,6 +4,7 @@ import $ from 'jquery'; import { visitUrl } from '~/lib/utils/url_utility'; import UsersSelect from '~/users_select'; import { isMetaClick } from '~/lib/utils/common_utils'; +import { addDelimiter } from '~/lib/utils/text_utility'; import { __ } from '~/locale'; import flash from '~/flash'; import axios from '~/lib/utils/axios_utils'; @@ -145,8 +146,8 @@ export default class Todos { updateBadges(data) { $(document).trigger('todo:toggle', data.count); - document.querySelector('.todos-pending .badge').innerHTML = data.count; - document.querySelector('.todos-done .badge').innerHTML = data.done_count; + document.querySelector('.todos-pending .badge').innerHTML = addDelimiter(data.count); + document.querySelector('.todos-done .badge').innerHTML = addDelimiter(data.done_count); } goToTodoUrl(e) { diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb index 7012bfcefe3..80c0a0d88a8 100644 --- a/app/controllers/dashboard/todos_controller.rb +++ b/app/controllers/dashboard/todos_controller.rb @@ -78,8 +78,8 @@ class Dashboard::TodosController < Dashboard::ApplicationController def todos_counts { - count: number_with_delimiter(current_user.todos_pending_count), - done_count: number_with_delimiter(current_user.todos_done_count) + count: current_user.todos_pending_count, + done_count: current_user.todos_done_count } end diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index de0c21e7cf6..367b8c1138e 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -43,7 +43,10 @@ .issuable-meta %ul.controls - - if issue.closed? + - if issue.moved? + %li.issuable-status + = _('CLOSED (MOVED)') + - elsif issue.closed? %li.issuable-status = _('CLOSED') - if issue.assignees.any? |