Commit ee43e9248ce54761e8c8df17459d5aa5911ead89

Authored by Dmitriy Zaporozhets
1 parent d1e63c7d

Add warning if user own projet but not in team. Also show loading when merge MR

@@ -18,7 +18,7 @@ v 4.1.0 @@ -18,7 +18,7 @@ v 4.1.0
18 - added new classes Team, Repository 18 - added new classes Team, Repository
19 - Reduce amount of gitolite calls 19 - Reduce amount of gitolite calls
20 - Ability to add user in all group projects 20 - Ability to add user in all group projects
21 - - remove derecated configs 21 + - remove deprecated configs
22 - replaced Korolev font with open font 22 - replaced Korolev font with open font
23 - restyled admin/dashboard page 23 - restyled admin/dashboard page
24 - restyled admin/projects page 24 - restyled admin/projects page
app/assets/javascripts/merge_requests.js.coffee
@@ -51,6 +51,10 @@ class MergeRequest @@ -51,6 +51,10 @@ class MergeRequest
51 this.$('.nav-tabs').on 'click', 'li', (event) => 51 this.$('.nav-tabs').on 'click', 'li', (event) =>
52 this.activateTab($(event.currentTarget).data('action')) 52 this.activateTab($(event.currentTarget).data('action'))
53 53
  54 + this.$('.accept_merge_request').on 'click', ->
  55 + $('.automerge_widget.can_be_merged').hide()
  56 + $('.merge-in-progress').show()
  57 +
54 activateTab: (action) -> 58 activateTab: (action) ->
55 this.$('.nav-tabs li').removeClass 'active' 59 this.$('.nav-tabs li').removeClass 'active'
56 this.$('.tab-content').hide() 60 this.$('.tab-content').hide()
app/views/layouts/project_resource.html.haml
@@ -6,6 +6,9 @@ @@ -6,6 +6,9 @@
6 = render "layouts/head_panel", title: project_title(@project) 6 = render "layouts/head_panel", title: project_title(@project)
7 - if can?(current_user, :download_code, @project) 7 - if can?(current_user, :download_code, @project)
8 = render 'shared/no_ssh' 8 = render 'shared/no_ssh'
  9 +
  10 + - unless @project.users.include?(current_user)
  11 + = render 'shared/not_in_team'
9 .container 12 .container
10 %ul.main_menu 13 %ul.main_menu
11 = nav_link(html_options: {class: "home #{project_tab_class}"}) do 14 = nav_link(html_options: {class: "home #{project_tab_class}"}) do
app/views/shared/_not_in_team.html.haml 0 → 100644
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +%p.error_message.centered
  2 + You won't be able to use git over ssh until you join project on #{link_to 'team page', project_team_index_path(@project)}