summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
diff options
context:
space:
mode:
authorGeorge Tsiolis <tsiolis.g@gmail.com>2018-04-11 17:18:53 +0300
committerGeorge Tsiolis <tsiolis.g@gmail.com>2018-04-11 17:19:49 +0300
commit93c55f5858a809414e884006f9bb3a7b4d1a55f4 (patch)
tree1323f953797d7fcb985d97f74baaad9e091abc3d /app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
parent174950b6562226beed7eef135a2450bfee60e21f (diff)
downloadgitlab-ce-93c55f5858a809414e884006f9bb3a7b4d1a55f4.tar.gz
Move TimeTrackingHelpState vue component
Diffstat (limited to 'app/assets/javascripts/sidebar/components/time_tracking/help_state.vue')
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/help_state.vue55
1 files changed, 55 insertions, 0 deletions
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
new file mode 100644
index 00000000000..825063d9ba6
--- /dev/null
+++ b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
@@ -0,0 +1,55 @@
+<script>
+import { sprintf, s__ } from '../../../locale';
+
+export default {
+ name: 'TimeTrackingHelpState',
+ props: {
+ rootPath: {
+ type: String,
+ required: true,
+ },
+ },
+ computed: {
+ href() {
+ return `${this.rootPath}help/workflow/time_tracking.md`;
+ },
+ estimateText() {
+ return sprintf(
+ s__('estimateCommand|%{slash_command} will update the estimated time with the latest command.'), {
+ slash_command: '<code>/estimate</code>',
+ }, false,
+ );
+ },
+ spendText() {
+ return sprintf(
+ s__('spendCommand|%{slash_command} will update the sum of the time spent.'), {
+ slash_command: '<code>/spend</code>',
+ }, false,
+ );
+ },
+ },
+};
+</script>
+
+<template>
+ <div class="time-tracking-help-state">
+ <div class="time-tracking-info">
+ <h4>
+ {{ __('Track time with quick actions') }}
+ </h4>
+ <p>
+ {{ __('Quick actions can be used in the issues description and comment boxes.') }}
+ </p>
+ <p v-html="estimateText">
+ </p>
+ <p v-html="spendText">
+ </p>
+ <a
+ class="btn btn-default learn-more-button"
+ :href="href"
+ >
+ {{ __('Learn more') }}
+ </a>
+ </div>
+ </div>
+</template>