Skip to content

Commit

Permalink
finalize timeline tour help updates (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Aug 24, 2023
1 parent e94fd5b commit 0b7fde6
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 176 deletions.
5 changes: 3 additions & 2 deletions timeline/templates/timeline/_details_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
{% endfor %}
{% else %}
<tr>
<td class="bg-faded font-italic text-center" colspan="5">No events found.</td>
<td class="bg-faded font-italic text-center" colspan="5">
No events found
</td>
</tr>
{% endif %}
</tbody>
</table>

{# Event list JQuery #}
<script type="text/javascript" src="{% static 'timeline/js/timeline.js' %}"></script>
{% endif %}
134 changes: 134 additions & 0 deletions timeline/templates/timeline/_list_tour.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{# Common tour help items for timeline list views #}

{# Projectroles dependency #}
{% load projectroles_common_tags %}

<script type="text/javascript">
tour.addStep('event_table', {
title: 'Event Table',
text: 'Events are listed in this table. They are presented in a ' +
'descending chronological order.',
attachTo: '#sodar-tl-table top',
advanceOn: '.docs-link click',
showCancelLink: true
});
if ($('.sodar-tl-item-details').length) {
tour.addStep('event_details', {
title: 'Event Timestamp and Details',
text: 'The creation timestamp for each event is displayed in this ' +
'column. Click on the timestamp to open a modal which ' +
'contains details regarding event execution. This is mostly ' +
'relevant for asynchronous events.',
attachTo: '.sodar-tl-item-details top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-name').length) {
tour.addStep('event_name', {
title: 'Event Name',
text: 'The event name is displayed in this column. Event with the ' +
'name may be searched using the site search.',
attachTo: '.sodar-tl-item-name top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-app-icon').length) {
tour.addStep('event_app', {
title: 'Event App',
text: 'The application from which the event was created is ' +
'displayed here as its corresponding icon. The icon links to ' +
'the associated application.',
attachTo: '.sodar-tl-item-app-icon top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-desc').length) {
tour.addStep('event_desc', {
title: 'Event Description',
text: 'This column displays a human readable description of the ' +
'event. It may also link to related objects.',
attachTo: '.sodar-tl-item-desc top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-project-badge').length) {
tour.addStep('event_desc', {
title: '{% get_display_name 'PROJECT' title=True %} Badge',
text: 'This badge links to the {% get_display_name 'PROJECT' %} to ' +
'which the event is related.',
attachTo: '.sodar-tl-item-project-badge top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-object-link').length) {
tour.addStep('event_desc_object_link', {
title: 'Object Link',
text: 'This is an example of an object link. The text label takes ' +
'you to where the related object resides in its app. The ' +
'clock icon displays the timeline history for the object.',
attachTo: '.sodar-tl-object-link right',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-link-extra-data').length) {
tour.addStep('event_desc_extra', {
title: 'Extra Data',
text: 'Extra data for the event can be viewed here. This may ' +
'include e.g. specific values for modified variables.',
attachTo: '.sodar-tl-link-extra-data left',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-classified').length) {
tour.addStep('event_classified', {
title: 'Classified Event',
text: 'This icon denotes that the event is classified. Only ' +
'owners, delegates and superusers can view the event in the ' +
'list.',
attachTo: '.sodar-tl-item-classified left',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-status').length) {
tour.addStep('event_status', {
title: 'Event Status',
text: 'This column displays the most recent status of the event. ' +
'Details of the status and preceeding phases of the event ' +
'can be found by opening the modal from the timestamp ' +
'link.',
attachTo: '.sodar-tl-item-status left',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-pr-pagination').length) {
tour.addStep('timeline_pagination', {
title: 'Timeline Pagination',
text: 'Here you can navigate through the subpages of this timeline ' +
'event list.',
attachTo: '.sodar-pr-pagination top',
advanceOn: '.docs-link click',
showCancelLink: true,
scrollTo: true
});
}
if ($('#sodar-tl-back-btn').length) {
tour.addStep('timeline_back', {
title: 'Back to Event Table',
text: 'You can return to the general event table by clicking on ' +
'this button.',
attachTo: '#sodar-tl-back-btn left',
advanceOn: '.docs-link click',
showCancelLink: true,
scrollTo: true
});
}
</script>
9 changes: 6 additions & 3 deletions timeline/templates/timeline/_project_badge.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<span class="badge badge-info mr-1" title="{{ event.project }}" data-toggle="tooltip" data-placement="top">
<span class="badge badge-info mr-1 sodar-tl-item-project-badge"
title="{{ event.project }}"
data-toggle="tooltip" data-placement="top">
<i class="iconify"
data-icon="{% if event.project.type == 'PROJECT' %}mdi:cube{% else %}mdi:rhombus-split{% endif %}">
</i>
<a class="text-white" href="{% url 'projectroles:detail' project=event.project.sodar_uuid %}">
<a href="{% url 'projectroles:detail' project=event.project.sodar_uuid %}"
class="text-white">
{{ event.project.title }}
</a>
</span>
</span>
123 changes: 8 additions & 115 deletions timeline/templates/timeline/timeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h3>
{% if timeline_mode == 'object' %}
<div class="ml-auto">
<a href="{{ request.META.HTTP_REFERER }}"
class="btn btn-secondary ml-auto" role="button">
class="btn btn-secondary ml-auto" id="sodar-tl-back-btn" role="button">
<i class="iconify" data-icon="mdi:arrow-left-circle"></i> Back
</a>
</div>
Expand All @@ -50,14 +50,13 @@ <h3>
{% include 'timeline/_list_item.html' %}
{% endfor %}
{% else %}
{# TODO: Test in layout #}
<td class="text-center text-muted" colspan="5">
<td class="bg-faded font-italic text-center" colspan="5">
No timeline events found for this
{% if timeline_mode == 'project' %}
{% get_display_name 'PROJECT' %}
{% get_display_name 'PROJECT' %}.
{% else %}
object
{% endif %}.
object.
{% endif %}
</td>
{% endif %}
</tbody>
Expand All @@ -79,7 +78,6 @@ <h3>
<!-- Tour content -->
<script type="text/javascript">
tourEnabled = true;
// TODO: Move reusable tour elements into a common include file
tour.addStep('timeline_events', {
title: '{% get_display_name 'PROJECT' title=True %} Timeline',
text: 'In this view you can browse the timeline events for this ' +
Expand All @@ -88,112 +86,7 @@ <h3>
advanceOn: '.docs-link click',
showCancelLink: true
});
tour.addStep('event_table', {
title: 'Event Table',
text: 'Events are listed in this table. They are presented in a ' +
'descending chronological order.',
attachTo: '#sodar-tl-event-list top',
advanceOn: '.docs-link click',
showCancelLink: true
});
if ($('.sodar-tl-item-details').length) {
tour.addStep('event_details', {
title: 'Event Timestamp and Details',
text: 'The creation timestamp for each event is displayed in ' +
'this column. Click on the timestamp to open a modal ' +
'which contains details regarding event execution. This ' +
'is mostly relevant for asynchronous events.',
attachTo: '.sodar-tl-item-details top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-name').length) {
tour.addStep('event_name', {
title: 'Event Name',
text: 'The event name is displayed in this column. Event with ' +
'the name may be searched using the site search.',
attachTo: '.sodar-tl-item-name top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-app-icon').length) {
tour.addStep('event_app', {
title: 'Event App',
text: 'The application from which the event was created is ' +
'displayed here as its corresponding icon. The icon ' +
'links to the associated application.',
attachTo: '.sodar-tl-item-app-icon top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-desc').length) {
tour.addStep('event_desc', {
title: 'Event Description',
text: 'This column displays a human readable description of ' +
'the event. It may also link to related objects.',
attachTo: '.sodar-tl-item-desc top',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-object-link').length) {
tour.addStep('event_desc_object_link', {
title: 'Object Link',
text: 'This is an example of an object link. The text label ' +
'takes you to where the related object resides in its ' +
'app. The clock icon displays the timeline history for ' +
'the object.',
attachTo: '.sodar-tl-object-link right',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-link-extra-data').length) {
tour.addStep('event_desc_extra', {
title: 'Extra Data',
text: 'Extra data for the event can be viewed here. This may ' +
'include e.g. specific values for modified variables.',
attachTo: '.sodar-tl-link-extra-data left',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-classified').length) {
tour.addStep('event_classified', {
title: 'Classified Event',
text: 'This icon denotes that the event is classified. Only ' +
'owners, delegates and superusers can view the event in ' +
'the list.',
attachTo: '.sodar-tl-item-classified left',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-tl-item-status').length) {
tour.addStep('event_status', {
title: 'Event Status',
text: 'This column displays the most recent status of the ' +
'event. Details of the status and preceeding phases of ' +
'the event can be found by opening the modal from the ' +
'timestamp link.',
attachTo: '.sodar-tl-item-status left',
advanceOn: '.docs-link click',
showCancelLink: true
});
}
if ($('.sodar-pr-pagination').length) {
tour.addStep('timeline_pagination', {
title: 'Timeline Pagination',
text: 'Here you can navigate through the subpages of this ' +
'timeline event list.',
attachTo: '.sodar-pr-pagination top',
advanceOn: '.docs-link click',
showCancelLink: true,
scrollTo: true
});
}
</script>
</script>
{% include 'timeline/_list_tour.html' %} {# Common tour help items #}

{% endblock javascript %}
Loading

0 comments on commit 0b7fde6

Please sign in to comment.