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
ed2bcf95
Commit
ed2bcf95
authored
Dec 22, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set group path during creation
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
59bb635e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-1
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+2
-0
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+1
-1
app/views/shared/_group_form.html.haml
app/views/shared/_group_form.html.haml
+14
-4
No files found.
app/controllers/groups_controller.rb
View file @
ed2bcf95
...
...
@@ -23,7 +23,7 @@ class GroupsController < ApplicationController
def
create
@group
=
Group
.
new
(
group_params
)
@group
.
path
=
@group
.
name
.
dup
.
parameterize
if
@group
.
name
@group
.
name
=
@group
.
path
.
dup
unless
@group
.
name
if
@group
.
save
@group
.
add_owner
(
current_user
)
...
...
app/views/projects/edit.html.haml
View file @
ed2bcf95
...
...
@@ -136,6 +136,8 @@
.col-sm-9
.form-group
.input-group
.input-group-addon
#{
URI
.
join
(
root_url
,
@project
.
namespace
.
path
)
}
/
=
f
.
text_field
:path
,
class:
'form-control'
%span
.input-group-addon
.git
%ul
...
...
app/views/projects/new.html.haml
View file @
ed2bcf95
...
...
@@ -6,7 +6,7 @@
=
form_for
@project
,
html:
{
class:
'new_project form-horizontal'
}
do
|
f
|
.form-group.project-name-holder
=
f
.
label
:path
,
class:
'control-label'
do
%strong
Project
name
%strong
Project
path
.col-sm-10
.input-group
=
f
.
text_field
:path
,
placeholder:
"my-awesome-project"
,
class:
"form-control"
,
tabindex:
1
,
autofocus:
true
...
...
app/views/shared/_group_form.html.haml
View file @
ed2bcf95
-
if
@group
.
persisted?
.form-group
=
f
.
label
:name
,
class:
'control-label'
do
Group name
.col-sm-10
=
f
.
text_field
:name
,
placeholder:
'open-source'
,
class:
'form-control'
.form-group
=
f
.
label
:
name
,
class:
'control-label'
do
Group
name
=
f
.
label
:
path
,
class:
'control-label'
do
Group
path
.col-sm-10
=
f
.
text_field
:name
,
placeholder:
'Example Group'
,
class:
'form-control'
,
autofocus:
local_assigns
[
:autofocus
]
||
false
.input-group
.input-group-addon
=
root_url
=
f
.
text_field
:path
,
placeholder:
'open-source'
,
class:
'form-control'
,
autofocus:
local_assigns
[
:autofocus
]
||
false
.form-group.group-description-holder
=
f
.
label
:description
,
'Details'
,
class:
'control-label'
...
...
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