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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
1d857aae
Commit
1d857aae
authored
Nov 25, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project admin area - show project name with namespace
parent
ae282f63
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
app/models/project.rb
app/models/project.rb
+10
-0
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+3
-6
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+1
-1
No files found.
app/models/project.rb
View file @
1d857aae
...
@@ -259,4 +259,14 @@ class Project < ActiveRecord::Base
...
@@ -259,4 +259,14 @@ class Project < ActiveRecord::Base
save!
save!
end
end
end
end
def
name_with_namespace
@name_with_namespace
||=
begin
if
namespace
namespace
.
human_name
+
" / "
+
name
else
name
end
end
end
end
end
app/views/admin/projects/index.html.haml
View file @
1d857aae
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
=
link_to
'New Project'
,
new_project_path
,
class:
"btn small right"
=
link_to
'New Project'
,
new_project_path
,
class:
"btn small right"
%br
%br
=
form_tag
admin_projects_path
,
method: :get
,
class:
'form-inline'
do
=
form_tag
admin_projects_path
,
method: :get
,
class:
'form-inline'
do
=
select_tag
:namespace_id
,
namespaces_options
(
params
[
:namespace_id
],
:all
),
class:
"chosen xlarge"
,
include_blank:
true
=
select_tag
:namespace_id
,
namespaces_options
(
params
[
:namespace_id
],
:all
),
class:
"chosen xlarge"
,
prompt:
"Project namespace"
=
text_field_tag
:name
,
params
[
:name
],
class:
"xlarge"
=
text_field_tag
:name
,
params
[
:name
],
class:
"xlarge"
=
submit_tag
"Search"
,
class:
"btn submit primary"
=
submit_tag
"Search"
,
class:
"btn submit primary"
%table
%table
%thead
%thead
%th
Name
%th
Name
%th
P
roject
%th
P
ath
%th
Team Members
%th
Team Members
%th
Last Commit
%th
Last Commit
%th
Edit
%th
Edit
...
@@ -20,10 +20,7 @@
...
@@ -20,10 +20,7 @@
-
@projects
.
each
do
|
project
|
-
@projects
.
each
do
|
project
|
%tr
%tr
%td
%td
-
if
project
.
namespace
=
link_to
project
.
name_with_namespace
,
[
:admin
,
project
]
=
link_to
project
.
namespace
.
human_name
,
[
:admin
,
project
]
→
=
link_to
project
.
name
,
[
:admin
,
project
]
%td
%td
%span
.monospace
=
project
.
path_with_namespace
+
".git"
%span
.monospace
=
project
.
path_with_namespace
+
".git"
%td
=
project
.
users_projects
.
count
%td
=
project
.
users_projects
.
count
...
...
app/views/admin/projects/show.html.haml
View file @
1d857aae
=
render
'admin/shared/projects_head'
=
render
'admin/shared/projects_head'
%h3
.page_title
%h3
.page_title
Project:
#{
@project
.
name
}
Project:
#{
@project
.
name
_with_namespace
}
=
link_to
edit_admin_project_path
(
@project
),
class:
"btn right"
do
=
link_to
edit_admin_project_path
(
@project
),
class:
"btn right"
do
%i
.icon-edit
%i
.icon-edit
Edit
Edit
...
...
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