diff --git a/cms/tours/dashboard_ed.yml b/cms/tours/dashboard_ed.yml
new file mode 100644
index 0000000000..434116de40
--- /dev/null
+++ b/cms/tours/dashboard_ed.yml
@@ -0,0 +1,13 @@
+steps:
+ - selector: '#group-tab'
+ title: Your group activity
+ content: An interactive progress bar for your group(s) allows you, at a glance, to see which Associates need
+ more applications and how fast each group is working.
+
+ - selector: '#group-tab ul.progress-bar'
+ title: Progress bar
+ content: Clicking each status will take you to those applications
+
+ - selector: "#feature_tour_nav"
+ title: Want to see the tour again?
+ content: You can re-take this tour again at any point by selecting it from the Feature Tours menu
\ No newline at end of file
diff --git a/cms/tours/dashboard_ed_assed.yml b/cms/tours/dashboard_ed_assed.yml
index 802e3de549..8b771b6380 100644
--- a/cms/tours/dashboard_ed_assed.yml
+++ b/cms/tours/dashboard_ed_assed.yml
@@ -1,34 +1,45 @@
steps:
- selector: header h1
title: Welcome to your dashboard!
- content: You will now come to this page after you log in. This is where you can see all the applications you have to process, and the activity of your groups.
+ content: You will now come to this page after you log in. This is where you can see all the applications you have to process, and the activity of your groups.
- selector: nav.vertical-nav
- title: Navigation,
- content: The old Admin navigation has moved from the top to the left-hand side
+ title: Navigation
+ content: The old Admin navigation has moved from the top to the left-hand side.
- - selector: "#primary-nav ul li:first-of-type"
+ - selector: nav dl
+ title: Your groups
+ content: The groups that you are a member of are shown at the top right of your dashboard.
+
+ - selector: "#notifications_nav"
title: Notifications
- content: there is a new notifications button in the top nav
+ content: There is a new notifications button in the top nav.
- - selector: "main section:first-of-type"
- title: Cards
- content: Each application is a card on your dashboard, and the cards are arranged in priority order, from left to right. Clicking a card will open up the application in a new tab
+ - selector: "header h1"
+ title: Your priority list
+ content: Each application is a card on your dashboard, and the cards are arranged in priority order, from left to
+ right. Clicking a card will open up the application in a new tab.
- - selector: "main section:first-of-type"
+ - selector: "header h1"
title: Card components
- content: 'each card has six components:
-
- - date of submission
- - status
- - what action needs to be taken
- - Information about the group and who the application is assigned to
-
'
-
- - selector: "main a svc.feather-log-out"
+ content: 'Each card has six components:
+
+ - The date of submission
+ - The status of the application
+ - What action needs to be taken
+ - The title of the application
+ - The review group
+ - Who the application is assigned to
+
'
+
+ - selector: "#logout"
title: Log out
content: "Logout has moved to the bottom of the dashboard"
- - selector: "#primary-nav svg.feather-home"
+ - selector: "#doaj_home"
title: "DOAJ Home"
- content: "to get back to the main DOAJ website, click 'DOAJ HOME' in the top right corner"
\ No newline at end of file
+ content: "To get back to the main DOAJ website, click 'DOAJ HOME' in the top right corner"
+
+ - selector: "#feature_tour_nav"
+ title: Want to see the tour again?
+ content: You can re-take this tour again at any point by selecting it from the Feature Tours menu
\ No newline at end of file
diff --git a/portality/bll/services/tour.py b/portality/bll/services/tour.py
index 1f25bc6688..31dae4767b 100644
--- a/portality/bll/services/tour.py
+++ b/portality/bll/services/tour.py
@@ -13,6 +13,7 @@ def activeTours(self, path, user):
for r in tour.get("roles"):
if user.has_role(r):
active_tours.append(tour)
+ break
else:
active_tours.append(tour)
return active_tours
diff --git a/portality/settings.py b/portality/settings.py
index 6d501ce121..9ccce6e412 100644
--- a/portality/settings.py
+++ b/portality/settings.py
@@ -1393,16 +1393,18 @@
TOUR_COOKIE_MAX_AGE = 31536000
TOURS = {
- "/dashboard/": [
+ "/editor/": [
{
- "roles": ["admin"],
+ "roles": ["editor", "associate_editor"],
"content_id": "dashboard_ed_assed",
- "name": "Welcome to the dashboard",
+ "name": "Welcome to your dashboard!",
"description": "The new dashboard gives you a way to see all your priority work, take a look at what's new.",
- } # ,
- # {
- # "roles": ["admin"],
- # "content_id": "dashboard_ed"
- # }
+ },
+ {
+ "roles": ["editor"],
+ "content_id": "dashboard_ed",
+ "name": "Your group activity",
+ "description": "Your dashboard shows you who is working on what, and the status of your group's applications"
+ }
]
}
\ No newline at end of file
diff --git a/portality/static/js/tourist.js b/portality/static/js/tourist.js
index e2b482a408..cc0f375f0a 100644
--- a/portality/static/js/tourist.js
+++ b/portality/static/js/tourist.js
@@ -1,28 +1,35 @@
if (!doaj.hasOwnProperty("tourist")) { doaj.tourist = {}}
+doaj.tourist.cookiePrefix = "";
+doaj.tourist.allTours = [];
doaj.tourist.currentTour = null;
doaj.tourist.contentId = null;
doaj.tourist.init = function(params) {
- let tours = params.tours || [];
- let cookiePrefix = params.cookie_prefix;
+ doaj.tourist.allTours = params.tours || [];
+ doaj.tourist.cookiePrefix = params.cookie_prefix;
+
+ $(".trigger_tour").on("click", doaj.tourist.triggerTour);
+
+ let first = doaj.tourist.findNextTour();
+ if (first) {
+ doaj.tourist.start(first);
+ }
+}
+
+doaj.tourist.findNextTour = function() {
let cookies = document.cookie.split("; ");
let first = false;
- for (let tour of tours) {
- let cookieName = cookiePrefix + tour.content_id + "=" + tour.content_id;
+ for (let tour of doaj.tourist.allTours) {
+ let cookieName = doaj.tourist.cookiePrefix + tour.content_id + "=" + tour.content_id;
let cookie = cookies.find(c => c === cookieName);
if (!cookie) {
first = tour;
break;
}
}
-
- $(".trigger_tour").on("click", doaj.tourist.triggerTour);
-
- if (first) {
- doaj.tourist.start(first);
- }
+ return first;
}
doaj.tourist.start = function (tour) {
@@ -30,7 +37,7 @@ doaj.tourist.start = function (tour) {
doaj.tourist.currentTour = new Tourguide({
src: `/tours/${tour.content_id}`,
onStart: doaj.tourist.startCallback,
- keyboardControls: true
+ onComplete: doaj.tourist.completeCallback
});
doaj.tourist.currentTour.start()
}
@@ -39,6 +46,20 @@ doaj.tourist.startCallback = function(options) {
doaj.tourist.seen({tour: doaj.tourist.contentId});
}
+doaj.tourist.completeCallback = function(options) {
+ doaj.tourist.currentTour = null;
+ doaj.tourist.contentId = null;
+
+ let next = doaj.tourist.findNextTour();
+ if (next) {
+ doaj.tourist.start(next);
+ } else {
+ $([document.documentElement, document.body]).animate({
+ scrollTop: 0
+ }, 500);
+ }
+}
+
doaj.tourist.seen = function(params) {
$.ajax({
type: "GET",
diff --git a/portality/templates/includes/_tourist_nav.html b/portality/templates/includes/_tourist_nav.html
index c55063164a..b595ad1147 100644
--- a/portality/templates/includes/_tourist_nav.html
+++ b/portality/templates/includes/_tourist_nav.html
@@ -3,19 +3,19 @@
{% if tours|length > 0 %}
-
+
Feature Tours