Commit a6dad85d2f94d4e7763eb6b0daefde5f039ece34

Authored by Dmitriy Zaporozhets
1 parent 4a14db93

Get rid of modularity gem, Styled 'nothing here' message

Gemfile
... ... @@ -31,7 +31,6 @@ gem "omniauth-ldap"
31 31 gem 'bootstrap-sass', "2.0.3.1"
32 32 gem "colored"
33 33 gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git"
34   -gem 'modularity'
35 34 gem 'resque_mailer'
36 35 gem 'chosen-rails'
37 36  
... ...
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
... ... @@ -1,4 +0,0 @@
1   -class MilestoneDecorator < ApplicationDecorator
2   - decorates :milestone
3   -
4   -end
app/models/project.rb
... ... @@ -42,6 +42,25 @@ class Project &lt; 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
... ... @@ -15,5 +15,4 @@
15 15 %hr
16 16 = paginate @issues, :theme => "gitlab"
17 17 - else
18   - %h4.padded
19   - %center Nothing to show here
  18 + %h3.nothing_here_message Nothing to show here
... ...
app/views/dashboard/merge_requests.html.haml
... ... @@ -15,5 +15,4 @@
15 15 = paginate @merge_requests, :theme => "gitlab"
16 16  
17 17 - else
18   - %h4.padded
19   - %center Nothing to show here
  18 + %h3.nothing_here_message Nothing to show here
... ...
app/views/help/web_hooks.html.haml
... ... @@ -3,5 +3,5 @@
3 3  
4 4 %p Application will send POST request with some data like example below:
5 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 12 %th
13 13 - @keys.each do |key|
14 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 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
... ...