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
c07e0377
Commit
c07e0377
authored
Nov 16, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Round out tests for time tracking component.
parent
997def72
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
267 additions
and
93 deletions
+267
-93
app/assets/javascripts/issuable_time_tracker.js.es6
app/assets/javascripts/issuable_time_tracker.js.es6
+4
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
spec/javascripts/issuable_time_tracker_spec.js.es6
spec/javascripts/issuable_time_tracker_spec.js.es6
+262
-91
No files found.
app/assets/javascripts/issuable_time_tracker.js.es6
View file @
c07e0377
...
...
@@ -125,7 +125,8 @@
</div>
<div class='title hide-collapsed'>
Time tracking
<div class='help-button pull-right' v-if='showHelp' v-on:click='toggleHelpState(true)'>
<div class='help-button pull-right' v-if='!showHelp' v-on:click='toggleHelpState(true)'>
<i class='fa fa-question-circle'></i>
</div>
</div>
<div class='time-tracking-content hide-collapsed'>
...
...
@@ -159,6 +160,7 @@
</div>
<div class='time-tracking-help-state' v-if='showHelp'>
<div class='close-help-button pull-right' v-on:click='toggleHelpState(false)'>
<i class='fa fa-close'></i>
</div>
<div class='time-tracking-info'>
<h4>Track time with slash commands</h4>
...
...
@@ -171,6 +173,7 @@
<code>/spend</code>
will update the sum of the time spent.
</p>
<a class='btn btn-default learn-more-button' href='http://example.com/time-tracking-url'> Learn more </a>
</div>
</div>
</div>
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
c07e0377
...
...
@@ -74,7 +74,7 @@
=
dropdown_tag
(
'Milestone'
,
options:
{
title:
'Assign milestone'
,
toggle_class:
'js-milestone-select js-extra-options'
,
filter:
true
,
dropdown_class:
'dropdown-menu-selectable'
,
placeholder:
'Search milestones'
,
data:
{
show_no:
true
,
field_name:
"
#{
issuable
.
to_ability_name
}
[milestone_id]"
,
project_id:
@project
.
id
,
issuable_id:
issuable
.
id
,
milestones:
namespace_project_milestones_path
(
@project
.
namespace
,
@project
,
:json
),
ability_name:
issuable
.
to_ability_name
,
issue_update:
issuable_json_path
(
issuable
),
use_id:
true
}})
// TODO: Need to add check for time_estimated - if issuable.has_attribute?(:time_estimated) once hooked up to backend
-
if
issuable
.
has_attribute?
(
:time_estimate
)
#issuable-time-tracker
.block
{
issuable:
issuable
.
to_json
()
}
#issuable-time-tracker
.block
%issuable-time-tracker
{
':time_estimate'
=>
'issuable.time_estimate'
,
':time_spent'
=>
'issuable.time_spent'
}
-
if
issuable
.
has_attribute?
(
:due_date
)
.block.due_date
...
...
spec/javascripts/issuable_time_tracker_spec.js.es6
View file @
c07e0377
This diff is collapsed.
Click to expand it.
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