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
bfb5ebd6
Commit
bfb5ebd6
authored
Nov 28, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use help_page_path to generate correct time tracking docs url.
parent
28412f81
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
106 additions
and
96 deletions
+106
-96
app/assets/javascripts/issuable/time_tracking/components/collapsed_state.js.es6
.../issuable/time_tracking/components/collapsed_state.js.es6
+3
-3
app/assets/javascripts/issuable/time_tracking/components/comparison_pane.js.es6
.../issuable/time_tracking/components/comparison_pane.js.es6
+3
-3
app/assets/javascripts/issuable/time_tracking/components/estimate_only_pane.js.es6
...suable/time_tracking/components/estimate_only_pane.js.es6
+2
-2
app/assets/javascripts/issuable/time_tracking/components/help_state.js.es6
...ripts/issuable/time_tracking/components/help_state.js.es6
+3
-7
app/assets/javascripts/issuable/time_tracking/components/no_tracking_pane.js.es6
...issuable/time_tracking/components/no_tracking_pane.js.es6
+2
-2
app/assets/javascripts/issuable/time_tracking/components/spent_only_pane.js.es6
.../issuable/time_tracking/components/spent_only_pane.js.es6
+2
-2
app/assets/javascripts/issuable/time_tracking/components/time_tracker.js.es6
...pts/issuable/time_tracking/components/time_tracker.js.es6
+6
-3
app/assets/javascripts/issuable/time_tracking/time_tracking_bundle.js.es6
...cripts/issuable/time_tracking/time_tracking_bundle.js.es6
+1
-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
+75
-72
spec/support/time_tracking_shared_examples.rb
spec/support/time_tracking_shared_examples.rb
+8
-0
No files found.
app/assets/javascripts/issuable/time_tracking/components/collapsed_state.js.es6
View file @
bfb5ebd6
//= require lib/utils/pretty_time
((
app
) => {
(() => {
const PrettyTime = gl.PrettyTime;
a
pp.collapsedState = {
gl.IssuableTimeTrackingA
pp.collapsedState = {
name: 'time-tracking-collapsed-state',
props: [
'showComparisonState',
...
...
@@ -12,7 +12,7 @@
'showNoTimeTrackingState',
'timeSpentHuman',
'timeEstimateHuman',
'stopwatchSvg'
'stopwatchSvg'
,
],
methods: {
abbreviateTime(timeStr) {
...
...
app/assets/javascripts/issuable/time_tracking/components/comparison_pane.js.es6
View file @
bfb5ebd6
//= require lib/utils/pretty_time
((
app
) => {
(() => {
const PrettyTime = gl.PrettyTime;
a
pp.comparisonPane = {
gl.IssuableTimeTrackingA
pp.comparisonPane = {
name: 'time-tracking-comparison-pane',
props: [
'timeSpent',
'timeEstimate',
'timeSpentHuman',
'timeEstimateHuman'
'timeEstimateHuman'
,
],
computed: {
parsedRemaining() {
...
...
app/assets/javascripts/issuable/time_tracking/components/estimate_only_pane.js.es6
View file @
bfb5ebd6
((
app
) => {
a
pp.estimateOnlyPane = {
(() => {
gl.IssuableTimeTrackingA
pp.estimateOnlyPane = {
name: 'time-tracking-estimate-only-pane',
props: ['timeEstimateHuman'],
template: `
...
...
app/assets/javascripts/issuable/time_tracking/components/help_state.js.es6
View file @
bfb5ebd6
((
app
) => {
a
pp.helpState = {
(() => {
gl.IssuableTimeTrackingA
pp.helpState = {
name: 'time-tracking-help-state',
data() {
return {
docsUrl: '/help/workflow/time_tracking.md',
};
},
props: ['docsUrl'],
template: `
<div class='time-tracking-help-state'>
<div class='time-tracking-info'>
...
...
app/assets/javascripts/issuable/time_tracking/components/no_tracking_pane.js.es6
View file @
bfb5ebd6
((
app
) => {
a
pp.noTrackingPane = {
(() => {
gl.IssuableTimeTrackingA
pp.noTrackingPane = {
name: 'time-tracking-no-tracking-pane',
template: `
<div class='time-tracking-no-tracking-pane'>
...
...
app/assets/javascripts/issuable/time_tracking/components/spent_only_pane.js.es6
View file @
bfb5ebd6
((
app
) => {
a
pp.spentOnlyPane = {
(() => {
gl.IssuableTimeTrackingA
pp.spentOnlyPane = {
name: 'time-tracking-spent-only-pane',
props: ['timeSpentHuman'],
template: `
...
...
app/assets/javascripts/issuable/time_tracking/components/time_tracker.js.es6
View file @
bfb5ebd6
((app) => {
(() => {
const app = gl.IssuableTimeTrackingApp;
gl.IssuableTimeTracker = Vue.component('issuable-time-tracker', {
name: 'issuable-time-tracker',
props: [
...
...
@@ -6,7 +7,8 @@
'time_spent',
'human_time_estimate',
'human_time_spent',
'stopwatchSvg'
'stopwatchSvg',
'docsUrl',
],
data() {
return {
...
...
@@ -98,7 +100,8 @@
</time-tracking-comparison-pane>
<transition name='help-state-toggle'>
<time-tracking-help-state
v-if='showHelpState'>
v-if='showHelpState'
:docs-url='docsUrl'>
</time-tracking-help-state>
</transition>
</div>
...
...
app/assets/javascripts/issuable/time_tracking/time_tracking_bundle.js.es6
View file @
bfb5ebd6
...
...
@@ -4,7 +4,7 @@
//= require smart_interval
//= require subbable_resource
((
gl
) => {
(() => {
/* This Vue instance represents what will become the parent instance for the
* sidebar. It will be responsible for managing `issuable` state and propagating
* changes to sidebar components.
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
bfb5ebd6
...
...
@@ -76,7 +76,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
}})
-
if
issuable
.
has_attribute?
(
:time_estimate
)
#issuable-time-tracker
.block
%issuable-time-tracker
{
':time_estimate'
=>
'issuable.time_estimate'
,
':time_spent'
=>
'issuable.total_time_spent'
,
':human_time_estimate'
=>
'issuable.human_time_estimate'
,
':human_time_spent'
=>
'issuable.human_total_time_spent'
,
'stopwatch-svg'
=>
custom_icon
(
'icon_stopwatch'
)
}
%issuable-time-tracker
{
':time_estimate'
=>
'issuable.time_estimate'
,
':time_spent'
=>
'issuable.total_time_spent'
,
':human_time_estimate'
=>
'issuable.human_time_estimate'
,
':human_time_spent'
=>
'issuable.human_total_time_spent'
,
'stopwatch-svg'
=>
custom_icon
(
'icon_stopwatch'
)
,
'docs-url'
=>
help_page_path
(
'workflow/time_tracking.md'
)
}
// Fallback while content is loading
.title.hide-collapsed
Time tracking
...
...
spec/javascripts/issuable_time_tracker_spec.js.es6
View file @
bfb5ebd6
This diff is collapsed.
Click to expand it.
spec/support/time_tracking_shared_examples.rb
View file @
bfb5ebd6
...
...
@@ -65,6 +65,14 @@ shared_examples 'issuable time tracker' do
expect
(
page
).
not_to
have_content
'Learn more'
end
end
it
'displays the correct help url'
do
page
.
within
'#issuable-time-tracker'
do
find
(
'.help-button'
).
click
expect
(
find_link
(
'Learn more'
)[
:href
]).
to
eq
(
'/help/workflow/time_tracking.md'
)
end
end
end
def
submit_time
(
slash_command
)
...
...
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