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
Gemfile.lock
... | ... | @@ -187,7 +187,6 @@ GEM |
187 | 187 | mime-types (1.18) |
188 | 188 | modernizr (2.5.3) |
189 | 189 | sprockets (~> 2.0) |
190 | - modularity (0.6.1) | |
191 | 190 | multi_json (1.3.6) |
192 | 191 | multi_xml (0.5.1) |
193 | 192 | mysql2 (0.3.11) |
... | ... | @@ -368,7 +367,6 @@ DEPENDENCIES |
368 | 367 | letter_opener |
369 | 368 | linguist (~> 1.0.0)! |
370 | 369 | modernizr (= 2.5.3) |
371 | - modularity | |
372 | 370 | mysql2 |
373 | 371 | omniauth-ldap |
374 | 372 | pry | ... | ... |
app/assets/stylesheets/gitlab_bootstrap.scss
... | ... | @@ -403,7 +403,7 @@ form { |
403 | 403 | margin-bottom: 40px; |
404 | 404 | @include round-borders-all(4px); |
405 | 405 | @include shade; |
406 | - border-color:#ddd; | |
406 | + border-color:#CCC; | |
407 | 407 | |
408 | 408 | ul { |
409 | 409 | margin:0; |
... | ... | @@ -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 | 29 | end |
30 | 30 | |
31 | 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 | 34 | respond_to do |format| |
45 | 35 | if @project.valid? | ... | ... |
app/decorators/milestone_decorator.rb
app/models/project.rb
... | ... | @@ -42,6 +42,25 @@ class Project < ActiveRecord::Base |
42 | 42 | where("name like :query or code like :query or path like :query", :query => "%#{query}%") |
43 | 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 | 65 | # Validations |
47 | 66 | # | ... | ... |
app/views/dashboard/issues.html.haml
app/views/dashboard/merge_requests.html.haml
app/views/help/web_hooks.html.haml
app/views/keys/index.html.haml
app/views/projects/index.html.haml
... | ... | @@ -35,15 +35,15 @@ |
35 | 35 | .bottom= paginate @projects, :theme => "gitlab" |
36 | 36 | |
37 | 37 | - else |
38 | - %h3 Nothing here | |
38 | + %h3.nothing_here_message There are no projects you have access to. | |
39 | 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 | 42 | You can create up to |
43 | 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 | 45 | .link_holder |
46 | - = link_to new_project_path, :class => "" do | |
46 | + = link_to new_project_path, :class => "btn primary" do | |
47 | 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 | ... | ... |