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
Boxiang Sun
gitlab-ce
Commits
9f45e01e
Commit
9f45e01e
authored
Feb 07, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Description to groups added
parent
135418dc
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
83 additions
and
22 deletions
+83
-22
app/assets/stylesheets/application.scss
app/assets/stylesheets/application.scss
+1
-0
app/assets/stylesheets/sections/groups.scss
app/assets/stylesheets/sections/groups.scss
+31
-0
app/models/group.rb
app/models/group.rb
+8
-7
app/models/namespace.rb
app/models/namespace.rb
+3
-2
app/views/admin/groups/edit.html.haml
app/views/admin/groups/edit.html.haml
+6
-3
app/views/admin/groups/index.html.haml
app/views/admin/groups/index.html.haml
+3
-1
app/views/admin/groups/new.html.haml
app/views/admin/groups/new.html.haml
+8
-2
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+7
-1
app/views/dashboard/_groups.html.haml
app/views/dashboard/_groups.html.haml
+6
-4
db/migrate/20130206084024_add_description_to_namsespace.rb
db/migrate/20130206084024_add_description_to_namsespace.rb
+5
-0
db/schema.rb
db/schema.rb
+5
-2
No files found.
app/assets/stylesheets/application.scss
View file @
9f45e01e
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
@import
"sections/nav.scss"
;
@import
"sections/nav.scss"
;
@import
"sections/commits.scss"
;
@import
"sections/commits.scss"
;
@import
"sections/issues.scss"
;
@import
"sections/issues.scss"
;
@import
"sections/groups.scss"
;
@import
"sections/projects.scss"
;
@import
"sections/projects.scss"
;
@import
"sections/snippets.scss"
;
@import
"sections/snippets.scss"
;
@import
"sections/votes.scss"
;
@import
"sections/votes.scss"
;
...
...
app/assets/stylesheets/sections/groups.scss
0 → 100644
View file @
9f45e01e
.projects
{
@extend
.row
;
.activities
{
}
.side
{
@extend
.right
;
.groups_box
{
>
.title
{
padding
:
2px
15px
;
}
.well-list
{
li
{
padding
:
15px
;
}
.edit
{
float
:
right
;
margin
:
0
;
}
.description
{
padding-top
:
5px
;
display
:
block
;
span
,
strong
{
font-size
:
12px
;
color
:
#666
;
}
}
}
@extend
.ui-box
;
}
}
}
app/models/group.rb
View file @
9f45e01e
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# id :integer not null, primary key
# id :integer not null, primary key
# name :string(255) not null
# name :string(255) not null
# description :string(255) not null
# path :string(255) not null
# path :string(255) not null
# owner_id :integer not null
# owner_id :integer not null
# created_at :datetime not null
# created_at :datetime not null
...
...
app/models/namespace.rb
View file @
9f45e01e
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# id :integer not null, primary key
# id :integer not null, primary key
# name :string(255) not null
# name :string(255) not null
# description :string(255) not null
# path :string(255) not null
# path :string(255) not null
# owner_id :integer not null
# owner_id :integer not null
# created_at :datetime not null
# created_at :datetime not null
...
@@ -12,7 +13,7 @@
...
@@ -12,7 +13,7 @@
#
#
class
Namespace
<
ActiveRecord
::
Base
class
Namespace
<
ActiveRecord
::
Base
attr_accessible
:name
,
:path
attr_accessible
:name
,
:
description
,
:
path
has_many
:projects
,
dependent: :destroy
has_many
:projects
,
dependent: :destroy
belongs_to
:owner
,
class_name:
"User"
belongs_to
:owner
,
class_name:
"User"
...
@@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base
...
@@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base
length:
{
within:
0
..
255
},
length:
{
within:
0
..
255
},
format:
{
with:
Gitlab
::
Regex
.
name_regex
,
format:
{
with:
Gitlab
::
Regex
.
name_regex
,
message:
"only letters, digits, spaces & '_' '-' '.' allowed."
}
message:
"only letters, digits, spaces & '_' '-' '.' allowed."
}
validates
:description
,
length:
{
within:
0
..
255
}
validates
:path
,
uniqueness:
true
,
presence:
true
,
length:
{
within:
1
..
255
},
validates
:path
,
uniqueness:
true
,
presence:
true
,
length:
{
within:
1
..
255
},
format:
{
with:
Gitlab
::
Regex
.
path_regex
,
format:
{
with:
Gitlab
::
Regex
.
path_regex
,
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
...
...
app/views/admin/groups/edit.html.haml
View file @
9f45e01e
%h3
.page_title
Rename
Group
%h3
.page_title
Edit
Group
%hr
%hr
=
form_for
[
:admin
,
@group
]
do
|
f
|
=
form_for
[
:admin
,
@group
]
do
|
f
|
-
if
@group
.
errors
.
any?
-
if
@group
.
errors
.
any?
...
@@ -10,7 +10,10 @@
...
@@ -10,7 +10,10 @@
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
.clearfix.group_description_holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.clearfix.group_name_holder
.clearfix.group_name_holder
=
f
.
label
:path
do
=
f
.
label
:path
do
...
@@ -24,5 +27,5 @@
...
@@ -24,5 +27,5 @@
%li
It will change the git path to repositories under this group.
%li
It will change the git path to repositories under this group.
.form-actions
.form-actions
=
f
.
submit
'
Rename
group'
,
class:
"btn btn-remove"
=
f
.
submit
'
Edit
group'
,
class:
"btn btn-remove"
=
link_to
'Cancel'
,
admin_groups_path
,
class:
"btn btn-cancel"
=
link_to
'Cancel'
,
admin_groups_path
,
class:
"btn btn-cancel"
app/views/admin/groups/index.html.haml
View file @
9f45e01e
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
Name
Name
%i
.icon-sort-down
%i
.icon-sort-down
%th
Path
%th
Path
%th
Description
%th
Projects
%th
Projects
%th
Owner
%th
Owner
%th
.cred
Danger Zone!
%th
.cred
Danger Zone!
...
@@ -25,11 +26,12 @@
...
@@ -25,11 +26,12 @@
%tr
%tr
%td
%td
%strong
=
link_to
group
.
name
,
[
:admin
,
group
]
%strong
=
link_to
group
.
name
,
[
:admin
,
group
]
%td
=
group
.
description
%td
=
group
.
path
%td
=
group
.
path
%td
=
group
.
projects
.
count
%td
=
group
.
projects
.
count
%td
%td
=
link_to
group
.
owner_name
,
admin_user_path
(
group
.
owner
)
=
link_to
group
.
owner_name
,
admin_user_path
(
group
.
owner
)
%td
.bgred
%td
.bgred
=
link_to
'
Rename
'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn btn-small"
=
link_to
'
Edit
'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn btn-small"
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
paginate
@groups
,
theme:
"admin"
=
paginate
@groups
,
theme:
"admin"
app/views/admin/groups/new.html.haml
View file @
9f45e01e
...
@@ -9,8 +9,14 @@
...
@@ -9,8 +9,14 @@
Group name is
Group name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
.clearfix.group_description_holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.form-actions
=
f
.
submit
'Create group'
,
class:
"btn btn-primary"
=
f
.
submit
'Create group'
,
class:
"btn btn-primary"
%hr
%hr
.padded
.padded
%ul
%ul
...
...
app/views/admin/groups/show.html.haml
View file @
9f45e01e
...
@@ -16,7 +16,13 @@
...
@@ -16,7 +16,13 @@
=
link_to
edit_admin_group_path
(
@group
),
class:
"btn btn-small pull-right"
do
=
link_to
edit_admin_group_path
(
@group
),
class:
"btn btn-small pull-right"
do
%i
.icon-edit
%i
.icon-edit
Rename
Edit
%tr
%td
%b
Description:
%td
=
@group
.
description
%tr
%tr
%td
%td
%b
%b
...
...
app/views/dashboard/_groups.html.haml
View file @
9f45e01e
.
ui-
box
.
groups_
box
%h5
.title
%h5
.title
Groups
Groups
%small
%small
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
%li
%li
=
link_to
group_path
(
id:
group
.
path
),
class:
dom_class
(
group
)
do
=
link_to
group_path
(
id:
group
.
path
),
class:
dom_class
(
group
)
do
%strong
.well-title
=
truncate
(
group
.
name
,
length:
35
)
%strong
.well-title
=
truncate
(
group
.
name
,
length:
35
)
%span
.pull-righ
t.light
%span
.edi
t.light
-
if
group
.
owner
==
current_user
-
if
group
.
owner
==
current_user
%i
.icon-wrench
%i
.icon-wrench
%span
.description
%strong
=
group
.
description
db/migrate/20130206084024_add_description_to_namsespace.rb
0 → 100644
View file @
9f45e01e
class
AddDescriptionToNamsespace
<
ActiveRecord
::
Migration
def
change
add_column
:namespaces
,
:description
,
:string
,
default:
''
,
null:
false
end
end
db/schema.rb
View file @
9f45e01e
...
@@ -112,6 +112,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
...
@@ -112,6 +112,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
string
"type"
t
.
string
"type"
t
.
string
"description"
,
:default
=>
""
,
:null
=>
false
end
end
add_index
"namespaces"
,
[
"name"
],
:name
=>
"index_namespaces_on_name"
add_index
"namespaces"
,
[
"name"
],
:name
=>
"index_namespaces_on_name"
...
@@ -152,6 +153,8 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
...
@@ -152,6 +153,8 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
t
.
boolean
"wiki_enabled"
,
:default
=>
true
,
:null
=>
false
t
.
boolean
"wiki_enabled"
,
:default
=>
true
,
:null
=>
false
t
.
integer
"namespace_id"
t
.
integer
"namespace_id"
t
.
boolean
"public"
,
:default
=>
false
,
:null
=>
false
t
.
boolean
"public"
,
:default
=>
false
,
:null
=>
false
t
.
string
"issues_tracker"
,
:default
=>
"gitlab"
,
:null
=>
false
t
.
string
"issues_tracker_id"
end
end
add_index
"projects"
,
[
"creator_id"
],
:name
=>
"index_projects_on_owner_id"
add_index
"projects"
,
[
"creator_id"
],
:name
=>
"index_projects_on_owner_id"
...
...
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