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"
gem 'bootstrap-sass', "2.0.3.1"
gem "colored"
gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git"
gem 'modularity'
gem 'resque_mailer'
gem 'chosen-rails'
......
......@@ -187,7 +187,6 @@ GEM
mime-types (1.18)
modernizr (2.5.3)
sprockets (~> 2.0)
modularity (0.6.1)
multi_json (1.3.6)
multi_xml (0.5.1)
mysql2 (0.3.11)
......@@ -368,7 +367,6 @@ DEPENDENCIES
letter_opener
linguist (~> 1.0.0)!
modernizr (= 2.5.3)
modularity
mysql2
omniauth-ldap
pry
......
......@@ -403,7 +403,7 @@ form {
margin-bottom: 40px;
@include round-borders-all(4px);
@include shade;
border-color:#ddd;
border-color:#CCC;
ul {
margin:0;
......@@ -522,3 +522,8 @@ ul.breadcrumb {
}
}
.nothing_here_message {
text-align:center;
padding:20px;
color:#777;
}
......@@ -29,17 +29,7 @@ class ProjectsController < ApplicationController
end
def create
@project = Project.new(params[:project])
@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
@project = Project.create_by_user(params[:project], current_user)
respond_to do |format|
if @project.valid?
......
class MilestoneDecorator < ApplicationDecorator
decorates :milestone
end
......@@ -42,6 +42,25 @@ class Project < ActiveRecord::Base
where("name like :query or code like :query or path like :query", :query => "%#{query}%")
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
#
......
......@@ -15,5 +15,4 @@
%hr
= paginate @issues, :theme => "gitlab"
- else
%h4.padded
%center Nothing to show here
%h3.nothing_here_message Nothing to show here
......@@ -15,5 +15,4 @@
= paginate @merge_requests, :theme => "gitlab"
- else
%h4.padded
%center Nothing to show here
%h3.nothing_here_message Nothing to show here
......@@ -3,5 +3,5 @@
%p Application will send POST request with some data like example below:
%h5 Hooks request example:
.borders= render "hooks/data_ex"
= render "hooks/data_ex"
......@@ -12,3 +12,8 @@
%th
- @keys.each do |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 @@
.bottom= paginate @projects, :theme => "gitlab"
- else
%h3 Nothing here
%h3.nothing_here_message There are no projects you have access to.
%br
%h4.nothing_here_message
- if current_user.can_create_project?
.alert-message.block-message.warning
You can create up to
= 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_to new_project_path, :class => "" do
= link_to new_project_path, :class => "btn primary" do
New Project »
- else
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