Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
1c53dc28
Commit
1c53dc28
authored
Dec 02, 2015
by
Andrew Tomaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notify user if they cannot create projects
parent
d2f9a901
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
2 deletions
+26
-2
app/assets/javascripts/user.js.coffee
app/assets/javascripts/user.js.coffee
+6
-0
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+1
-1
app/controllers/profiles_controller.rb
app/controllers/profiles_controller.rb
+1
-0
app/views/dashboard/_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+3
-0
app/views/shared/_project_limit.html.haml
app/views/shared/_project_limit.html.haml
+8
-0
db/migrate/20151203162133_add_hide_project_limit_to_users.rb
db/migrate/20151203162133_add_hide_project_limit_to_users.rb
+5
-0
db/schema.rb
db/schema.rb
+2
-1
No files found.
app/assets/javascripts/user.js.coffee
View file @
1c53dc28
...
@@ -2,3 +2,9 @@ class @User
...
@@ -2,3 +2,9 @@ class @User
constructor
:
->
constructor
:
->
$
(
'.profile-groups-avatars'
).
tooltip
(
"placement"
:
"top"
)
$
(
'.profile-groups-avatars'
).
tooltip
(
"placement"
:
"top"
)
new
ProjectsList
()
new
ProjectsList
()
$
(
'.hide-project-limit-message'
).
on
'click'
,
(
e
)
->
path
=
'/'
$
.
cookie
(
'hide_project_limit_message'
,
'false'
,
{
path
:
path
})
$
(
@
).
parents
(
'.project-limit-message'
).
remove
()
e
.
preventDefault
()
app/assets/stylesheets/pages/projects.scss
View file @
1c53dc28
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
font-weight
:
normal
;
font-weight
:
normal
;
}
}
}
}
.no-ssh-key-message
{
.no-ssh-key-message
,
.project-limit-message
{
background-color
:
#f28d35
;
background-color
:
#f28d35
;
margin-bottom
:
16px
;
margin-bottom
:
16px
;
}
}
...
...
app/controllers/profiles_controller.rb
View file @
1c53dc28
...
@@ -70,6 +70,7 @@ class ProfilesController < Profiles::ApplicationController
...
@@ -70,6 +70,7 @@ class ProfilesController < Profiles::ApplicationController
:email
,
:email
,
:hide_no_password
,
:hide_no_password
,
:hide_no_ssh_key
,
:hide_no_ssh_key
,
:hide_project_limit
,
:linkedin
,
:linkedin
,
:location
,
:location
,
:name
,
:name
,
...
...
app/views/dashboard/_projects_head.html.haml
View file @
1c53dc28
=
content_for
:flash_message
do
=
render
'shared/project_limit'
%ul
.center-top-menu
%ul
.center-top-menu
=
nav_link
(
path:
[
'projects#index'
,
'root#index'
])
do
=
nav_link
(
path:
[
'projects#index'
,
'root#index'
])
do
=
link_to
dashboard_projects_path
,
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
=
link_to
dashboard_projects_path
,
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
...
...
app/views/shared/_project_limit.html.haml
0 → 100644
View file @
1c53dc28
-
if
cookies
[
:hide_project_limit_message
].
blank?
&&
!
current_user
.
hide_project_limit
&&
!
current_user
.
can_create_project?
.project-limit-message.alert.alert-warning.hidden-xs
You won't be able to create new projects because you have reached your project limit.
.pull-right
=
link_to
"Don't show again"
,
profile_path
(
user:
{
hide_project_limit:
true
}),
method: :put
,
class:
'alert-link'
|
=
link_to
'Remind later'
,
'#'
,
class:
'hide-project-limit-message alert-link'
db/migrate/20151203162133_add_hide_project_limit_to_users.rb
0 → 100644
View file @
1c53dc28
class
AddHideProjectLimitToUsers
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:hide_project_limit
,
:boolean
,
default:
false
end
end
db/schema.rb
View file @
1c53dc28
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20151
118162244
)
do
ActiveRecord
::
Schema
.
define
(
version:
20151
203162133
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
enable_extension
"plpgsql"
...
@@ -814,6 +814,7 @@ ActiveRecord::Schema.define(version: 20151118162244) do
...
@@ -814,6 +814,7 @@ ActiveRecord::Schema.define(version: 20151118162244) do
t
.
integer
"project_view"
,
default:
0
t
.
integer
"project_view"
,
default:
0
t
.
integer
"consumed_timestep"
t
.
integer
"consumed_timestep"
t
.
integer
"layout"
,
default:
0
t
.
integer
"layout"
,
default:
0
t
.
boolean
"hide_project_limit"
,
default:
false
end
end
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment