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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f0b87790
Commit
f0b87790
authored
Mar 01, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make url and actions to be the same name
parent
10eb6d3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
app/assets/javascripts/user_tabs.js.coffee
app/assets/javascripts/user_tabs.js.coffee
+2
-2
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+2
-2
app/views/users/show.html.haml
app/views/users/show.html.haml
+3
-3
config/routes.rb
config/routes.rb
+2
-2
No files found.
app/assets/javascripts/user_tabs.js.coffee
View file @
f0b87790
class
@
UserTabs
actions
:
[
'activity'
,
'groups'
,
'contributed
_projects
'
,
'projects'
],
actions
:
[
'activity'
,
'groups'
,
'contributed'
,
'projects'
],
defaultAction
:
'activity'
,
constructor
:
(
@
opts
=
{})
->
...
...
@@ -45,7 +45,7 @@ class @UserTabs
if
action
is
'groups'
@
loadTab
(
source
,
action
)
if
action
is
'contributed
_projects
'
if
action
is
'contributed'
@
loadTab
(
source
,
action
)
if
action
is
'projects'
...
...
app/controllers/users_controller.rb
View file @
f0b87790
...
...
@@ -31,7 +31,7 @@ class UsersController < ApplicationController
end
end
def
user_
projects
def
projects
load_projects
respond_to
do
|
format
|
...
...
@@ -44,7 +44,7 @@ class UsersController < ApplicationController
end
end
def
user_contributed_projects
def
contributed
load_contributed_projects
respond_to
do
|
format
|
...
...
app/views/users/show.html.haml
View file @
f0b87790
...
...
@@ -76,8 +76,8 @@
%li
.groups-tab
=
link_to
user_groups_path
,
data:
{
target:
'div#groups'
,
action:
'groups'
,
toggle:
'tab'
}
do
Groups
%li
.contributed
_projects
-tab
=
link_to
user_contributed_projects_path
,
data:
{
target:
'div#contributed
_projects'
,
action:
'contributed_projects
'
,
toggle:
'tab'
}
do
%li
.contributed-tab
=
link_to
user_contributed_projects_path
,
data:
{
target:
'div#contributed
'
,
action:
'contributed
'
,
toggle:
'tab'
}
do
Contributed projects
%li
.projects-tab
=
link_to
user_projects_path
,
data:
{
target:
'div#projects'
,
action:
'projects'
,
toggle:
'tab'
}
do
...
...
@@ -99,7 +99,7 @@
#groups
.tab-pane
-
# This tab is always loaded via AJAX
#contributed
_projects
.tab-pane
#contributed
.tab-pane
-
# This tab is always loaded via AJAX
#projects
.tab-pane
...
...
config/routes.rb
View file @
f0b87790
...
...
@@ -335,10 +335,10 @@ Rails.application.routes.draw do
get
'u/:username/groups'
=>
'users#groups'
,
as: :user_groups
,
constraints:
{
username:
/.*/
}
get
'u/:username/projects'
=>
'users#
user_
projects'
,
as: :user_projects
,
get
'u/:username/projects'
=>
'users#projects'
,
as: :user_projects
,
constraints:
{
username:
/.*/
}
get
'u/:username/contributed
_projects'
=>
'users#user_contributed_projects
'
,
as: :user_contributed_projects
,
get
'u/:username/contributed
'
=>
'users#contributed
'
,
as: :user_contributed_projects
,
constraints:
{
username:
/.*/
}
get
'/u/:username'
=>
'users#show'
,
as: :user
,
...
...
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