Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds tool tip for timeline toggle input field #1779

Merged
merged 2 commits into from Mar 12, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/assets/javascripts/components/overview/timeline_toggle.jsx
Expand Up @@ -34,12 +34,23 @@ const TimelineToggle = createReactClass({
<strong>{I18n.t("courses.timeline_enabled")}:</strong> {currentValue ? 'yes' : 'no'}
</span>
);
const tooltip = (
<div className="tooltip-trigger">
<img src ="/assets/images/info.svg" alt = "tooltip default logo" />
<div className="tooltip large dark">
<p>
{I18n.t("courses.timeline_tooltip")}
</p>
</div>
</div>
);
if (this.props.editable) {
selector = (
<div className="form-group">
<span htmlFor={this.state.id}>
<strong>{I18n.t("courses.timeline_enabled")}:</strong>
</span>
{tooltip}
<select
id={this.state.id}
name="timeline_enabled"
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/modules/_modules.styl
Expand Up @@ -48,7 +48,7 @@
p
margin 0

.submitted_selector
.submitted_selector, .timeline_toggle
.tooltip-trigger
display inline-block
position relative
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Expand Up @@ -538,6 +538,7 @@ en:
timeline: Assignment Details
timeline_enabled: Timeline enabled
timeline_link: Timeline
timeline_tooltip: Timeline help you to keep track of your course by breaking the course duration in weeks which have proper agendas and tasks associated with them.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change I would make is a grammatical one: I would say "...into weeks with agendas and tasks associated with them." It's tighter as a whole and "into" is more clear because, for example, you can break something into pieces but don't break something in pieces. Just a suggestion! @psinghal20

time_zone_message: Start and end times are displayed in your local time zone.
title: Title
training_due:
Expand Down
1 change: 1 addition & 0 deletions config/locales/qqq.yml
Expand Up @@ -458,6 +458,7 @@ qqq:
user_role: '{{Identical|Role}}'
term: '{{Identical|Term}}'
timeline_link: '{{Identical|Timeline}}'
timeline_tooltip: Message that explains what timeline is good for
time_zone_message: Message explaining that times are shown to the user in their
local time zone
title: |-
Expand Down