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
Tatuya Kamada
gitlab-ce
Commits
5f657203
Commit
5f657203
authored
Feb 07, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Description added to temas
parent
9f45e01e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
74 additions
and
14 deletions
+74
-14
app/assets/stylesheets/application.scss
app/assets/stylesheets/application.scss
+1
-0
app/assets/stylesheets/sections/teams.scss
app/assets/stylesheets/sections/teams.scss
+31
-0
app/models/user_team.rb
app/models/user_team.rb
+2
-1
app/views/admin/teams/edit.html.haml
app/views/admin/teams/edit.html.haml
+7
-2
app/views/admin/teams/index.html.haml
app/views/admin/teams/index.html.haml
+3
-1
app/views/admin/teams/new.html.haml
app/views/admin/teams/new.html.haml
+9
-2
app/views/admin/teams/show.html.haml
app/views/admin/teams/show.html.haml
+7
-1
app/views/dashboard/_teams.html.haml
app/views/dashboard/_teams.html.haml
+9
-7
db/migrate/20130207104426_add_description_to_teams.rb
db/migrate/20130207104426_add_description_to_teams.rb
+5
-0
No files found.
app/assets/stylesheets/application.scss
View file @
5f657203
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
@import
"sections/commits.scss"
;
@import
"sections/commits.scss"
;
@import
"sections/issues.scss"
;
@import
"sections/issues.scss"
;
@import
"sections/groups.scss"
;
@import
"sections/groups.scss"
;
@import
"sections/teams.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/teams.scss
0 → 100644
View file @
5f657203
.projects
{
@extend
.row
;
.activities
{
}
.side
{
@extend
.right
;
.teams_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/user_team.rb
View file @
5f657203
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
class
UserTeam
<
ActiveRecord
::
Base
class
UserTeam
<
ActiveRecord
::
Base
attr_accessible
:name
,
:owner_id
,
:path
attr_accessible
:name
,
:
description
,
:
owner_id
,
:path
belongs_to
:owner
,
class_name:
User
belongs_to
:owner
,
class_name:
User
...
@@ -26,6 +26,7 @@ class UserTeam < ActiveRecord::Base
...
@@ -26,6 +26,7 @@ class UserTeam < 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/teams/edit.html.haml
View file @
5f657203
%h3
.page_title
Rename
Team
%h3
.page_title
Edit
Team
%hr
%hr
=
form_for
@team
,
url:
admin_team_path
(
@team
),
method: :put
do
|
f
|
=
form_for
@team
,
url:
admin_team_path
(
@team
),
method: :put
do
|
f
|
-
if
@team
.
errors
.
any?
-
if
@team
.
errors
.
any?
...
@@ -10,6 +10,11 @@
...
@@ -10,6 +10,11 @@
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Example Team"
,
class:
"xxlarge"
=
f
.
text_field
:name
,
placeholder:
"Example Team"
,
class:
"xxlarge"
.clearfix.team_description_holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.clearfix.team_name_holder
.clearfix.team_name_holder
=
f
.
label
:path
do
=
f
.
label
:path
do
%span
.cred
Team path is
%span
.cred
Team path is
...
@@ -19,5 +24,5 @@
...
@@ -19,5 +24,5 @@
%li
It will change web url for access team and team projects.
%li
It will change web url for access team and team projects.
.form-actions
.form-actions
=
f
.
submit
'
Rename
team'
,
class:
"btn btn-remove"
=
f
.
submit
'
Edit
team'
,
class:
"btn btn-remove"
=
link_to
'Cancel'
,
admin_teams_path
,
class:
"btn btn-cancel"
=
link_to
'Cancel'
,
admin_teams_path
,
class:
"btn btn-cancel"
app/views/admin/teams/index.html.haml
View file @
5f657203
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
%th
%th
Name
Name
%i
.icon-sort-down
%i
.icon-sort-down
%th
Description
%th
Path
%th
Path
%th
Projects
%th
Projects
%th
Members
%th
Members
...
@@ -26,13 +27,14 @@
...
@@ -26,13 +27,14 @@
%tr
%tr
%td
%td
%strong
=
link_to
team
.
name
,
admin_team_path
(
team
)
%strong
=
link_to
team
.
name
,
admin_team_path
(
team
)
%td
=
team
.
description
%td
=
team
.
path
%td
=
team
.
path
%td
=
team
.
projects
.
count
%td
=
team
.
projects
.
count
%td
=
team
.
members
.
count
%td
=
team
.
members
.
count
%td
%td
=
link_to
team
.
owner
.
name
,
admin_user_path
(
team
.
owner
)
=
link_to
team
.
owner
.
name
,
admin_user_path
(
team
.
owner
)
%td
.bgred
%td
.bgred
=
link_to
'
Rename
'
,
edit_admin_team_path
(
team
),
id:
"edit_
#{
dom_id
(
team
)
}
"
,
class:
"btn btn-small"
=
link_to
'
Edit
'
,
edit_admin_team_path
(
team
),
id:
"edit_
#{
dom_id
(
team
)
}
"
,
class:
"btn btn-small"
=
link_to
'Destroy'
,
admin_team_path
(
team
),
confirm:
"REMOVE
#{
team
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
link_to
'Destroy'
,
admin_team_path
(
team
),
confirm:
"REMOVE
#{
team
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
paginate
@teams
,
theme:
"admin"
=
paginate
@teams
,
theme:
"admin"
app/views/admin/teams/new.html.haml
View file @
5f657203
...
@@ -9,8 +9,15 @@
...
@@ -9,8 +9,15 @@
Team name is
Team name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
f
.
submit
'Create team'
,
class:
"btn btn-primary"
.clearfix.team_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 team'
,
class:
"btn btn-primary"
%hr
%hr
.padded
.padded
%ul
%ul
...
...
app/views/admin/teams/show.html.haml
View file @
5f657203
...
@@ -16,7 +16,13 @@
...
@@ -16,7 +16,13 @@
=
link_to
edit_admin_team_path
(
@team
),
class:
"btn btn-small pull-right"
do
=
link_to
edit_admin_team_path
(
@team
),
class:
"btn btn-small pull-right"
do
%i
.icon-edit
%i
.icon-edit
Rename
Edit
%tr
%td
%b
Description:
%td
=
@team
.
description
%tr
%tr
%td
%td
%b
%b
...
...
app/views/dashboard/_teams.html.haml
View file @
5f657203
.ui-box.teams
-
box
.ui-box.teams
_
box
%h5
.title
%h5
.title
Teams
Teams
%small
%small
...
@@ -12,9 +12,11 @@
...
@@ -12,9 +12,11 @@
%li
%li
=
link_to
team_path
(
id:
team
.
path
),
class:
dom_class
(
team
)
do
=
link_to
team_path
(
id:
team
.
path
),
class:
dom_class
(
team
)
do
%strong
.well-title
=
truncate
(
team
.
name
,
length:
35
)
%strong
.well-title
=
truncate
(
team
.
name
,
length:
35
)
%span
.pull-right.light
%span
.edit.light
-
if
team
.
owner
==
current_user
-
if
team
.
owner
==
current_user
%i
.icon-wrench
%i
.icon-wrench
-
tm
=
current_user
.
user_team_user_relationships
.
find_by_user_team_id
(
team
.
id
)
-
tm
=
current_user
.
user_team_user_relationships
.
find_by_user_team_id
(
team
.
id
)
-
if
tm
-
if
tm
=
tm
.
access_human
=
tm
.
access_human
%span
.description
%strong
=
team
.
description
db/migrate/20130207104426_add_description_to_teams.rb
0 → 100644
View file @
5f657203
class
AddDescriptionToTeams
<
ActiveRecord
::
Migration
def
change
add_column
:user_teams
,
:description
,
:string
,
default:
''
,
null:
false
end
end
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