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
50b326a0
Commit
50b326a0
authored
Jun 18, 2018
by
Kushal Pandya
Committed by
Jarka Kadlecová
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Add todo button in Epic sidebar
parent
9e41a571
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
319 additions
and
182 deletions
+319
-182
app/assets/javascripts/sidebar/components/todo_toggle/todo.vue
...ssets/javascripts/sidebar/components/todo_toggle/todo.vue
+93
-0
app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue
...ascripts/vue_shared/components/sidebar/toggle_sidebar.vue
+7
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+1
-0
ee/app/assets/javascripts/epics/epic_show/components/epic_show_app.vue
.../javascripts/epics/epic_show/components/epic_show_app.vue
+5
-0
ee/app/assets/javascripts/epics/epic_show/epic_show_bundle.js
...pp/assets/javascripts/epics/epic_show/epic_show_bundle.js
+1
-0
ee/app/assets/javascripts/epics/sidebar/components/sidebar_app.vue
...sets/javascripts/epics/sidebar/components/sidebar_app.vue
+211
-182
ee/app/helpers/epics_helper.rb
ee/app/helpers/epics_helper.rb
+1
-0
No files found.
app/assets/javascripts/sidebar/components/todo_toggle/todo.vue
0 → 100644
View file @
50b326a0
<
script
>
import
{
__
}
from
'
~/locale
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
LoadingIcon
from
'
~/vue_shared/components/loading_icon.vue
'
;
const
MARK_TEXT
=
__
(
'
Mark todo as done
'
);
const
TODO_TEXT
=
__
(
'
Add todo
'
);
export
default
{
directives
:
{
tooltip
,
},
components
:
{
Icon
,
LoadingIcon
,
},
props
:
{
issuableId
:
{
type
:
Number
,
required
:
true
,
},
issuableType
:
{
type
:
String
,
required
:
true
,
},
isAddTodo
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
collapsed
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
data
()
{
return
{
isButtonTypeAddTodo
:
this
.
isAddTodo
,
isActionActive
:
false
,
};
},
computed
:
{
buttonClasses
()
{
return
this
.
collapsed
?
'
btn-blank btn-todo sidebar-collapsed-icon dont-change-state
'
:
'
btn btn-default btn-todo issuable-header-btn float-right
'
;
},
buttonLabel
()
{
return
this
.
isButtonTypeAddTodo
?
MARK_TEXT
:
TODO_TEXT
;
},
collapsedButtonIconClasses
()
{
return
this
.
isButtonTypeAddTodo
?
'
todo-undone
'
:
''
;
},
collapsedButtonIcon
()
{
return
this
.
isButtonTypeAddTodo
?
'
check-circle
'
:
'
plus-square
'
;
},
},
};
</
script
>
<
template
>
<button
v-tooltip
:class=
"buttonClasses"
:title=
"buttonLabel"
:aria-label=
"buttonLabel"
:data-issuable-id=
"issuableId"
:data-issuable-type=
"issuableType"
type=
"button"
data-container=
"body"
data-placement=
"left"
data-boundary=
"viewport"
>
<icon
v-if=
"collapsed"
:css-classes=
"collapsedButtonIconClasses"
:name=
"collapsedButtonIcon"
/>
<span
v-else
class=
"issuable-todo-inner"
>
{{
buttonLabel
}}
</span>
<loading-icon
v-if=
"isActionActive"
:inline=
"true"
/>
</button>
</
template
>
app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue
View file @
50b326a0
...
...
@@ -12,6 +12,11 @@ export default {
type
:
Boolean
,
required
:
true
,
},
cssClasses
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
},
computed
:
{
tooltipLabel
()
{
...
...
@@ -30,10 +35,12 @@ export default {
<button
v-tooltip
:title=
"tooltipLabel"
:class=
"cssClasses"
type=
"button"
class=
"btn btn-blank gutter-toggle btn-sidebar-action"
data-container=
"body"
data-placement=
"left"
data-boundary=
"viewport"
@
click=
"toggle"
>
<i
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
50b326a0
...
...
@@ -462,6 +462,7 @@
.todo-undone
{
color
:
$gl-link-color
;
fill
:
$gl-link-color
;
}
.author
{
...
...
ee/app/assets/javascripts/epics/epic_show/components/epic_show_app.vue
View file @
50b326a0
...
...
@@ -16,6 +16,10 @@
relatedIssuesRoot
,
},
props
:
{
epicId
:
{
type
:
Number
,
required
:
true
,
},
endpoint
:
{
type
:
String
,
required
:
true
,
...
...
@@ -170,6 +174,7 @@
/>
</div>
<epic-sidebar
:epic-id=
"epicId"
:endpoint=
"endpoint"
:editable=
"canUpdate"
:initial-start-date=
"startDate"
...
...
ee/app/assets/javascripts/epics/epic_show/epic_show_bundle.js
View file @
50b326a0
...
...
@@ -9,6 +9,7 @@ export default () => {
const
props
=
Object
.
assign
({},
initialData
,
metaData
,
el
.
dataset
);
// Convert backend casing to match frontend style guide
props
.
epicId
=
props
.
epic_id
;
props
.
startDate
=
props
.
start_date
;
props
.
endDate
=
props
.
end_date
;
...
...
ee/app/assets/javascripts/epics/sidebar/components/sidebar_app.vue
View file @
50b326a0
This diff is collapsed.
Click to expand it.
ee/app/helpers/epics_helper.rb
View file @
50b326a0
...
...
@@ -4,6 +4,7 @@ module EpicsHelper
group
=
epic
.
group
epic_meta
=
{
epic_id:
epic
.
id
,
created:
epic
.
created_at
,
author:
{
name:
author
.
name
,
...
...
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