mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
[ongoing] FEATURE_TOUR_DISPLAY
This commit is contained in:
parent
cf8fb0659b
commit
4db219b204
@ -133,8 +133,8 @@ Application.Controllers.controller('OpenAPIClientsController', ['$scope', 'clien
|
||||
});
|
||||
}
|
||||
});
|
||||
// if the user has never seen the tour, show him now
|
||||
if ($scope.currentUser.profile.tours.indexOf('open-api') < 0) {
|
||||
// if the user has never seen the tour, and if the display behavior is not configured to manual triggering only, show the tour now
|
||||
if (Fablab.featureTourDisplay !== 'manual' && $scope.currentUser.profile.tours.indexOf('open-api') < 0) {
|
||||
uitour.start();
|
||||
}
|
||||
// start this tour when an user press F1 - this is contextual help
|
||||
|
@ -34,7 +34,24 @@ Application.Services.factory('Member', ['$resource', function ($resource) {
|
||||
completeTour: {
|
||||
method: 'PATCH',
|
||||
url: '/api/members/:id/complete_tour',
|
||||
params: { id: '@id' }
|
||||
params: { id: '@id' },
|
||||
interceptor: function ($q) {
|
||||
return {
|
||||
request: function (config) {
|
||||
if (Fablab.featureTourDisplay === 'session') {
|
||||
throw new Error('session');
|
||||
}
|
||||
return config;
|
||||
},
|
||||
requestError: function (rejection) {
|
||||
// do something on error
|
||||
if (rejection.message === 'session') {
|
||||
return { toto: 1 };
|
||||
}
|
||||
return rejection;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -30,6 +30,7 @@
|
||||
Fablab.phoneRequired = ('<%= Rails.application.secrets.phone_required %>' === 'true');
|
||||
Fablab.eventsInCalendar = ('<%= Rails.application.secrets.events_in_calendar %>' === 'true');
|
||||
Fablab.slotDuration = parseInt("<%= ApplicationHelper::SLOT_DURATION %>", 10);
|
||||
Fablab.featureTourDisplay = "<%= Rails.application.secrets.feature_tour_display %>";
|
||||
Fablab.disqusShortname = "<%= Rails.application.secrets.disqus_shortname %>";
|
||||
Fablab.defaultHost = "<%= Rails.application.secrets.default_host %>";
|
||||
Fablab.gaId = "<%= Rails.application.secrets.google_analytics_id %>";
|
||||
|
@ -26,6 +26,7 @@ USER_CONFIRMATION_NEEDED_TO_SIGN_IN: 'false'
|
||||
|
||||
EVENTS_IN_CALENDAR: 'false'
|
||||
SLOT_DURATION: '60'
|
||||
FEATURE_TOUR_DISPLAY: 'once'
|
||||
|
||||
DEFAULT_MAIL_FROM: Fab Manager Demo <noreply@fab-manager.com>
|
||||
|
||||
|
@ -24,6 +24,7 @@ development:
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: <%= ENV["EVENTS_IN_CALENDAR"] %>
|
||||
slot_duration: <%= ENV["SLOT_DURATION"] %>
|
||||
feature_tour_display: <%= ENV["FEATURE_TOUR_DISPLAY"] %>
|
||||
default_host: <%= ENV["DEFAULT_HOST"] %>
|
||||
default_protocol: <%= ENV["DEFAULT_PROTOCOL"] %>
|
||||
time_zone: <%= ENV["TIME_ZONE"] %>
|
||||
@ -70,6 +71,7 @@ test:
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: false
|
||||
slot_duration: 60
|
||||
feature_tour_display: <%= ENV["FEATURE_TOUR_DISPLAY"] %>
|
||||
default_host: <%= ENV["DEFAULT_HOST"] %>
|
||||
default_protocol: <%= ENV["DEFAULT_PROTOCOL"] %>
|
||||
time_zone: Paris
|
||||
@ -116,6 +118,7 @@ staging:
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: <%= ENV["EVENTS_IN_CALENDAR"] %>
|
||||
slot_duration: <%= ENV["SLOT_DURATION"] %>
|
||||
feature_tour_display: <%= ENV["FEATURE_TOUR_DISPLAY"] %>
|
||||
default_host: <%= ENV["DEFAULT_HOST"] %>
|
||||
default_protocol: <%= ENV["DEFAULT_PROTOCOL"] %>
|
||||
delivery_method: <%= ENV['DELIVERY_METHOD'] %>
|
||||
@ -174,6 +177,7 @@ production:
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: <%= ENV["EVENTS_IN_CALENDAR"] %>
|
||||
slot_duration: <%= ENV["SLOT_DURATION"] %>
|
||||
feature_tour_display: <%= ENV["FEATURE_TOUR_DISPLAY"] %>
|
||||
default_host: <%= ENV["DEFAULT_HOST"] %>
|
||||
default_protocol: <%= ENV["DEFAULT_PROTOCOL"] %>
|
||||
delivery_method: <%= ENV['DELIVERY_METHOD'] %>
|
||||
|
@ -465,14 +465,6 @@ ActiveRecord::Schema.define(version: 20200218092221) do
|
||||
|
||||
add_index "plans", ["group_id"], name: "index_plans_on_group_id", using: :btree
|
||||
|
||||
create_table "plans_availabilities", force: :cascade do |t|
|
||||
t.integer "plan_id"
|
||||
t.integer "availability_id"
|
||||
end
|
||||
|
||||
add_index "plans_availabilities", ["availability_id"], name: "index_plans_availabilities_on_availability_id", using: :btree
|
||||
add_index "plans_availabilities", ["plan_id"], name: "index_plans_availabilities_on_plan_id", using: :btree
|
||||
|
||||
create_table "price_categories", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.text "conditions"
|
||||
|
@ -241,6 +241,15 @@ If not specified, every admins will receive system administration notifications.
|
||||
FORCE_VERSION_CHECK
|
||||
|
||||
In test and development environments, the version won't be check automatically, unless this variable is set to "true".
|
||||
<a name="FEATURE_TOUR_DISPLAY"></a>
|
||||
|
||||
FEATURE_TOUR_DISPLAY
|
||||
|
||||
When logged-in as an administrator, a feature tour will be triggered the first time you visit each section of the application.
|
||||
You can change this behavior by setting this variable to one of the following values:
|
||||
- "once" to keep the default behavior.
|
||||
- "session" to display the tours each time you reopen the application.
|
||||
- "manual" to prevent displaying the tours automatically; you'll still be able to trigger them by pressing the F1 key.
|
||||
|
||||
<a name="internationalization-settings"></a>
|
||||
## Internationalization setting.
|
||||
|
@ -17,6 +17,7 @@ PHONE_REQUIRED=false
|
||||
|
||||
EVENTS_IN_CALENDAR=false
|
||||
SLOT_DURATION=60
|
||||
FEATURE_TOUR_DISPLAY=once
|
||||
|
||||
DEFAULT_MAIL_FROM=Fab Manager Demo <noreply@fab-manager.com>
|
||||
DEFAULT_HOST=demo.fab-manager.com
|
||||
|
@ -213,7 +213,7 @@ configure_env_file()
|
||||
variables=(STRIPE_API_KEY STRIPE_PUBLISHABLE_KEY STRIPE_CURRENCY INVOICE_PREFIX FABLAB_WITHOUT_PLANS FABLAB_WITHOUT_SPACES FABLAB_WITHOUT_ONLINE_PAYMENT FABLAB_WITHOUT_INVOICES \
|
||||
PHONE_REQUIRED USER_CONFIRMATION_NEEDED_TO_SIGN_IN EVENTS_IN_CALENDAR SLOT_DURATION DEFAULT_MAIL_FROM DELIVERY_METHOD DEFAULT_HOST DEFAULT_PROTOCOL SMTP_ADDRESS SMTP_PORT SMTP_USER_NAME SMTP_PASSWORD SMTP_AUTHENTICATION \
|
||||
SMTP_ENABLE_STARTTLS_AUTO SMTP_OPENSSL_VERIFY_MODE SMTP_TLS GA_ID RECAPTCHA_SITE_KEY RECAPTCHA_SECRET_KEY DISQUS_SHORTNAME TWITTER_NAME \
|
||||
FACEBOOK_APP_ID LOG_LEVEL ALLOWED_EXTENSIONS ALLOWED_MIME_TYPES MAX_IMAGE_SIZE MAX_CAO_SIZE MAX_IMPORT_SIZE DISK_SPACE_MB_ALERT \
|
||||
FACEBOOK_APP_ID LOG_LEVEL ALLOWED_EXTENSIONS ALLOWED_MIME_TYPES MAX_IMAGE_SIZE MAX_CAO_SIZE MAX_IMPORT_SIZE DISK_SPACE_MB_ALERT FEATURE_TOUR_BEHAVIOR \
|
||||
SUPERADMIN_EMAIL APP_LOCALE RAILS_LOCALE MOMENT_LOCALE SUMMERNOTE_LOCALE ANGULAR_LOCALE MESSAGEFORMAT_LOCALE FULLCALENDAR_LOCALE ELASTICSEARCH_LANGUAGE_ANALYZER TIME_ZONE \
|
||||
WEEK_STARTING_DAY D3_DATE_FORMAT UIB_DATE_FORMAT EXCEL_DATE_FORMAT OPENLAB_APP_ID OPENLAB_APP_SECRET OPENLAB_DEFAULT)
|
||||
for variable in "${variables[@]}"; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user