Commit a6dad85d2f94d4e7763eb6b0daefde5f039ece34
1 parent
4a14db93
Exists in
master
and in
4 other branches
Get rid of modularity gem, Styled 'nothing here' message
Showing
11 changed files
with
41 additions
and
31 deletions
Show diff stats
Gemfile
| @@ -31,7 +31,6 @@ gem "omniauth-ldap" | @@ -31,7 +31,6 @@ gem "omniauth-ldap" | ||
| 31 | gem 'bootstrap-sass', "2.0.3.1" | 31 | gem 'bootstrap-sass', "2.0.3.1" |
| 32 | gem "colored" | 32 | gem "colored" |
| 33 | gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git" | 33 | gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git" |
| 34 | -gem 'modularity' | ||
| 35 | gem 'resque_mailer' | 34 | gem 'resque_mailer' |
| 36 | gem 'chosen-rails' | 35 | gem 'chosen-rails' |
| 37 | 36 |
Gemfile.lock
| @@ -187,7 +187,6 @@ GEM | @@ -187,7 +187,6 @@ GEM | ||
| 187 | mime-types (1.18) | 187 | mime-types (1.18) |
| 188 | modernizr (2.5.3) | 188 | modernizr (2.5.3) |
| 189 | sprockets (~> 2.0) | 189 | sprockets (~> 2.0) |
| 190 | - modularity (0.6.1) | ||
| 191 | multi_json (1.3.6) | 190 | multi_json (1.3.6) |
| 192 | multi_xml (0.5.1) | 191 | multi_xml (0.5.1) |
| 193 | mysql2 (0.3.11) | 192 | mysql2 (0.3.11) |
| @@ -368,7 +367,6 @@ DEPENDENCIES | @@ -368,7 +367,6 @@ DEPENDENCIES | ||
| 368 | letter_opener | 367 | letter_opener |
| 369 | linguist (~> 1.0.0)! | 368 | linguist (~> 1.0.0)! |
| 370 | modernizr (= 2.5.3) | 369 | modernizr (= 2.5.3) |
| 371 | - modularity | ||
| 372 | mysql2 | 370 | mysql2 |
| 373 | omniauth-ldap | 371 | omniauth-ldap |
| 374 | pry | 372 | pry |
app/assets/stylesheets/gitlab_bootstrap.scss
| @@ -403,7 +403,7 @@ form { | @@ -403,7 +403,7 @@ form { | ||
| 403 | margin-bottom: 40px; | 403 | margin-bottom: 40px; |
| 404 | @include round-borders-all(4px); | 404 | @include round-borders-all(4px); |
| 405 | @include shade; | 405 | @include shade; |
| 406 | - border-color:#ddd; | 406 | + border-color:#CCC; |
| 407 | 407 | ||
| 408 | ul { | 408 | ul { |
| 409 | margin:0; | 409 | margin:0; |
| @@ -522,3 +522,8 @@ ul.breadcrumb { | @@ -522,3 +522,8 @@ ul.breadcrumb { | ||
| 522 | } | 522 | } |
| 523 | } | 523 | } |
| 524 | 524 | ||
| 525 | +.nothing_here_message { | ||
| 526 | + text-align:center; | ||
| 527 | + padding:20px; | ||
| 528 | + color:#777; | ||
| 529 | +} |
app/controllers/projects_controller.rb
| @@ -29,17 +29,7 @@ class ProjectsController < ApplicationController | @@ -29,17 +29,7 @@ class ProjectsController < ApplicationController | ||
| 29 | end | 29 | end |
| 30 | 30 | ||
| 31 | def create | 31 | def create |
| 32 | - @project = Project.new(params[:project]) | ||
| 33 | - @project.owner = current_user | ||
| 34 | - | ||
| 35 | - Project.transaction do | ||
| 36 | - @project.save! | ||
| 37 | - @project.users_projects.create!(:project_access => UsersProject::MASTER, :user => current_user) | ||
| 38 | - | ||
| 39 | - # when project saved no team member exist so | ||
| 40 | - # project repository should be updated after first user add | ||
| 41 | - @project.update_repository | ||
| 42 | - end | 32 | + @project = Project.create_by_user(params[:project], current_user) |
| 43 | 33 | ||
| 44 | respond_to do |format| | 34 | respond_to do |format| |
| 45 | if @project.valid? | 35 | if @project.valid? |
app/decorators/milestone_decorator.rb
app/models/project.rb
| @@ -42,6 +42,25 @@ class Project < ActiveRecord::Base | @@ -42,6 +42,25 @@ class Project < ActiveRecord::Base | ||
| 42 | where("name like :query or code like :query or path like :query", :query => "%#{query}%") | 42 | where("name like :query or code like :query or path like :query", :query => "%#{query}%") |
| 43 | end | 43 | end |
| 44 | 44 | ||
| 45 | + def self.create_by_user(params, user) | ||
| 46 | + project = Project.new params | ||
| 47 | + | ||
| 48 | + Project.transaction do | ||
| 49 | + project.owner = user | ||
| 50 | + | ||
| 51 | + project.save! | ||
| 52 | + | ||
| 53 | + # Add user as project master | ||
| 54 | + project.users_projects.create!(:project_access => UsersProject::MASTER, :user => user) | ||
| 55 | + | ||
| 56 | + # when project saved no team member exist so | ||
| 57 | + # project repository should be updated after first user add | ||
| 58 | + project.update_repository | ||
| 59 | + end | ||
| 60 | + | ||
| 61 | + project | ||
| 62 | + end | ||
| 63 | + | ||
| 45 | # | 64 | # |
| 46 | # Validations | 65 | # Validations |
| 47 | # | 66 | # |
app/views/dashboard/issues.html.haml
app/views/dashboard/merge_requests.html.haml
app/views/help/web_hooks.html.haml
| @@ -3,5 +3,5 @@ | @@ -3,5 +3,5 @@ | ||
| 3 | 3 | ||
| 4 | %p Application will send POST request with some data like example below: | 4 | %p Application will send POST request with some data like example below: |
| 5 | %h5 Hooks request example: | 5 | %h5 Hooks request example: |
| 6 | -.borders= render "hooks/data_ex" | 6 | += render "hooks/data_ex" |
| 7 | 7 |
app/views/keys/index.html.haml
| @@ -12,3 +12,8 @@ | @@ -12,3 +12,8 @@ | ||
| 12 | %th | 12 | %th |
| 13 | - @keys.each do |key| | 13 | - @keys.each do |key| |
| 14 | = render(:partial => 'show', :locals => {:key => key}) | 14 | = render(:partial => 'show', :locals => {:key => key}) |
| 15 | + - if @keys.blank? | ||
| 16 | + %tr | ||
| 17 | + %td{:colspan => 3} | ||
| 18 | + %h3.nothing_here_message There are no SSH keys with access to your account. | ||
| 19 | + |
app/views/projects/index.html.haml
| @@ -35,15 +35,15 @@ | @@ -35,15 +35,15 @@ | ||
| 35 | .bottom= paginate @projects, :theme => "gitlab" | 35 | .bottom= paginate @projects, :theme => "gitlab" |
| 36 | 36 | ||
| 37 | - else | 37 | - else |
| 38 | - %h3 Nothing here | 38 | + %h3.nothing_here_message There are no projects you have access to. |
| 39 | %br | 39 | %br |
| 40 | - - if current_user.can_create_project? | ||
| 41 | - .alert-message.block-message.warning | 40 | + %h4.nothing_here_message |
| 41 | + - if current_user.can_create_project? | ||
| 42 | You can create up to | 42 | You can create up to |
| 43 | = current_user.projects_limit | 43 | = current_user.projects_limit |
| 44 | - projects. Click on link below to add a new one | 44 | + projects. Click on button below to add a new one |
| 45 | .link_holder | 45 | .link_holder |
| 46 | - = link_to new_project_path, :class => "" do | 46 | + = link_to new_project_path, :class => "btn primary" do |
| 47 | New Project » | 47 | New Project » |
| 48 | - - else | ||
| 49 | - If you will be added to project - it will be displayed here | 48 | + - else |
| 49 | + If you will be added to project - it will be displayed here |