Commit e79dffe7 authored by Scott Hampton's avatar Scott Hampton

Merge branch 'mg-remove-dynamic-js-actions' into 'master'

Remove uses of jQuery.fn.load

See merge request gitlab-org/gitlab!56454
parents a0b783de 57faecc4
- if @labels.size == 0 - if @labels.size == 0
$('.labels').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000) var emptyState = document.querySelector('.labels .nothing-here-block.hidden');
if (emptyState) emptyState.classList.remove('hidden');
...@@ -13,5 +13,6 @@ ...@@ -13,5 +13,6 @@
= render @labels = render @labels
= paginate @labels, theme: 'gitlab' = paginate @labels, theme: 'gitlab'
- else
.nothing-here-block= _('There are no labels yet') .nothing-here-block{ class: ('hidden' if @labels.present?) }
= _('There are no labels yet')
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.controls .controls
- if can_unlock?(path_lock) - if can_unlock?(path_lock)
= link_to project_path_lock_path(@project, path_lock), class: 'btn gl-button btn-default', title: _("Unlock"), method: :delete, data: { confirm: _("Are you sure you want to unlock %{path_lock_path}?") % { path_lock_path: path_lock.path }, container: 'body', qa_selector: 'unlock_button' }, remote: true do = link_to project_path_lock_path(@project, path_lock), class: 'btn gl-button btn-default remove-row', title: _("Unlock"), method: :delete, data: { confirm: _("Are you sure you want to unlock %{path_lock_path}?") % { path_lock_path: path_lock.path }, container: 'body', qa_selector: 'unlock_button' }, remote: true do
= _('Unlock') = _('Unlock')
= _("locked by %{path_lock_user_name} %{created_at}").html_safe % { path_lock_user_name: path_lock.user.name, created_at: time_ago_with_tooltip(path_lock.created_at) } = _("locked by %{path_lock_user_name} %{created_at}").html_safe % { path_lock_user_name: path_lock.user.name, created_at: time_ago_with_tooltip(path_lock.created_at) }
- unless @project.path_locks.any? - unless @project.path_locks.any?
$('.locks').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000) var emptyState = document.querySelector('.locks .nothing-here-block.hidden');
if (emptyState) emptyState.classList.remove('hidden');
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
= render @path_locks = render @path_locks
= paginate @path_locks, theme: 'gitlab' = paginate @path_locks, theme: 'gitlab'
- else
.nothing-here-block .nothing-here-block{ class: ('hidden' if @path_locks.any?) }
= _("Repository has no locks.") = _("Repository has no locks.")
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