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
cc1dd624
Commit
cc1dd624
authored
Mar 14, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyled group -> edit area. Use select2 for transfer autocomplete
parent
2f6d289f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
123 additions
and
60 deletions
+123
-60
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
+25
-0
app/assets/stylesheets/gitlab_bootstrap/common.scss
app/assets/stylesheets/gitlab_bootstrap/common.scss
+4
-0
app/assets/stylesheets/selects.scss
app/assets/stylesheets/selects.scss
+23
-5
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-0
app/views/groups/edit.html.haml
app/views/groups/edit.html.haml
+69
-53
app/views/layouts/group.html.haml
app/views/layouts/group.html.haml
+1
-2
No files found.
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
View file @
cc1dd624
...
@@ -20,6 +20,15 @@
...
@@ -20,6 +20,15 @@
background
:
#FFF
;
background
:
#FFF
;
}
}
&
.ui-box-danger
{
.title
{
@include
linear-gradient
(
#F26E5E
,
#bd362f
);
color
:
#fff
;
text-shadow
:
0
1px
1px
#900
;
font-weight
:
bold
;
}
}
img
{
max-width
:
100%
;
}
img
{
max-width
:
100%
;
}
pre
{
pre
{
...
@@ -141,4 +150,20 @@
...
@@ -141,4 +150,20 @@
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
}
}
.form-holder
{
padding-top
:
20px
;
form
{
margin-bottom
:
0
;
.form-actions
{
margin-bottom
:
0
;
}
}
}
}
.tab-pane
{
.ui-box
{
margin
:
3px
3px
25px
3px
;
}
}
}
app/assets/stylesheets/gitlab_bootstrap/common.scss
View file @
cc1dd624
...
@@ -73,3 +73,7 @@ fieldset legend { font-size: 17px; }
...
@@ -73,3 +73,7 @@ fieldset legend { font-size: 17px; }
border-bottom
:
2px
solid
$style_color
;
border-bottom
:
2px
solid
$style_color
;
}
}
}
}
.tab-content
{
overflow
:
visible
;
}
app/assets/stylesheets/selects.scss
View file @
cc1dd624
...
@@ -13,11 +13,6 @@
...
@@ -13,11 +13,6 @@
}
}
}
}
.select2-no-results
,
.select2-searching
{
padding
:
7px
;
color
:
#666
;
}
/** Branch/tag selector **/
/** Branch/tag selector **/
.project-refs-form
{
.project-refs-form
{
margin
:
0
;
margin
:
0
;
...
@@ -108,3 +103,26 @@
...
@@ -108,3 +103,26 @@
}
}
}
}
}
}
/** Select2 styling **/
.select2-container
.select2-choice
{
background
:
#f1f1f1
;
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
30
,
color-stop
(
0
.066
,
whitesmoke
)
,
to
(
#e1e1e1
));
background-image
:
-webkit-linear-gradient
(
whitesmoke
6
.6%
,
#e1e1e1
);
background-image
:
-moz-linear-gradient
(
whitesmoke
6
.6%
,
#e1e1e1
);
background-image
:
-o-linear-gradient
(
whitesmoke
6
.6%
,
#e1e1e1
);
}
.select2-container
.select2-choice
div
{
border
:
none
;
background
:
none
;
}
.select2-drop
{
padding-top
:
8px
;
}
.select2-no-results
,
.select2-searching
{
padding
:
7px
;
color
:
#666
;
}
app/controllers/groups_controller.rb
View file @
cc1dd624
...
@@ -94,6 +94,7 @@ class GroupsController < ApplicationController
...
@@ -94,6 +94,7 @@ class GroupsController < ApplicationController
if
owner_id
if
owner_id
@group
.
owner
=
User
.
find
(
owner_id
)
@group
.
owner
=
User
.
find
(
owner_id
)
@group
.
save
end
end
if
@group
.
update_attributes
(
group_params
)
if
@group
.
update_attributes
(
group_params
)
...
...
app/views/groups/edit.html.haml
View file @
cc1dd624
%h3
.page_title
Edit Group
.row
%hr
.span3
=
form_for
@group
do
|
f
|
%ul
.nav.nav-pills.nav-stacked
-
if
@group
.
errors
.
any?
%li
.active
.alert.alert-error
=
link_to
'Projects'
,
'#tab-projects'
,
'data-toggle'
=>
'tab'
%
span
=
@group
.
errors
.
full_messages
.
first
%
li
.clearfix
=
link_to
'Edit Group'
,
'#tab-edit'
,
'data-toggle'
=>
'tab'
=
f
.
label
:name
do
%li
Group name is
=
link_to
'Transfer'
,
'#tab-transfer'
,
'data-toggle'
=>
'tab'
.input
%li
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
link_to
'Remove'
,
'#tab-remove'
,
'data-toggle'
=>
'tab'
.clearfix.group-description-holder
.span9
=
f
.
label
:description
,
"Details"
.tab-content
.input
.tab-pane.active
#tab-projects
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.ui-box
%h5
.title
Projects
%ul
.well-list
-
@group
.
projects
.
each
do
|
project
|
%li
-
if
project
.
public
%i
.icon-share
-
else
%i
.icon-lock.cgreen
=
link_to
project
.
name_with_namespace
,
project
.pull-right
=
link_to
'Team'
,
project_team_index_path
(
project
),
id:
"edit_
#{
dom_id
(
project
)
}
"
,
class:
"btn btn-small"
=
link_to
'Edit'
,
edit_project_path
(
project
),
id:
"edit_
#{
dom_id
(
project
)
}
"
,
class:
"btn btn-small"
=
link_to
'Remove'
,
project
,
confirm:
"REMOVE
#{
project
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
-
if
@group
.
projects
.
blank?
%p
.nothing_here_message
This group has no projects yet
.form-actions
.tab-pane
#tab-edit
=
f
.
submit
'Save group'
,
class:
"btn btn-save"
.ui-box
%h5
.title
Edit Group
%div
.form-holder
=
form_for
@group
do
|
f
|
-
if
@group
.
errors
.
any?
.alert.alert-error
%span
=
@group
.
errors
.
full_messages
.
first
.clearfix
=
f
.
label
:name
do
Group name is
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
%hr
.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
'Save group'
,
class:
"btn btn-save"
.row
.tab-pane
#tab-transfer
.span7
.ui-box.ui-box-danger
.ui-box
%h5
.title
Transfer group
%h5
.title
Projects
.ui-box-body
%ul
.well-list
%p
-
@group
.
projects
.
each
do
|
project
|
Transferring group will cause loss of admin control over group and all child projects
%li
=
form_for
@group
do
|
f
|
-
if
project
.
public
=
users_select_tag
(
:'group[owner_id]'
)
%i
.icon-share
%hr
-
else
=
f
.
submit
'Transfer group'
,
class:
"btn btn-small btn-remove"
%i
.icon-lock.cgreen
=
link_to
project
.
name_with_namespace
,
project
.tab-pane
#tab-remove
.pull-right
.ui-box.ui-box-danger
=
link_to
'Team'
,
project_team_index_path
(
project
),
id:
"edit_
#{
dom_id
(
project
)
}
"
,
class:
"btn btn-small"
%h5
.title
Remove group
=
link_to
'Edit'
,
edit_project_path
(
project
),
id:
"edit_
#{
dom_id
(
project
)
}
"
,
class:
"btn btn-small"
.ui-box-body
=
link_to
'Remove'
,
project
,
confirm:
"REMOVE
#{
project
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
%p
-
if
@group
.
projects
.
blank?
Remove of group will cause removing all child projects and resources.
%p
.nothing_here_message
This group has no projects yet
%p
%strong
Removed group can not be restored!
.span5
=
link_to
'Remove Group'
,
@group
,
confirm:
'Removed group can not be restored! Are you sure?'
,
method: :delete
,
class:
"btn btn-remove btn-small"
.ui-box
%h5
.title
Transfer group
.padded
%p
Transferring group will cause loss of admin control over group and all child projects
=
form_for
@group
do
|
f
|
=
f
.
select
:owner_id
,
User
.
all
.
map
{
|
user
|
[
user
.
name
,
user
.
id
]
},
{},
{
class:
'chosen'
}
=
f
.
submit
'Transfer group'
,
class:
"btn btn-small"
.ui-box
%h5
.title
Remove group
.padded.bgred
%p
Remove of group will cause removing all child projects and resources
%br
Removed group can not be restored!
=
link_to
'Remove Group'
,
@group
,
confirm:
'Removed group can not be restored! Are you sure?'
,
method: :delete
,
class:
"btn btn-remove btn-small"
app/views/layouts/group.html.haml
View file @
cc1dd624
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
-
if
can?
(
current_user
,
:manage_group
,
@group
)
-
if
can?
(
current_user
,
:manage_group
,
@group
)
=
nav_link
(
path:
'groups#edit'
)
do
=
nav_link
(
path:
'groups#edit'
)
do
=
link_to
edit_group_path
(
@group
),
class:
"tab "
do
=
link_to
edit_group_path
(
@group
),
class:
"tab "
do
%i
.icon-edit
Settings
Edit Group
.content
=
yield
.content
=
yield
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