summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-11 15:15:18 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-11 15:15:18 +0300
commit975518e2e037a33b21efe40c807b465fce3b2a68 (patch)
tree22c2f5f6b2d6eb37f544f79ca1e9c53589c65935
parentda1c546af9bc4281958a6e8cc4cf24bc531350eb (diff)
downloadgitlab-ci-975518e2e037a33b21efe40c807b465fce3b2a68.tar.gz
Show spinner when paginate GitLab projects
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/views/projects/_gitlab.html.haml21
1 files changed, 14 insertions, 7 deletions
diff --git a/app/views/projects/_gitlab.html.haml b/app/views/projects/_gitlab.html.haml
index f401f56..9ca7fdd 100644
--- a/app/views/projects/_gitlab.html.haml
+++ b/app/views/projects/_gitlab.html.haml
@@ -39,13 +39,20 @@
= hidden_field_tag :project, project.to_yaml
= submit_tag 'Add', class: 'btn btn-default btn-xs'
-%center
+%ul.pagination.gitlab-projects-pagination
- if @page > 1
- = link_to gitlab_projects_path(page: @page - 1), class: 'btn', remote: true do
- %i.icon-angle-left
- prev
+ %li
+ = link_to gitlab_projects_path(page: @page - 1), class: 'btn', remote: true do
+ %i.icon-angle-left
+ Previous
&nbsp;
- if @total_count == @per_page
- = link_to gitlab_projects_path(page: @page + 1), class: 'btn', remote: true do
- next
- %i.icon-angle-right
+ %li
+ = link_to gitlab_projects_path(page: @page + 1), class: 'btn', remote: true do
+ Next
+ %i.icon-angle-right
+
+:coffeescript
+ $('.gitlab-projects-pagination').on 'ajax:before', ->
+ $('.projects').html('<h1><i class="icon-spinner icon-loading"/></h1>')
+