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
Boxiang Sun
gitlab-ce
Commits
85f49339
Commit
85f49339
authored
Feb 28, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve a11y in sidebar
parent
261f5a68
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
app/assets/javascripts/issuable/time_tracking/components/time_tracker.js.es6
...pts/issuable/time_tracking/components/time_tracker.js.es6
+2
-2
app/helpers/button_helper.rb
app/helpers/button_helper.rb
+1
-1
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+16
-16
No files found.
app/assets/javascripts/issuable/time_tracking/components/time_tracker.js.es6
View file @
85f49339
...
...
@@ -79,12 +79,12 @@ require('./comparison_pane');
<div class='help-button pull-right'
v-if='!showHelpState'
@click='toggleHelpState(true)'>
<i class='fa fa-question-circle'></i>
<i class='fa fa-question-circle'
aria-hidden='true'
></i>
</div>
<div class='close-help-button pull-right'
v-if='showHelpState'
@click='toggleHelpState(false)'>
<i class='fa fa-close'></i>
<i class='fa fa-close'
aria-hidden='true'
></i>
</div>
</div>
<div class='time-tracking-content hide-collapsed'>
...
...
app/helpers/button_helper.rb
View file @
85f49339
...
...
@@ -19,7 +19,7 @@ module ButtonHelper
title
=
data
[
:title
]
||
'Copy to clipboard'
data
=
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}.
merge
(
data
)
content_tag
:button
,
icon
(
'clipboard'
),
icon
(
'clipboard'
,
'aria-hidden'
:
'true'
),
class:
"btn
#{
css_class
}
"
,
data:
data
,
type: :button
,
...
...
app/helpers/issuables_helper.rb
View file @
85f49339
module
IssuablesHelper
def
sidebar_gutter_toggle_icon
sidebar_gutter_collapsed?
?
icon
(
'angle-double-left'
)
:
icon
(
'angle-double-right'
)
sidebar_gutter_collapsed?
?
icon
(
'angle-double-left'
,
{
'aria-hidden'
:
'true'
})
:
icon
(
'angle-double-right'
,
{
'aria-hidden'
:
'true'
}
)
end
def
sidebar_gutter_collapsed_class
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
85f49339
...
...
@@ -9,16 +9,16 @@
-
if
current_user
%span
.issuable-header-text.hide-collapsed.pull-left
Todo
%a
.gutter-toggle.pull-right.js-sidebar-toggle
{
role:
"button"
,
href:
"#"
,
aria:
{
label:
"Toggle sidebar"
}
}
%a
.gutter-toggle.pull-right.js-sidebar-toggle
{
role:
"button"
,
href:
"#"
,
"aria-label"
=>
"Toggle sidebar"
}
=
sidebar_gutter_toggle_icon
-
if
current_user
%button
.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo
{
type:
"button"
,
aria:
{
label:
(
todo
.
nil?
?
"Add todo"
:
"Mark done"
)
}
,
data:
{
todo_text:
"Add todo"
,
mark_text:
"Mark done"
,
issuable_id:
issuable
.
id
,
issuable_type:
issuable
.
class
.
name
.
underscore
,
url:
namespace_project_todos_path
(
@project
.
namespace
,
@project
),
delete_path:
(
dashboard_todo_path
(
todo
)
if
todo
)
}
}
%button
.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo
{
type:
"button"
,
"aria-label"
=>
(
todo
.
nil?
?
"Add todo"
:
"Mark done"
)
,
data:
{
todo_text:
"Add todo"
,
mark_text:
"Mark done"
,
issuable_id:
issuable
.
id
,
issuable_type:
issuable
.
class
.
name
.
underscore
,
url:
namespace_project_todos_path
(
@project
.
namespace
,
@project
),
delete_path:
(
dashboard_todo_path
(
todo
)
if
todo
)
}
}
%span
.js-issuable-todo-text
-
if
todo
Mark done
-
else
Add todo
=
icon
(
'spin spinner'
,
class:
'hidden js-issuable-todo-loading'
)
=
icon
(
'spin spinner'
,
class:
'hidden js-issuable-todo-loading'
,
'aria-hidden'
:
'true'
)
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
format: :json
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
.block.assignee
...
...
@@ -26,10 +26,10 @@
-
if
issuable
.
assignee
=
link_to_member
(
@project
,
issuable
.
assignee
,
size:
24
)
-
else
=
icon
(
'user'
)
=
icon
(
'user'
,
'aria-hidden'
:
'true'
)
.title.hide-collapsed
Assignee
=
icon
(
'spinner spin'
,
class:
'block-loading'
)
=
icon
(
'spinner spin'
,
class:
'block-loading'
,
'aria-hidden'
:
'true'
)
-
if
can_edit_issuable
=
link_to
'Edit'
,
'#'
,
class:
'edit-link pull-right'
.value.hide-collapsed
...
...
@@ -37,7 +37,7 @@
=
link_to_member
(
@project
,
issuable
.
assignee
,
size:
32
,
extra_class:
'bold'
)
do
-
if
issuable
.
instance_of?
(
MergeRequest
)
&&
!
issuable
.
can_be_merged_by?
(
issuable
.
assignee
)
%span
.pull-right.cannot-be-merged
{
data:
{
toggle:
'tooltip'
,
placement:
'left'
},
title:
'Not allowed to merge'
}
=
icon
(
'exclamation-triangle'
)
=
icon
(
'exclamation-triangle'
,
'aria-hidden'
:
'true'
)
%span
.username
=
issuable
.
assignee
.
to_reference
-
else
...
...
@@ -54,7 +54,7 @@
.block.milestone
.sidebar-collapsed-icon
=
icon
(
'clock-o'
)
=
icon
(
'clock-o'
,
'aria-hidden'
:
'true'
)
%span
-
if
issuable
.
milestone
%span
.has-tooltip
{
title:
milestone_remaining_days
(
issuable
.
milestone
),
data:
{
container:
'body'
,
html:
1
,
placement:
'left'
}
}
...
...
@@ -63,7 +63,7 @@
None
.title.hide-collapsed
Milestone
=
icon
(
'spinner spin'
,
class:
'block-loading'
)
=
icon
(
'spinner spin'
,
class:
'block-loading'
,
'aria-hidden'
:
'true'
)
-
if
can_edit_issuable
=
link_to
'Edit'
,
'#'
,
class:
'edit-link pull-right'
.value.hide-collapsed
...
...
@@ -81,16 +81,16 @@
// Fallback while content is loading
.title.hide-collapsed
Time tracking
=
icon
(
'spinner spin'
)
=
icon
(
'spinner spin'
,
'aria-hidden'
:
'true'
)
-
if
issuable
.
has_attribute?
(
:due_date
)
.block.due_date
.sidebar-collapsed-icon
=
icon
(
'calendar'
)
=
icon
(
'calendar'
,
'aria-hidden'
:
'true'
)
%span
.js-due-date-sidebar-value
=
issuable
.
due_date
.
try
(
:to_s
,
:medium
)
||
'None'
.title.hide-collapsed
Due date
=
icon
(
'spinner spin'
,
class:
'block-loading'
)
=
icon
(
'spinner spin'
,
class:
'block-loading'
,
'aria-hidden'
:
'true'
)
-
if
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
=
link_to
'Edit'
,
'#'
,
class:
'edit-link pull-right'
.value.hide-collapsed
...
...
@@ -110,7 +110,7 @@
.dropdown
%button
.dropdown-menu-toggle.js-due-date-select
{
type:
'button'
,
data:
{
toggle:
'dropdown'
,
field_name:
"#{issuable.to_ability_name}[due_date]"
,
ability_name:
issuable
.
to_ability_name
,
issue_update:
issuable_json_path
(
issuable
)
}
}
%span
.dropdown-toggle-text
Due date
=
icon
(
'chevron-down'
)
=
icon
(
'chevron-down'
,
'aria-hidden'
:
'true'
)
.dropdown-menu.dropdown-menu-due-date
=
dropdown_title
(
'Due date'
)
=
dropdown_content
do
...
...
@@ -120,12 +120,12 @@
-
selected_labels
=
issuable
.
labels
.block.labels
.sidebar-collapsed-icon.js-sidebar-labels-tooltip
{
title:
issuable_labels_tooltip
(
issuable
.
labels_array
),
data:
{
placement:
"left"
,
container:
"body"
}
}
=
icon
(
'tags'
)
=
icon
(
'tags'
,
'aria-hidden'
:
'true'
)
%span
=
selected_labels
.
size
.title.hide-collapsed
Labels
=
icon
(
'spinner spin'
,
class:
'block-loading'
)
=
icon
(
'spinner spin'
,
class:
'block-loading'
,
'aria-hidden'
:
'true'
)
-
if
can_edit_issuable
=
link_to
'Edit'
,
'#'
,
class:
'edit-link pull-right'
.value.issuable-show-labels.hide-collapsed
{
class:
(
"has-labels"
if
selected_labels
.
any?
)
}
...
...
@@ -141,7 +141,7 @@
%button
.dropdown-menu-toggle.js-label-select.js-multiselect.js-label-sidebar-dropdown
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
default_label:
"Labels"
,
field_name:
"#{issuable.to_ability_name}[label_names][]"
,
ability_name:
issuable
.
to_ability_name
,
show_no:
"true"
,
show_any:
"true"
,
namespace_path:
@project
.
try
(
:namespace
).
try
(
:path
),
project_path:
@project
.
try
(
:path
),
issue_update:
issuable_json_path
(
issuable
),
labels:
(
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:json
)
if
@project
)
}
}
%span
.dropdown-toggle-text
{
class:
(
"is-default"
if
selected_labels
.
empty?
)
}
=
multi_label_name
(
selected_labels
,
"Labels"
)
=
icon
(
'chevron-down'
)
=
icon
(
'chevron-down'
,
'aria-hidden'
:
'true'
)
.dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
=
render
partial:
"shared/issuable/label_page_default"
-
if
can?
current_user
,
:admin_label
,
@project
and
@project
...
...
@@ -152,7 +152,7 @@
-
subscribed
=
issuable
.
subscribed?
(
current_user
,
@project
)
.block.light.subscription
{
data:
{
url:
toggle_subscription_path
(
issuable
)
}
}
.sidebar-collapsed-icon
=
icon
(
'rss'
)
=
icon
(
'rss'
,
'aria-hidden'
:
'true'
)
%span
.issuable-header-text.hide-collapsed.pull-left
Notifications
-
subscribtion_status
=
subscribed
?
'subscribed'
:
'unsubscribed'
...
...
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