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
Jérome Perrin
gitlab-ce
Commits
57f3409b
Commit
57f3409b
authored
Mar 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move Wall to own resource
parent
f3dfd229
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
25 deletions
+39
-25
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+0
-16
app/controllers/walls_controller.rb
app/controllers/walls_controller.rb
+20
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-1
app/views/layouts/project_resource.html.haml
app/views/layouts/project_resource.html.haml
+1
-1
app/views/projects/wall.html.haml
app/views/projects/wall.html.haml
+0
-2
app/views/walls/show.html.haml
app/views/walls/show.html.haml
+11
-0
config/routes.rb
config/routes.rb
+6
-5
No files found.
app/controllers/projects_controller.rb
View file @
57f3409b
...
...
@@ -68,22 +68,6 @@ class ProjectsController < ProjectResourceController
end
end
#
# Wall
#
def
wall
return
render_404
unless
@project
.
wall_enabled
@target_type
=
:wall
@target_id
=
nil
@note
=
@project
.
notes
.
new
respond_to
do
|
format
|
format
.
html
end
end
def
destroy
return
access_denied!
unless
can?
(
current_user
,
:remove_project
,
project
)
...
...
app/controllers/walls_controller.rb
0 → 100644
View file @
57f3409b
class
WallsController
<
ProjectResourceController
before_filter
:module_enabled
respond_to
:js
,
:html
def
show
@note
=
@project
.
notes
.
new
respond_to
do
|
format
|
format
.
html
end
end
protected
def
module_enabled
return
render_404
unless
@project
.
wall_enabled
end
end
app/helpers/application_helper.rb
View file @
57f3409b
...
...
@@ -105,7 +105,7 @@ module ApplicationHelper
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Snippets"
,
url:
project_snippets_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Team"
,
url:
project_team_index_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Tree"
,
url:
project_tree_path
(
@project
,
@ref
||
@project
.
repository
.
root_ref
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Wall"
,
url:
wall_project
_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Wall"
,
url:
project_wall
_path
(
@project
)
},
{
label:
"
#{
simple_sanitize
(
@project
.
name_with_namespace
)
}
- Wiki"
,
url:
project_wikis_path
(
@project
)
},
]
end
...
...
app/views/layouts/project_resource.html.haml
View file @
57f3409b
...
...
@@ -41,7 +41,7 @@
-
if
@project
.
wall_enabled
=
nav_link
(
path:
'projects#wall'
)
do
=
link_to
'Wall'
,
wall_project
_path
(
@project
)
=
link_to
'Wall'
,
project_wall
_path
(
@project
)
-
if
@project
.
snippets_enabled
=
nav_link
(
controller: :snippets
)
do
...
...
app/views/projects/wall.html.haml
deleted
100644 → 0
View file @
f3dfd229
%div
.wall_page
=
render
"notes/reversed_notes_with_form"
app/views/walls/show.html.haml
0 → 100644
View file @
57f3409b
%div
.wall-page
%ul
.well-list.notes
.notes-busy.js-notes-busy
.js-main-target-form
=
render
"notes/form"
:javascript
$
(
function
(){
Wall
.
init
(
#{
@project
.
id
}
);
});
config/routes.rb
View file @
57f3409b
...
...
@@ -167,11 +167,6 @@ Gitlab::Application.routes.draw do
# Project Area
#
resources
:projects
,
constraints:
{
id:
/(?:[a-zA-Z.0-9_\-]+\/)?[a-zA-Z.0-9_\-]+/
},
except:
[
:new
,
:create
,
:index
],
path:
"/"
do
member
do
get
"wall"
get
"files"
end
resources
:blob
,
only:
[
:show
],
constraints:
{
id:
/.+/
}
resources
:tree
,
only:
[
:show
,
:edit
,
:update
],
constraints:
{
id:
/.+/
}
resources
:commit
,
only:
[
:show
],
constraints:
{
id:
/[[:alnum:]]{6,40}/
}
...
...
@@ -194,6 +189,12 @@ Gitlab::Application.routes.draw do
end
end
resource
:wall
,
only:
[
:show
]
do
member
do
get
'notes'
end
end
resource
:repository
do
member
do
get
"branches"
...
...
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