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
Léo-Paul Géneau
gitlab-ce
Commits
4ddcac8c
Commit
4ddcac8c
authored
Jun 24, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added blank state to issues
parent
ba9ef7f3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
31 deletions
+62
-31
app/assets/stylesheets/framework/blank.scss
app/assets/stylesheets/framework/blank.scss
+25
-1
app/helpers/appearances_helper.rb
app/helpers/appearances_helper.rb
+2
-2
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+31
-15
app/views/shared/icons/_issues.svg
app/views/shared/icons/_issues.svg
+0
-13
app/views/shared/icons/_issues.svg.erb
app/views/shared/icons/_issues.svg.erb
+4
-0
No files found.
app/assets/stylesheets/framework/blank.scss
View file @
4ddcac8c
.blank-state-welcome
{
text-align
:
center
;
border-bottom
:
1px
solid
$border-color
;
.blank-state-text
{
margin-bottom
:
0
;
}
}
.blank-state-welcome-title
{
margin-top
:
0
;
margin-bottom
:
5px
;
font-size
:
24px
;
font-weight
:
normal
;
}
.blank-state
{
.blank-state
{
padding-top
:
20px
;
padding-top
:
20px
;
padding-bottom
:
20px
;
padding-bottom
:
20px
;
...
@@ -6,7 +22,15 @@
...
@@ -6,7 +22,15 @@
.blank-state-no-icon
{
.blank-state-no-icon
{
padding-top
:
40px
;
padding-top
:
40px
;
padding-bottom
:
40px
;
padding-bottom
:
40px
;
}
.blank-state-icon
{
padding-bottom
:
20px
;
path
{
fill
:
#ccc
;
}
}
}
.blank-state-title
{
.blank-state-title
{
...
...
app/helpers/appearances_helper.rb
View file @
4ddcac8c
...
@@ -31,7 +31,7 @@ module AppearancesHelper
...
@@ -31,7 +31,7 @@ module AppearancesHelper
end
end
end
end
def
navbar_icon
(
icon_name
)
def
navbar_icon
(
icon_name
,
size:
16
)
render
"shared/icons/
#{
icon_name
}
.svg"
render
"shared/icons/
#{
icon_name
}
.svg"
,
size:
size
end
end
end
end
app/views/projects/issues/index.html.haml
View file @
4ddcac8c
...
@@ -6,21 +6,37 @@
...
@@ -6,21 +6,37 @@
-
if
current_user
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
namespace_project_issues_url
(
@project
.
namespace
,
@project
,
:atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
issues"
)
=
auto_discovery_link_tag
(
:atom
,
namespace_project_issues_url
(
@project
.
namespace
,
@project
,
:atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
issues"
)
%div
{
class:
container_class
}
%div
{
class:
(
container_class
)
}
.top-area
-
if
@project
.
issues
.
nil?
=
render
'shared/issuable/nav'
,
type: :issues
.top-area
.nav-controls
=
render
'shared/issuable/nav'
,
type: :issues
-
if
current_user
.nav-controls
=
link_to
namespace_project_issues_path
(
@project
.
namespace
,
@project
,
:atom
,
{
private_token:
current_user
.
private_token
}),
class:
'btn append-right-10'
do
-
if
current_user
=
icon
(
'rss'
)
=
link_to
namespace_project_issues_path
(
@project
.
namespace
,
@project
,
:atom
,
{
private_token:
current_user
.
private_token
}),
class:
'btn append-right-10'
do
%span
.icon-label
=
icon
(
'rss'
)
Subscribe
%span
.icon-label
=
render
'shared/issuable/search_form'
,
path:
namespace_project_issues_path
(
@project
.
namespace
,
@project
)
Subscribe
=
render
'shared/issuable/search_form'
,
path:
namespace_project_issues_path
(
@project
.
namespace
,
@project
)
-
if
can?
current_user
,
:create_issue
,
@project
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
assignee_id:
@issuable_finder
.
assignee
.
try
(
:id
),
milestone_id:
@issuable_finder
.
milestones
.
try
(
:first
).
try
(
:id
)
}),
class:
"btn btn-new"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
New Issue
=
render
'shared/issuable/filter'
,
type: :issues
.issues-holder
=
render
"issues"
-
else
.blank-state.blank-state-welcome
%h2
.blank-state-welcome-title
Welcome to GitLab Issues
%p
.blank-state-text
Code, test, and deploy together
.blank-state
.blank-state-icon
=
navbar_icon
(
"issues"
,
size:
50
)
%h3
.blank-state-title
You don't have any issues right now.
%p
.blank-state-text
Issues is the best way to track you project progress
-
if
can?
current_user
,
:create_issue
,
@project
-
if
can?
current_user
,
:create_issue
,
@project
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
assignee_id:
@issuable_finder
.
assignee
.
try
(
:id
),
milestone_id:
@issuable_finder
.
milestones
.
try
(
:first
).
try
(
:id
)
}),
class:
"btn btn-new"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
assignee_id:
@issuable_finder
.
assignee
.
try
(
:id
),
milestone_id:
@issuable_finder
.
milestones
.
try
(
:first
).
try
(
:id
)
}),
class:
"btn btn-new"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
New Issue
New Issue
=
render
'shared/issuable/filter'
,
type: :issues
.issues-holder
=
render
"issues"
app/views/shared/icons/_issues.svg
deleted
100644 → 0
View file @
ba9ef7f3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
<title>
Group
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Page-1"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"Group"
fill=
"#7E7C7C"
>
<path
d=
"M8,0 C3.581,0 0,3.581 0,8 C0,12.419 3.581,16 8,16 C12.419,16 16,12.419 16,8 C16,3.581 12.419,0 8,0 M8,2 C11.308,2 14,4.692 14,8 C14,11.308 11.308,14 8,14 C4.692,14 2,11.308 2,8 C2,4.692 4.692,2 8,2"
id=
"Fill-1"
></path>
<path
d=
"M7.1597,4 L8.8887,4 L8.8887,8 L7.1107,8 L7.1597,4 Z M7.1597,9.6667 L8.8887,9.6667 L8.8887,11.4447 L7.1107,11.4447 L7.1597,9.6667 Z"
id=
"Combined-Shape"
></path>
</g>
</g>
</svg>
\ No newline at end of file
app/views/shared/icons/_issues.svg.erb
0 → 100644
View file @
4ddcac8c
<svg
width=
"
<%=
size
%>
"
height=
"
<%=
size
%>
"
viewBox=
"0 0 16 16"
class=
"gitlab-icon"
>
<path
fill=
"#7E7C7C"
d=
"M8,0 C3.581,0 0,3.581 0,8 C0,12.419 3.581,16 8,16 C12.419,16 16,12.419 16,8 C16,3.581 12.419,0 8,0 M8,2 C11.308,2 14,4.692 14,8 C14,11.308 11.308,14 8,14 C4.692,14 2,11.308 2,8 C2,4.692 4.692,2 8,2"
></path>
<path
fill=
"#7E7C7C"
d=
"M7.1597,4 L8.8887,4 L8.8887,8 L7.1107,8 L7.1597,4 Z M7.1597,9.6667 L8.8887,9.6667 L8.8887,11.4447 L7.1107,11.4447 L7.1597,9.6667 Z"
></path>
</svg>
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