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
Tatuya Kamada
gitlab-ce
Commits
6b01196f
Commit
6b01196f
authored
Jan 27, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dashboard to resource
parent
bd3b677b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
32 deletions
+45
-32
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+2
-2
app/helpers/dashboard_helper.rb
app/helpers/dashboard_helper.rb
+2
-2
app/views/dashboard/_projects.html.haml
app/views/dashboard/_projects.html.haml
+1
-1
app/views/dashboard/issues.atom.builder
app/views/dashboard/issues.atom.builder
+3
-3
app/views/dashboard/projects.html.haml
app/views/dashboard/projects.html.haml
+22
-12
app/views/dashboard/show.atom.builder
app/views/dashboard/show.atom.builder
+0
-0
app/views/dashboard/show.html.haml
app/views/dashboard/show.html.haml
+0
-0
app/views/dashboard/show.js.haml
app/views/dashboard/show.js.haml
+0
-0
app/views/groups/issues.atom.builder
app/views/groups/issues.atom.builder
+3
-3
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+4
-4
config/routes.rb
config/routes.rb
+8
-5
No files found.
app/controllers/dashboard_controller.rb
View file @
6b01196f
...
...
@@ -2,9 +2,9 @@ class DashboardController < ApplicationController
respond_to
:html
before_filter
:load_projects
before_filter
:event_filter
,
only: :
index
before_filter
:event_filter
,
only: :
show
def
index
def
show
@groups
=
current_user
.
authorized_groups
@has_authorized_projects
=
@projects
.
count
>
0
@teams
=
current_user
.
authorized_teams
...
...
app/helpers/dashboard_helper.rb
View file @
6b01196f
...
...
@@ -9,9 +9,9 @@ module DashboardHelper
case
entity
when
'issue'
then
dashboard_issues
_path
(
options
)
issues_dashboard
_path
(
options
)
when
'merge_request'
dashboard_merge_requests
_path
(
options
)
merge_requests_dashboard
_path
(
options
)
end
end
...
...
app/views/dashboard/_projects.html.haml
View file @
6b01196f
...
...
@@ -28,4 +28,4 @@
%h3
.nothing_here_message
There are no projects here.
-
if
@projects_count
>
20
%li
.bottom
%strong
=
link_to
"show all projects"
,
dashboard_projects
_path
%strong
=
link_to
"show all projects"
,
projects_dashboard
_path
app/views/dashboard/issues.atom.builder
View file @
6b01196f
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{current_user.name} issues"
xml.link :href =>
dashboard_issues
_url(:atom, :private_token => current_user.private_token), :rel => "self", :type => "application/atom+xml"
xml.link :href =>
dashboard_issues
_url(:private_token => current_user.private_token), :rel => "alternate", :type => "text/html"
xml.id
dashboard_issues
_url(:private_token => current_user.private_token)
xml.link :href =>
issues_dashboard
_url(:atom, :private_token => current_user.private_token), :rel => "self", :type => "application/atom+xml"
xml.link :href =>
issues_dashboard
_url(:private_token => current_user.private_token), :rel => "alternate", :type => "text/html"
xml.id
issues_dashboard
_url(:private_token => current_user.private_token)
xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?
@issues.each do |issue|
...
...
app/views/dashboard/projects.html.haml
View file @
6b01196f
...
...
@@ -8,19 +8,20 @@
%i
.icon-plus
New Project
%hr
.row
.span3
%ul
.nav.nav-pills.nav-stacked
=
nav_tab
:scope
,
nil
do
=
link_to
"All"
,
dashboard_projects
_path
=
link_to
"All"
,
projects_dashboard
_path
=
nav_tab
:scope
,
'personal'
do
=
link_to
"Personal"
,
dashboard_projects
_path
(
scope:
'personal'
)
=
link_to
"Personal"
,
projects_dashboard
_path
(
scope:
'personal'
)
=
nav_tab
:scope
,
'joined'
do
=
link_to
"Joined"
,
dashboard_projects
_path
(
scope:
'joined'
)
=
link_to
"Joined"
,
projects_dashboard
_path
(
scope:
'joined'
)
.span9
=
form_tag
dashboard_projects
_path
,
method:
'get'
do
=
form_tag
projects_dashboard
_path
,
method:
'get'
do
%fieldset
.dashboard-search-filter
=
hidden_field_tag
"scope"
,
params
[
:scope
]
=
search_field_tag
"search"
,
params
[
:search
],
{
placeholder:
'Search'
,
class:
'left input-xxlarge'
}
...
...
@@ -29,16 +30,25 @@
%ul
.well-list
-
@projects
.
each
do
|
project
|
%li
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
-
if
project
.
namespace
=
project
.
namespace
.
human_name
\/
%strong
.well-title
=
truncate
(
project
.
name
,
length:
25
)
%span
.right.light
%li
.clearfix
.left
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
-
if
project
.
namespace
=
project
.
namespace
.
human_name
\/
%strong
.well-title
=
truncate
(
project
.
name
,
length:
25
)
%br
%small
.light
%strong
Last activity:
%span
=
project_last_activity
(
project
)
.right.light
-
if
project
.
owner
==
current_user
%i
.icon-wrench
-
tm
=
project
.
team
.
get_tm
(
current_user
.
id
)
-
if
tm
=
tm
.
project_access_human
-
if
@projects
.
blank?
%li
%h3
.nothing_here_message
There are no projects here.
...
...
app/views/dashboard/
index
.atom.builder
→
app/views/dashboard/
show
.atom.builder
View file @
6b01196f
File moved
app/views/dashboard/
index
.html.haml
→
app/views/dashboard/
show
.html.haml
View file @
6b01196f
File moved
app/views/dashboard/
index
.js.haml
→
app/views/dashboard/
show
.js.haml
View file @
6b01196f
File moved
app/views/groups/issues.atom.builder
View file @
6b01196f
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@user.name} issues"
xml.link :href =>
dashboard_issues
_url(:atom, :private_token => @user.private_token), :rel => "self", :type => "application/atom+xml"
xml.link :href =>
dashboard_issues
_url(:private_token => @user.private_token), :rel => "alternate", :type => "text/html"
xml.id
dashboard_issues
_url(:private_token => @user.private_token)
xml.link :href =>
issues_dashboard
_url(:atom, :private_token => @user.private_token), :rel => "self", :type => "application/atom+xml"
xml.link :href =>
issues_dashboard
_url(:private_token => @user.private_token), :rel => "alternate", :type => "text/html"
xml.id
issues_dashboard
_url(:private_token => @user.private_token)
xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?
@issues.each do |issue|
...
...
app/views/layouts/application.html.haml
View file @
6b01196f
...
...
@@ -6,17 +6,17 @@
=
render
"layouts/head_panel"
,
title:
"Dashboard"
.container
%ul
.main_menu
=
nav_link
(
path:
'dashboard#
index
'
,
html_options:
{
class:
'home'
})
do
=
nav_link
(
path:
'dashboard#
show
'
,
html_options:
{
class:
'home'
})
do
=
link_to
"Home"
,
root_path
,
title:
"Home"
=
nav_link
(
path:
'dashboard#projects'
)
do
=
link_to
dashboard_projects
_path
do
=
link_to
projects_dashboard
_path
do
Projects
=
nav_link
(
path:
'dashboard#issues'
)
do
=
link_to
dashboard_issues
_path
do
=
link_to
issues_dashboard
_path
do
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
=
link_to
dashboard_merge_requests
_path
do
=
link_to
merge_requests_dashboard
_path
do
Merge Requests
%span
.count
=
current_user
.
cared_merge_requests
.
opened
.
count
=
nav_link
(
path:
'search#show'
)
do
...
...
config/routes.rb
View file @
6b01196f
...
...
@@ -118,10 +118,13 @@ Gitlab::Application.routes.draw do
#
# Dashboard Area
#
get
"dashboard"
=>
"dashboard#index"
get
"dashboard/projects"
=>
"dashboard#projects"
get
"dashboard/issues"
=>
"dashboard#issues"
get
"dashboard/merge_requests"
=>
"dashboard#merge_requests"
resource
:dashboard
,
controller:
"dashboard"
do
member
do
get
:projects
get
:issues
get
:merge_requests
end
end
#
# Groups Area
...
...
@@ -285,5 +288,5 @@ Gitlab::Application.routes.draw do
end
end
root
to:
"dashboard#
index
"
root
to:
"dashboard#
show
"
end
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