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
Léo-Paul Géneau
gitlab-ce
Commits
470aa767
Commit
470aa767
authored
Nov 23, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project.code-related functionality
parent
c50ec72b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
16 deletions
+9
-16
app/models/project.rb
app/models/project.rb
+1
-1
app/views/admin/groups/index.html.haml
app/views/admin/groups/index.html.haml
+2
-2
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+2
-2
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+0
-6
app/views/dashboard/_groups.html.haml
app/views/dashboard/_groups.html.haml
+1
-1
app/views/layouts/_init_auto_complete.html.haml
app/views/layouts/_init_auto_complete.html.haml
+1
-1
app/views/layouts/project_resource.html.haml
app/views/layouts/project_resource.html.haml
+1
-1
spec/factories.rb
spec/factories.rb
+1
-2
No files found.
app/models/project.rb
View file @
470aa767
...
...
@@ -86,7 +86,7 @@ class Project < ActiveRecord::Base
def
create_by_user
(
params
,
user
)
namespace_id
=
params
.
delete
(
:namespace_id
)
namespace_id
||=
current_
user
.
namespace_id
namespace_id
||=
user
.
namespace_id
project
=
Project
.
new
params
...
...
app/views/admin/groups/index.html.haml
View file @
470aa767
...
...
@@ -14,7 +14,7 @@
%table
%thead
%th
Name
%th
Code
%th
Path
%th
Projects
%th
Edit
%th
.cred
Danger Zone!
...
...
@@ -22,7 +22,7 @@
-
@groups
.
each
do
|
group
|
%tr
%td
=
link_to
group
.
name
,
[
:admin
,
group
]
%td
=
group
.
code
%td
=
group
.
path
%td
=
group
.
projects
.
count
%td
=
link_to
'Edit'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn small"
%td
.bgred
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn small danger"
...
...
app/views/admin/groups/show.html.haml
View file @
470aa767
...
...
@@ -20,9 +20,9 @@
%tr
%td
%b
Code
:
Path
:
%td
=
@group
.
code
=
@group
.
path
%tr
%td
%b
...
...
app/views/admin/projects/show.html.haml
View file @
470aa767
...
...
@@ -26,12 +26,6 @@
Name:
%td
=
@project
.
name
%tr
%td
%b
Code:
%td
=
@project
.
code
%tr
%td
%b
...
...
app/views/dashboard/_groups.html.haml
View file @
470aa767
...
...
@@ -11,7 +11,7 @@
%ul
.unstyled
-
groups
.
each
do
|
group
|
%li
.wll
=
link_to
group_path
(
id:
group
.
code
),
class:
dom_class
(
group
)
do
=
link_to
group_path
(
id:
group
.
path
),
class:
dom_class
(
group
)
do
%strong
.group_name
=
truncate
(
group
.
name
,
length:
25
)
%span
.arrow
→
...
...
app/views/layouts/_init_auto_complete.html.haml
View file @
470aa767
:javascript
$
(
function
()
{
GitLab
.
GfmAutoComplete
.
Members
.
url
=
"
#{
"/api/v2/projects/#{@project.
code
}/members"
if
@project
}
"
;
GitLab
.
GfmAutoComplete
.
Members
.
url
=
"
#{
"/api/v2/projects/#{@project.
path
}/members"
if
@project
}
"
;
GitLab
.
GfmAutoComplete
.
Members
.
params
.
private_token
=
"
#{
current_user
.
private_token
}
"
;
GitLab
.
GfmAutoComplete
.
Emoji
.
data
=
#{
raw
emoji_autocomplete_source
}
;
...
...
app/views/layouts/project_resource.html.haml
View file @
470aa767
...
...
@@ -7,7 +7,7 @@
.container
%ul
.main_menu
=
nav_link
(
html_options:
{
class:
"home
#{
project_tab_class
}
"
})
do
=
link_to
@project
.
code
,
project_path
(
@project
),
title:
"Project"
=
link_to
@project
.
path
,
project_path
(
@project
),
title:
"Project"
-
if
@project
.
repo_exists?
-
if
can?
current_user
,
:download_code
,
@project
...
...
spec/factories.rb
View file @
470aa767
...
...
@@ -26,13 +26,12 @@ FactoryGirl.define do
factory
:project
do
sequence
(
:name
)
{
|
n
|
"project
#{
n
}
"
}
path
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
code
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
owner
end
factory
:namespace
do
sequence
(
:name
)
{
|
n
|
"group
#{
n
}
"
}
code
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
path
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
owner
factory
:group
do
...
...
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