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
e96374b7
Commit
e96374b7
authored
May 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better remove project message
parent
edc2e0a6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
4 deletions
+7
-4
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+4
-0
app/helpers/user_teams_helper.rb
app/helpers/user_teams_helper.rb
+0
-1
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+1
-1
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+1
-1
app/views/projects/empty.html.haml
app/views/projects/empty.html.haml
+1
-1
No files found.
app/helpers/projects_helper.rb
View file @
e96374b7
...
@@ -44,4 +44,8 @@ module ProjectsHelper
...
@@ -44,4 +44,8 @@ module ProjectsHelper
project
.
name
project
.
name
end
end
end
end
def
remove_project_message
(
project
)
"You are going to remove
#{
project
.
name_with_namespace
}
.
\n
Removed project CANNOT be restored!
\n
Are you ABSOLUTELY sure?"
end
end
end
app/helpers/user_teams_helper.rb
View file @
e96374b7
...
@@ -22,5 +22,4 @@ module UserTeamsHelper
...
@@ -22,5 +22,4 @@ module UserTeamsHelper
def
remove_from_user_team_message
(
team
,
member
)
def
remove_from_user_team_message
(
team
,
member
)
"You are going to remove
#{
member
.
name
}
from
#{
team
.
name
}
. Are you sure?"
"You are going to remove
#{
member
.
name
}
from
#{
team
.
name
}
. Are you sure?"
end
end
end
end
app/views/admin/projects/index.html.haml
View file @
e96374b7
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
=
link_to
project
.
name_with_namespace
,
[
:admin
,
project
]
=
link_to
project
.
name_with_namespace
,
[
:admin
,
project
]
.pull-right
.pull-right
=
link_to
'Edit'
,
edit_project_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
'Destroy'
,
[
project
],
confirm:
"REMOVE
#{
project
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
link_to
'Destroy'
,
[
project
],
confirm:
remove_project_message
(
project
)
,
method: :delete
,
class:
"btn btn-small btn-remove"
-
if
@projects
.
blank?
-
if
@projects
.
blank?
%p
.nothing_here_message
0 projects matches
%p
.nothing_here_message
0 projects matches
=
paginate
@projects
,
theme:
"gitlab"
=
paginate
@projects
,
theme:
"gitlab"
app/views/projects/edit.html.haml
View file @
e96374b7
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
%p
%p
%strong
Removed project can not be restored!
%strong
Removed project can not be restored!
=
link_to
'Remove project'
,
@project
,
confirm:
'Removed project can not be restored! Are you sure?'
,
method: :delete
,
class:
"btn btn-remove btn-small"
=
link_to
'Remove project'
,
@project
,
confirm:
remove_project_message
(
@project
)
,
method: :delete
,
class:
"btn btn-remove btn-small"
-
else
-
else
%p
.nothing_here_message
Only project owner can remove a project
%p
.nothing_here_message
Only project owner can remove a project
...
...
app/views/projects/empty.html.haml
View file @
e96374b7
...
@@ -31,4 +31,4 @@
...
@@ -31,4 +31,4 @@
-
if
can?
current_user
,
:remove_project
,
@project
-
if
can?
current_user
,
:remove_project
,
@project
.prepend-top-20
.prepend-top-20
=
link_to
'Remove project'
,
@project
,
confirm:
'Are you sure?'
,
method: :delete
,
class:
"btn btn-remove pull-right"
=
link_to
'Remove project'
,
@project
,
confirm:
remove_project_message
(
@project
)
,
method: :delete
,
class:
"btn btn-remove pull-right"
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