Commit a6dad85d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

parent 4a14db93
...@@ -31,7 +31,6 @@ gem "omniauth-ldap" ...@@ -31,7 +31,6 @@ gem "omniauth-ldap"
gem 'bootstrap-sass', "2.0.3.1" gem 'bootstrap-sass', "2.0.3.1"
gem "colored" gem "colored"
gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git" gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git"
gem 'modularity'
gem 'resque_mailer' gem 'resque_mailer'
gem 'chosen-rails' gem 'chosen-rails'
......
...@@ -187,7 +187,6 @@ GEM ...@@ -187,7 +187,6 @@ GEM
mime-types (1.18) mime-types (1.18)
modernizr (2.5.3) modernizr (2.5.3)
sprockets (~> 2.0) sprockets (~> 2.0)
modularity (0.6.1)
multi_json (1.3.6) multi_json (1.3.6)
multi_xml (0.5.1) multi_xml (0.5.1)
mysql2 (0.3.11) mysql2 (0.3.11)
...@@ -368,7 +367,6 @@ DEPENDENCIES ...@@ -368,7 +367,6 @@ DEPENDENCIES
letter_opener letter_opener
linguist (~> 1.0.0)! linguist (~> 1.0.0)!
modernizr (= 2.5.3) modernizr (= 2.5.3)
modularity
mysql2 mysql2
omniauth-ldap omniauth-ldap
pry pry
......
...@@ -403,7 +403,7 @@ form { ...@@ -403,7 +403,7 @@ form {
margin-bottom: 40px; margin-bottom: 40px;
@include round-borders-all(4px); @include round-borders-all(4px);
@include shade; @include shade;
border-color:#ddd; border-color:#CCC;
ul { ul {
margin:0; margin:0;
...@@ -522,3 +522,8 @@ ul.breadcrumb { ...@@ -522,3 +522,8 @@ ul.breadcrumb {
} }
} }
.nothing_here_message {
text-align:center;
padding:20px;
color:#777;
}
...@@ -29,17 +29,7 @@ class ProjectsController < ApplicationController ...@@ -29,17 +29,7 @@ class ProjectsController < ApplicationController
end end
def create def create
@project = Project.new(params[:project]) @project = Project.create_by_user(params[:project], current_user)
@project.owner = current_user
Project.transaction do
@project.save!
@project.users_projects.create!(:project_access => UsersProject::MASTER, :user => current_user)
# when project saved no team member exist so
# project repository should be updated after first user add
@project.update_repository
end
respond_to do |format| respond_to do |format|
if @project.valid? if @project.valid?
......
class MilestoneDecorator < ApplicationDecorator
decorates :milestone
end
...@@ -42,6 +42,25 @@ class Project < ActiveRecord::Base ...@@ -42,6 +42,25 @@ class Project < ActiveRecord::Base
where("name like :query or code like :query or path like :query", :query => "%#{query}%") where("name like :query or code like :query or path like :query", :query => "%#{query}%")
end end
def self.create_by_user(params, user)
project = Project.new params
Project.transaction do
project.owner = user
project.save!
# Add user as project master
project.users_projects.create!(:project_access => UsersProject::MASTER, :user => user)
# when project saved no team member exist so
# project repository should be updated after first user add
project.update_repository
end
project
end
# #
# Validations # Validations
# #
......
...@@ -15,5 +15,4 @@ ...@@ -15,5 +15,4 @@
%hr %hr
= paginate @issues, :theme => "gitlab" = paginate @issues, :theme => "gitlab"
- else - else
%h4.padded %h3.nothing_here_message Nothing to show here
%center Nothing to show here
...@@ -15,5 +15,4 @@ ...@@ -15,5 +15,4 @@
= paginate @merge_requests, :theme => "gitlab" = paginate @merge_requests, :theme => "gitlab"
- else - else
%h4.padded %h3.nothing_here_message Nothing to show here
%center Nothing to show here
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
%p Application will send POST request with some data like example below: %p Application will send POST request with some data like example below:
%h5 Hooks request example: %h5 Hooks request example:
.borders= render "hooks/data_ex" = render "hooks/data_ex"
...@@ -12,3 +12,8 @@ ...@@ -12,3 +12,8 @@
%th %th
- @keys.each do |key| - @keys.each do |key|
= render(:partial => 'show', :locals => {:key => key}) = render(:partial => 'show', :locals => {:key => key})
- if @keys.blank?
%tr
%td{:colspan => 3}
%h3.nothing_here_message There are no SSH keys with access to your account.
...@@ -35,15 +35,15 @@ ...@@ -35,15 +35,15 @@
.bottom= paginate @projects, :theme => "gitlab" .bottom= paginate @projects, :theme => "gitlab"
- else - else
%h3 Nothing here %h3.nothing_here_message There are no projects you have access to.
%br %br
%h4.nothing_here_message
- if current_user.can_create_project? - if current_user.can_create_project?
.alert-message.block-message.warning
You can create up to You can create up to
= current_user.projects_limit = current_user.projects_limit
projects. Click on link below to add a new one projects. Click on button below to add a new one
.link_holder .link_holder
= link_to new_project_path, :class => "" do = link_to new_project_path, :class => "btn primary" do
New Project » New Project »
- else - else
If you will be added to project - it will be displayed here If you will be added to project - it will be displayed here
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment