Commit c351b8a3e53c05c73f3365cc738c9437e8774392
1 parent
7786fe7c
Exists in
master
and in
4 other branches
remove yaml_db gem, Replace team members index route with team_index
Showing
5 changed files
with
7 additions
and
12 deletions
Show diff stats
Gemfile
| @@ -32,9 +32,6 @@ gem 'gitlab-grack', '~> 1.0.0', require: 'grack' | @@ -32,9 +32,6 @@ gem 'gitlab-grack', '~> 1.0.0', require: 'grack' | ||
| 32 | # LDAP Auth | 32 | # LDAP Auth |
| 33 | gem 'gitlab_omniauth-ldap', '1.0.2', require: "omniauth-ldap" | 33 | gem 'gitlab_omniauth-ldap', '1.0.2', require: "omniauth-ldap" |
| 34 | 34 | ||
| 35 | -# Dump db to yml file. Mostly used to migrate from sqlite to mysql | ||
| 36 | -gem 'gitlab_yaml_db', '1.0.0', require: "yaml_db" | ||
| 37 | - | ||
| 38 | # Syntax highlighter | 35 | # Syntax highlighter |
| 39 | gem "gitlab-pygments.rb", '~> 0.3.2', require: 'pygments.rb' | 36 | gem "gitlab-pygments.rb", '~> 0.3.2', require: 'pygments.rb' |
| 40 | 37 |
Gemfile.lock
| @@ -181,7 +181,6 @@ GEM | @@ -181,7 +181,6 @@ GEM | ||
| 181 | omniauth (~> 1.0) | 181 | omniauth (~> 1.0) |
| 182 | pyu-ruby-sasl (~> 0.0.3.1) | 182 | pyu-ruby-sasl (~> 0.0.3.1) |
| 183 | rubyntlm (~> 0.1.1) | 183 | rubyntlm (~> 0.1.1) |
| 184 | - gitlab_yaml_db (1.0.0) | ||
| 185 | gon (4.0.2) | 184 | gon (4.0.2) |
| 186 | grape (0.3.2) | 185 | grape (0.3.2) |
| 187 | activesupport | 186 | activesupport |
| @@ -521,7 +520,6 @@ DEPENDENCIES | @@ -521,7 +520,6 @@ DEPENDENCIES | ||
| 521 | gitlab-pygments.rb (~> 0.3.2) | 520 | gitlab-pygments.rb (~> 0.3.2) |
| 522 | gitlab_meta (= 5.0) | 521 | gitlab_meta (= 5.0) |
| 523 | gitlab_omniauth-ldap (= 1.0.2) | 522 | gitlab_omniauth-ldap (= 1.0.2) |
| 524 | - gitlab_yaml_db (= 1.0.0) | ||
| 525 | gollum (~> 2.4.0)! | 523 | gollum (~> 2.4.0)! |
| 526 | gon | 524 | gon |
| 527 | grape (~> 0.3.1) | 525 | grape (~> 0.3.1) |
app/controllers/team_members_controller.rb
| @@ -52,7 +52,7 @@ class TeamMembersController < ProjectResourceController | @@ -52,7 +52,7 @@ class TeamMembersController < ProjectResourceController | ||
| 52 | status = @project.team.import(giver) | 52 | status = @project.team.import(giver) |
| 53 | notice = status ? "Succesfully imported" : "Import failed" | 53 | notice = status ? "Succesfully imported" : "Import failed" |
| 54 | 54 | ||
| 55 | - redirect_to project_team_members_path(project), notice: notice | 55 | + redirect_to project_team_index_path(project), notice: notice |
| 56 | end | 56 | end |
| 57 | 57 | ||
| 58 | protected | 58 | protected |
app/views/team_members/index.html.haml
| @@ -22,22 +22,22 @@ | @@ -22,22 +22,22 @@ | ||
| 22 | .span3 | 22 | .span3 |
| 23 | %ul.nav.nav-pills.nav-stacked | 23 | %ul.nav.nav-pills.nav-stacked |
| 24 | %li{class: ("active" if !params[:type])} | 24 | %li{class: ("active" if !params[:type])} |
| 25 | - = link_to project_team_members_path(type: nil) do | 25 | + = link_to project_team_index_path(type: nil) do |
| 26 | All | 26 | All |
| 27 | %li{class: ("active" if params[:type] == 'masters')} | 27 | %li{class: ("active" if params[:type] == 'masters')} |
| 28 | - = link_to project_team_members_path(type: 'masters') do | 28 | + = link_to project_team_index_path(type: 'masters') do |
| 29 | Masters | 29 | Masters |
| 30 | %span.pull-right= @project.users_projects.masters.count | 30 | %span.pull-right= @project.users_projects.masters.count |
| 31 | %li{class: ("active" if params[:type] == 'developers')} | 31 | %li{class: ("active" if params[:type] == 'developers')} |
| 32 | - = link_to project_team_members_path(type: 'developers') do | 32 | + = link_to project_team_index_path(type: 'developers') do |
| 33 | Developers | 33 | Developers |
| 34 | %span.pull-right= @project.users_projects.developers.count | 34 | %span.pull-right= @project.users_projects.developers.count |
| 35 | %li{class: ("active" if params[:type] == 'reporters')} | 35 | %li{class: ("active" if params[:type] == 'reporters')} |
| 36 | - = link_to project_team_members_path(type: 'reporters') do | 36 | + = link_to project_team_index_path(type: 'reporters') do |
| 37 | Reporters | 37 | Reporters |
| 38 | %span.pull-right= @project.users_projects.reporters.count | 38 | %span.pull-right= @project.users_projects.reporters.count |
| 39 | %li{class: ("active" if params[:type] == 'guests')} | 39 | %li{class: ("active" if params[:type] == 'guests')} |
| 40 | - = link_to project_team_members_path(type: 'guests') do | 40 | + = link_to project_team_index_path(type: 'guests') do |
| 41 | Guests | 41 | Guests |
| 42 | %span.pull-right= @project.users_projects.guests.count | 42 | %span.pull-right= @project.users_projects.guests.count |
| 43 | 43 |
config/routes.rb
| @@ -270,7 +270,7 @@ Gitlab::Application.routes.draw do | @@ -270,7 +270,7 @@ Gitlab::Application.routes.draw do | ||
| 270 | end | 270 | end |
| 271 | end | 271 | end |
| 272 | 272 | ||
| 273 | - resources :team_members do | 273 | + resources :team_members, except: [:index, :edit] do |
| 274 | collection do | 274 | collection do |
| 275 | 275 | ||
| 276 | # Used for import team | 276 | # Used for import team |