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
8819007c
Commit
8819007c
authored
Aug 20, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
parents
eb057209
90071a08
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
184 additions
and
135 deletions
+184
-135
app/assets/stylesheets/generic/common.scss
app/assets/stylesheets/generic/common.scss
+20
-0
app/assets/stylesheets/pages/explore.scss
app/assets/stylesheets/pages/explore.scss
+8
-0
app/helpers/explore_helper.rb
app/helpers/explore_helper.rb
+1
-1
app/helpers/tab_helper.rb
app/helpers/tab_helper.rb
+8
-0
app/views/dashboard/_groups_head.html.haml
app/views/dashboard/_groups_head.html.haml
+7
-0
app/views/dashboard/_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+10
-0
app/views/dashboard/groups/index.html.haml
app/views/dashboard/groups/index.html.haml
+5
-6
app/views/dashboard/projects/starred.html.haml
app/views/dashboard/projects/starred.html.haml
+2
-0
app/views/dashboard/show.html.haml
app/views/dashboard/show.html.haml
+2
-0
app/views/explore/groups/index.html.haml
app/views/explore/groups/index.html.haml
+3
-4
app/views/explore/projects/_dropdown.html.haml
app/views/explore/projects/_dropdown.html.haml
+27
-0
app/views/explore/projects/_filter.html.haml
app/views/explore/projects/_filter.html.haml
+1
-19
app/views/explore/projects/index.html.haml
app/views/explore/projects/index.html.haml
+3
-2
app/views/explore/projects/starred.html.haml
app/views/explore/projects/starred.html.haml
+5
-2
app/views/explore/projects/trending.html.haml
app/views/explore/projects/trending.html.haml
+5
-2
app/views/layouts/explore.html.haml
app/views/layouts/explore.html.haml
+5
-2
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+4
-4
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+32
-25
app/views/layouts/nav/_explore.html.haml
app/views/layouts/nav/_explore.html.haml
+0
-18
app/views/layouts/nav/_snippets.html.haml
app/views/layouts/nav/_snippets.html.haml
+0
-12
app/views/layouts/snippets.html.haml
app/views/layouts/snippets.html.haml
+5
-2
app/views/snippets/_head.html.haml
app/views/snippets/_head.html.haml
+7
-0
app/views/snippets/current_user_index.html.haml
app/views/snippets/current_user_index.html.haml
+6
-6
app/views/snippets/index.html.haml
app/views/snippets/index.html.haml
+3
-11
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+5
-8
app/views/snippets/user_index.html.haml
app/views/snippets/user_index.html.haml
+9
-10
features/steps/shared/active_tab.rb
features/steps/shared/active_tab.rb
+1
-1
No files found.
app/assets/stylesheets/generic/common.scss
View file @
8819007c
...
@@ -373,3 +373,23 @@ table {
...
@@ -373,3 +373,23 @@ table {
border-color
:
#EEE
!
important
;
border-color
:
#EEE
!
important
;
}
}
}
}
.center-top-menu
{
border-bottom
:
1px
solid
#EEE
;
list-style
:
none
;
text-align
:
center
;
padding-bottom
:
15px
;
margin-bottom
:
15px
;
li
{
display
:
inline-block
;
a
{
padding
:
10px
;
}
&
.active
a
{
color
:
#666
;
}
}
}
app/assets/stylesheets/pages/explore.scss
View file @
8819007c
...
@@ -6,3 +6,11 @@
...
@@ -6,3 +6,11 @@
font-size
:
30px
;
font-size
:
30px
;
}
}
}
}
.explore-trending-block
{
.lead
{
line-height
:
32px
;
font-size
:
18px
;
margin-top
:
10px
;
}
}
app/helpers/explore_helper.rb
View file @
8819007c
...
@@ -10,7 +10,7 @@ module ExploreHelper
...
@@ -10,7 +10,7 @@ module ExploreHelper
options
=
exist_opts
.
merge
(
options
)
options
=
exist_opts
.
merge
(
options
)
path
=
request
.
path
path
=
explore_projects_
path
path
<<
"?
#{
options
.
to_param
}
"
path
<<
"?
#{
options
.
to_param
}
"
path
path
end
end
...
...
app/helpers/tab_helper.rb
View file @
8819007c
...
@@ -67,6 +67,14 @@ module TabHelper
...
@@ -67,6 +67,14 @@ module TabHelper
path
.
any?
do
|
single_path
|
path
.
any?
do
|
single_path
|
current_path?
(
single_path
)
current_path?
(
single_path
)
end
end
elsif
page
=
options
.
delete
(
:page
)
unless
page
.
respond_to?
(
:each
)
page
=
[
page
]
end
page
.
any?
do
|
single_page
|
current_page?
(
single_page
)
end
else
else
c
=
options
.
delete
(
:controller
)
c
=
options
.
delete
(
:controller
)
a
=
options
.
delete
(
:action
)
a
=
options
.
delete
(
:action
)
...
...
app/views/dashboard/_groups_head.html.haml
0 → 100644
View file @
8819007c
%ul
.center-top-menu
=
nav_link
(
page:
[
dashboard_groups_path
])
do
=
link_to
dashboard_groups_path
,
title:
'Your groups'
,
data:
{
placement:
'right'
}
do
Your Groups
=
nav_link
(
page:
[
explore_groups_path
])
do
=
link_to
explore_groups_path
,
title:
'Explore groups'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
Explore Groups
app/views/dashboard/_projects_head.html.haml
0 → 100644
View file @
8819007c
%ul
.center-top-menu
=
nav_link
(
path:
[
'dashboard#show'
,
'root#show'
])
do
=
link_to
dashboard_path
,
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
Your Projects
=
nav_link
(
page:
starred_dashboard_projects_path
)
do
=
link_to
starred_dashboard_projects_path
,
title:
'Starred Projects'
,
data:
{
placement:
'right'
}
do
Starred Projects
=
nav_link
(
page:
[
explore_root_path
,
trending_explore_projects_path
,
starred_explore_projects_path
,
explore_projects_path
])
do
=
link_to
explore_root_path
,
title:
'Explore'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
Explore Projects
app/views/dashboard/groups/index.html.haml
View file @
8819007c
-
page_title
"Groups"
-
page_title
"Groups"
%h3
.page-title
=
render
'dashboard/groups_head'
Group Membership
.slead
Group members have access to all group projects.
-
if
current_user
.
can_create_group?
-
if
current_user
.
can_create_group?
%span
.pull-right.hidden-xs
%span
.pull-right.hidden-xs
=
link_to
new_group_path
,
class:
"btn btn-new"
do
=
link_to
new_group_path
,
class:
"btn btn-new
btn-sm
"
do
%i
.fa.fa-plus
%i
.fa.fa-plus
New Group
New Group
%p
.light
Group members have access to all group projects.
%hr
.panel.panel-default
.panel.panel-default
.panel-heading
.panel-heading
%strong
Groups
%strong
Groups
...
...
app/views/dashboard/projects/starred.html.haml
View file @
8819007c
-
page_title
"Starred Projects"
-
page_title
"Starred Projects"
=
render
'dashboard/projects_head'
-
if
@projects
.
any?
-
if
@projects
.
any?
=
render
'shared/show_aside'
=
render
'shared/show_aside'
...
...
app/views/dashboard/show.html.haml
View file @
8819007c
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
-
if
current_user
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
dashboard_url
(
format: :atom
,
private_token:
current_user
.
private_token
),
title:
"All activity"
)
=
auto_discovery_link_tag
(
:atom
,
dashboard_url
(
format: :atom
,
private_token:
current_user
.
private_token
),
title:
"All activity"
)
=
render
'dashboard/projects_head'
-
if
@projects
.
any?
-
if
@projects
.
any?
=
render
'shared/show_aside'
=
render
'shared/show_aside'
...
...
app/views/explore/groups/index.html.haml
View file @
8819007c
-
page_title
"Groups"
-
page_title
"Groups"
.clearfix
-
if
current_user
=
render
'dashboard/groups_head'
.clearfix.append-bottom-10
.pull-left
.pull-left
=
form_tag
explore_groups_path
,
method: :get
,
class:
'form-inline form-tiny'
do
|
f
|
=
form_tag
explore_groups_path
,
method: :get
,
class:
'form-inline form-tiny'
do
|
f
|
=
hidden_field_tag
:sort
,
@sort
=
hidden_field_tag
:sort
,
@sort
...
@@ -28,15 +30,12 @@
...
@@ -28,15 +30,12 @@
=
link_to
explore_groups_path
(
sort:
sort_value_oldest_updated
)
do
=
link_to
explore_groups_path
(
sort:
sort_value_oldest_updated
)
do
=
sort_title_oldest_updated
=
sort_title_oldest_updated
%hr
%ul
.bordered-list
%ul
.bordered-list
-
@groups
.
each
do
|
group
|
-
@groups
.
each
do
|
group
|
%li
%li
.clearfix
.clearfix
%h4
%h4
=
link_to
group_path
(
id:
group
.
path
)
do
=
link_to
group_path
(
id:
group
.
path
)
do
%i
.fa.fa-users
=
group
.
name
=
group
.
name
.clearfix
.clearfix
%p
%p
...
...
app/views/explore/projects/_dropdown.html.haml
0 → 100644
View file @
8819007c
.dropdown.inline
%button
.dropdown-toggle.btn
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.light
sort:
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
elsif
current_page?
(
trending_explore_projects_path
)
||
current_page?
(
explore_root_path
)
Trending projects
-
elsif
current_page?
(
starred_explore_projects_path
)
Most stars
-
else
=
sort_title_recently_created
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
trending_explore_projects_path
do
Trending projects
=
link_to
starred_explore_projects_path
do
Most stars
=
link_to
explore_projects_filter_path
(
sort:
sort_value_recently_created
)
do
=
sort_title_recently_created
=
link_to
explore_projects_filter_path
(
sort:
sort_value_oldest_created
)
do
=
sort_title_oldest_created
=
link_to
explore_projects_filter_path
(
sort:
sort_value_recently_updated
)
do
=
sort_title_recently_updated
=
link_to
explore_projects_filter_path
(
sort:
sort_value_oldest_updated
)
do
=
sort_title_oldest_updated
app/views/explore/projects/_filter.html.haml
View file @
8819007c
...
@@ -46,22 +46,4 @@
...
@@ -46,22 +46,4 @@
=
link_to
explore_projects_filter_path
(
tag:
tag
.
name
)
do
=
link_to
explore_projects_filter_path
(
tag:
tag
.
name
)
do
%i
.fa.fa-tag
%i
.fa.fa-tag
=
tag
.
name
=
tag
.
name
=
render
'explore/projects/dropdown'
.dropdown.inline
%button
.dropdown-toggle.btn
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.light
sort:
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
else
=
sort_title_recently_created
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
explore_projects_filter_path
(
sort:
sort_value_recently_created
)
do
=
sort_title_recently_created
=
link_to
explore_projects_filter_path
(
sort:
sort_value_oldest_created
)
do
=
sort_title_oldest_created
=
link_to
explore_projects_filter_path
(
sort:
sort_value_recently_updated
)
do
=
sort_title_recently_updated
=
link_to
explore_projects_filter_path
(
sort:
sort_value_oldest_updated
)
do
=
sort_title_oldest_updated
app/views/explore/projects/index.html.haml
View file @
8819007c
-
page_title
"Projects"
-
page_title
"Projects"
-
if
current_user
=
render
'dashboard/projects_head'
.clearfix
.clearfix
=
render
'filter'
=
render
'filter'
%br
%hr
.public-projects
.public-projects
%ul
.bordered-list.top-list
%ul
.bordered-list.top-list
=
render
@projects
=
render
@projects
...
...
app/views/explore/projects/starred.html.haml
View file @
8819007c
-
page_title
"Starred Projects"
-
page_title
"Starred Projects"
-
if
current_user
=
render
'dashboard/projects_head'
.explore-trending-block
.explore-trending-block
%p
.lead
.lead
%i
.fa.fa-star
%i
.fa.fa-star
See most starred projects
See most starred projects
%hr
.pull-right
=
render
'explore/projects/dropdown'
.public-projects
.public-projects
%ul
.bordered-list
%ul
.bordered-list
=
render
@starred_projects
=
render
@starred_projects
...
...
app/views/explore/projects/trending.html.haml
View file @
8819007c
-
page_title
"Trending Projects"
-
page_title
"Trending Projects"
-
if
current_user
=
render
'dashboard/projects_head'
.explore-title
.explore-title
%h3
%h3
Explore GitLab
Explore GitLab
...
@@ -6,10 +8,11 @@
...
@@ -6,10 +8,11 @@
Discover projects and groups. Share your projects with others
Discover projects and groups. Share your projects with others
%hr
%hr
.explore-trending-block
.explore-trending-block
%p
.lead
.lead
%i
.fa.fa-comments-o
%i
.fa.fa-comments-o
See most discussed projects for last month
See most discussed projects for last month
%hr
.pull-right
=
render
'explore/projects/dropdown'
.public-projects
.public-projects
%ul
.bordered-list
%ul
.bordered-list
=
render
@trending_projects
=
render
@trending_projects
app/views/layouts/explore.html.haml
View file @
8819007c
-
page_title
"Explore"
-
page_title
"Explore"
-
header_title
"Explore GitLab"
,
explore_root_path
-
if
current_user
-
sidebar
"explore"
-
header_title
"Dashboard"
,
root_path
-
else
-
header_title
"Explore GitLab"
,
explore_root_path
-
sidebar
"dashboard"
=
render
template:
"layouts/application"
=
render
template:
"layouts/application"
app/views/layouts/header/_default.html.haml
View file @
8819007c
...
@@ -17,13 +17,13 @@
...
@@ -17,13 +17,13 @@
%li
.visible-sm.visible-xs
%li
.visible-sm.visible-xs
=
link_to
search_path
,
title:
'Search'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
=
link_to
search_path
,
title:
'Search'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
=
icon
(
'search'
)
=
icon
(
'search'
)
%li
.hidden-xs
-#
%li.hidden-xs
= link_to help_path, title: 'Help', data: {toggle: 'tooltip', placement: 'bottom'} do
= link_to help_path, title: 'Help', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('question-circle fw')
= icon('question-circle fw')
%li
-#
%li
= link_to explore_root_path, title: 'Explore', data: {toggle: 'tooltip', placement: 'bottom'} do
= link_to explore_root_path, title: 'Explore', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('globe fw')
= icon('globe fw')
%li
-#
%li
= link_to user_snippets_path(current_user), title: 'Your snippets', data: {toggle: 'tooltip', placement: 'bottom'} do
= link_to user_snippets_path(current_user), title: 'Your snippets', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('clipboard fw')
= icon('clipboard fw')
-
if
current_user
.
is_admin?
-
if
current_user
.
is_admin?
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
%li
.hidden-xs
%li
.hidden-xs
=
link_to
new_project_path
,
title:
'New project'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
=
link_to
new_project_path
,
title:
'New project'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
=
icon
(
'plus fw'
)
=
icon
(
'plus fw'
)
%li
-#
%li
= link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do
= link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('cog fw')
= icon('cog fw')
%li
%li
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
8819007c
%ul
.nav.nav-sidebar
%ul
.nav.nav-sidebar
=
nav_link
(
path:
[
'dashboard#show'
,
'root#show'
],
html_options:
{
class:
'home'
})
do
=
nav_link
(
path:
[
'dashboard#show'
,
'root#show'
,
'projects#trending'
,
'projects#starred'
,
'projects#index'
],
html_options:
{
class:
'home'
})
do
=
link_to
dashboard_path
,
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
=
link_to
(
current_user
?
root_path
:
explore_root_path
)
,
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
=
icon
(
'dashboard fw'
)
=
icon
(
'dashboard fw'
)
%span
%span
Your Projects
Projects
=
nav_link
(
path:
'projects#starred'
)
do
=
link_to
starred_dashboard_projects_path
,
title:
'Starred Projects'
,
data:
{
placement:
'right'
}
do
=
icon
(
'star fw'
)
%span
Starred Projects
=
nav_link
(
controller: :groups
)
do
=
nav_link
(
controller: :groups
)
do
=
link_to
dashboard_groups_path
,
title:
'Groups'
,
data:
{
placement:
'right'
}
do
=
link_to
(
current_user
?
dashboard_groups_path
:
explore_groups_path
)
,
title:
'Groups'
,
data:
{
placement:
'right'
}
do
=
icon
(
'group fw'
)
=
icon
(
'group fw'
)
%span
%span
Groups
Groups
=
nav_link
(
controller: :milestones
)
do
-
if
current_user
=
link_to
dashboard_milestones_path
,
title:
'Milestones'
,
data:
{
placement:
'right'
}
do
=
nav_link
(
controller: :milestones
)
do
=
icon
(
'clock-o fw'
)
=
link_to
dashboard_milestones_path
,
title:
'Milestones'
,
data:
{
placement:
'right'
}
do
%span
=
icon
(
'clock-o fw'
)
Milestones
%span
=
nav_link
(
path:
'dashboard#issues'
)
do
Milestones
=
link_to
assigned_issues_dashboard_path
,
title:
'Issues'
,
class:
'shortcuts-issues'
,
data:
{
placement:
'right'
}
do
=
nav_link
(
path:
'dashboard#issues'
)
do
=
icon
(
'exclamation-circle fw'
)
=
link_to
assigned_issues_dashboard_path
,
title:
'Issues'
,
class:
'shortcuts-issues'
,
data:
{
placement:
'right'
}
do
%span
=
icon
(
'exclamation-circle fw'
)
Issues
%span
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
Issues
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
=
link_to
assigned_mrs_dashboard_path
,
title:
'Merge Requests'
,
class:
'shortcuts-merge_requests'
,
data:
{
placement:
'right'
}
do
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
=
icon
(
'tasks fw'
)
=
link_to
assigned_mrs_dashboard_path
,
title:
'Merge Requests'
,
class:
'shortcuts-merge_requests'
,
data:
{
placement:
'right'
}
do
=
icon
(
'tasks fw'
)
%span
Merge Requests
%span
.count
=
current_user
.
assigned_merge_requests
.
opened
.
count
=
nav_link
(
controller: :snippets
)
do
=
link_to
(
current_user
?
user_snippets_path
(
current_user
)
:
snippets_path
),
title:
'Your snippets'
,
data:
{
placement:
'right'
}
do
=
icon
(
'dashboard fw'
)
%span
%span
Merge Requests
Snippets
%span
.count
=
current_user
.
assigned_merge_requests
.
opened
.
count
-
if
current_user
=
nav_link
(
controller: :profile
)
do
=
link_to
profile_path
,
title:
'Profile settings'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
}
do
=
icon
(
'user fw'
)
%span
Profile
=
nav_link
(
controller: :help
)
do
=
nav_link
(
controller: :help
)
do
=
link_to
help_path
,
title:
'Help'
,
data:
{
placement:
'right'
}
do
=
link_to
help_path
,
title:
'Help'
,
data:
{
placement:
'right'
}
do
=
icon
(
'question-circle fw'
)
=
icon
(
'question-circle fw'
)
...
...
app/views/layouts/nav/_explore.html.haml
deleted
100644 → 0
View file @
eb057209
%ul
.nav.nav-sidebar
=
nav_link
(
path:
'projects#trending'
)
do
=
link_to
explore_root_path
,
title:
'Trending Projects'
,
data:
{
placement:
'right'
}
do
=
icon
(
'comments fw'
)
%span
Trending Projects
=
nav_link
(
path:
'projects#starred'
)
do
=
link_to
starred_explore_projects_path
,
title:
'Most-starred Projects'
,
data:
{
placement:
'right'
}
do
=
icon
(
'star fw'
)
%span
Most-starred Projects
=
nav_link
(
path:
'projects#index'
)
do
=
link_to
explore_projects_path
,
title:
'All Projects'
,
data:
{
placement:
'right'
}
do
=
icon
(
'bookmark fw'
)
%span
All Projects
=
nav_link
(
controller: :groups
)
do
=
link_to
explore_groups_path
,
title:
'All Groups'
,
data:
{
placement:
'right'
}
do
=
icon
(
'group fw'
)
%span
All Groups
app/views/layouts/nav/_snippets.html.haml
deleted
100644 → 0
View file @
eb057209
%ul
.nav.nav-sidebar
-
if
current_user
=
nav_link
(
path:
user_snippets_path
(
current_user
),
html_options:
{
class:
'home'
})
do
=
link_to
user_snippets_path
(
current_user
),
title:
'Your snippets'
,
data:
{
placement:
'right'
}
do
=
icon
(
'dashboard fw'
)
%span
Your Snippets
=
nav_link
(
path:
snippets_path
)
do
=
link_to
snippets_path
,
title:
'Discover snippets'
,
data:
{
placement:
'right'
}
do
=
icon
(
'globe fw'
)
%span
Discover Snippets
app/views/layouts/snippets.html.haml
View file @
8819007c
-
page_title
'Snippets'
-
page_title
'Snippets'
-
header_title
'Snippets'
,
snippets_path
-
if
current_user
-
sidebar
"snippets"
-
header_title
"Dashboard"
,
root_path
-
else
-
header_title
'Snippets'
,
snippets_path
-
sidebar
"dashboard"
=
render
template:
"layouts/application"
=
render
template:
"layouts/application"
app/views/snippets/_head.html.haml
0 → 100644
View file @
8819007c
%ul
.center-top-menu
=
nav_link
(
page:
user_snippets_path
(
current_user
),
html_options:
{
class:
'home'
})
do
=
link_to
user_snippets_path
(
current_user
),
title:
'Your snippets'
,
data:
{
placement:
'right'
}
do
Your Snippets
=
nav_link
(
page:
snippets_path
)
do
=
link_to
snippets_path
,
title:
'Explore snippets'
,
data:
{
placement:
'right'
}
do
Explore Snippets
app/views/snippets/current_user_index.html.haml
View file @
8819007c
-
page_title
"Your Snippets"
-
page_title
"Your Snippets"
%h3
.page-title
=
render
'head'
Your Snippets
.pull-right
=
link_to
new_snippet_path
,
class:
"btn btn-new btn-grouped"
,
title:
"New Snippet"
do
Add new snippet
%p
.light
.slead
Share code pastes with others out of git repository
Share code pastes with others out of git repository
.pull-right
=
link_to
new_snippet_path
,
class:
"btn btn-new btn-sm"
,
title:
"New Snippet"
do
Add new snippet
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
=
nav_tab
:scope
,
nil
do
=
nav_tab
:scope
,
nil
do
=
link_to
user_snippets_path
(
@user
)
do
=
link_to
user_snippets_path
(
@user
)
do
...
...
app/views/snippets/index.html.haml
View file @
8819007c
-
page_title
"Public Snippets"
-
page_title
"Public Snippets"
%h3
.page-title
-
if
current_user
Public snippets
=
render
'head'
.pull-right
.slead
-
if
current_user
=
link_to
new_snippet_path
,
class:
"btn btn-new btn-grouped"
,
title:
"New Snippet"
do
Add new snippet
=
link_to
user_snippets_path
(
current_user
),
class:
"btn btn-grouped"
do
Your snippets
%p
.light
Public snippets created by you and other users are listed here
Public snippets created by you and other users are listed here
%hr
=
render
'snippets'
=
render
'snippets'
app/views/snippets/show.html.haml
View file @
8819007c
-
page_title
@snippet
.
title
,
"Snippets"
-
page_title
@snippet
.
title
,
"Snippets"
%h
3
.page-title
%h
4
.page-title
=
@snippet
.
title
=
@snippet
.
title
-
if
@snippet
.
private?
-
if
@snippet
.
private?
...
@@ -8,17 +8,14 @@
...
@@ -8,17 +8,14 @@
private
private
.pull-right
.pull-right
=
link_to
new_snippet_path
,
class:
"btn btn-new"
,
title:
"New Snippet"
do
=
link_to
new_snippet_path
,
class:
"btn btn-new
btn-sm
"
,
title:
"New Snippet"
do
Add new snippet
Add new snippet
%hr
.append-bottom-
2
0
.append-bottom-
10.prepend-top-1
0
.pull-right
.pull-right
=
"#
#{
@snippet
.
id
}
"
%span
.light
%span
.light
by
created
by
=
link_to
user_snippets_path
(
@snippet
.
author
)
do
=
link_to
user_snippets_path
(
@snippet
.
author
)
do
=
image_tag
avatar_icon
(
@snippet
.
author_email
),
class:
"avatar avatar-inline s16"
,
alt:
''
=
@snippet
.
author_name
=
@snippet
.
author_name
.back-link
.back-link
...
@@ -27,7 +24,7 @@
...
@@ -27,7 +24,7 @@
←
your snippets
←
your snippets
-
else
-
else
=
link_to
snippets_path
do
=
link_to
snippets_path
do
←
discover
snippets
←
explore
snippets
.file-holder
.file-holder
.file-title
.file-title
...
...
app/views/snippets/user_index.html.haml
View file @
8819007c
-
page_title
"Snippets"
,
@user
.
name
-
page_title
"Snippets"
,
@user
.
name
%h3
.page-title
=
image_tag
avatar_icon
(
@user
.
email
),
class:
"avatar s24"
=
@user
.
name
%span
\/
Snippets
-
if
current_user
=
link_to
new_snippet_path
,
class:
"btn btn-sm add_new pull-right"
,
title:
"New Snippet"
do
Add new snippet
%hr
%ol
.breadcrumb
%li
=
link_to
snippets_path
do
Snippets
%li
=
@user
.
name
.pull-right.hidden-xs
=
link_to
user_path
(
@user
)
do
#{
@user
.
name
}
profile page
=
render
'snippets'
=
render
'snippets'
features/steps/shared/active_tab.rb
View file @
8819007c
...
@@ -26,7 +26,7 @@ module SharedActiveTab
...
@@ -26,7 +26,7 @@ module SharedActiveTab
end
end
step
'the active main tab should be Home'
do
step
'the active main tab should be Home'
do
ensure_active_main_tab
(
'
Your
Projects'
)
ensure_active_main_tab
(
'Projects'
)
end
end
step
'the active main tab should be Projects'
do
step
'the active main tab should be Projects'
do
...
...
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