1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

fix loading angular-ui-tour templates + use templateUrl instead of template:require()

This commit is contained in:
Sylvain 2020-09-22 14:46:13 +02:00
parent 4e4ab9c4c2
commit a398ba8b8e
37 changed files with 154 additions and 134 deletions

View File

@ -87,7 +87,7 @@ class AuthenticationController {
*/ */
$scope.defineDataMapping = function (mapping) { $scope.defineDataMapping = function (mapping) {
$uibModal.open({ $uibModal.open({
template: require('../../../../templates/admin/authentications/_data_mapping.html'), templateUrl: '../../../../templates/admin/authentications/_data_mapping.html',
size: 'md', size: 'md',
resolve: { resolve: {
field () { return mapping; }, field () { return mapping; },

View File

@ -273,7 +273,7 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
// open a confirmation dialog // open a confirmation dialog
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/admin/calendar/deleteRecurrent.html'), templateUrl: '../../../../templates/admin/calendar/deleteRecurrent.html',
size: 'md', size: 'md',
controller: 'DeleteRecurrentAvailabilityController', controller: 'DeleteRecurrentAvailabilityController',
resolve: { resolve: {
@ -419,7 +419,7 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
// then we open a modal window to let the admin specify the slot type // then we open a modal window to let the admin specify the slot type
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
template: require('../../../../templates/admin/calendar/eventModal.html'), templateUrl: '../../../../templates/admin/calendar/eventModal.html',
controller: 'CreateEventModalController', controller: 'CreateEventModalController',
backdrop: 'static', backdrop: 'static',
keyboard: false, keyboard: false,

View File

@ -279,7 +279,7 @@ Application.Controllers.controller('AdminEventsController', ['$scope', '$state',
*/ */
$scope.newPriceCategory = function () { $scope.newPriceCategory = function () {
$uibModal.open({ $uibModal.open({
template: require('../../../../templates/admin/events/price_form.html'), templateUrl: '../../../../templates/admin/events/price_form.html',
size: 'md', size: 'md',
resolve: { resolve: {
category () { return {}; } category () { return {}; }
@ -307,7 +307,7 @@ Application.Controllers.controller('AdminEventsController', ['$scope', '$state',
return growl.error(_t('app.admin.events.unexpected_error_occurred_please_refresh')); return growl.error(_t('app.admin.events.unexpected_error_occurred_please_refresh'));
} else { } else {
return $uibModal.open({ return $uibModal.open({
template: require('../../../../templates/admin/events/price_form.html'), templateUrl: '../../../../templates/admin/events/price_form.html',
size: 'md', size: 'md',
resolve: { resolve: {
category () { return $scope.priceCategories[index]; } category () { return $scope.priceCategories[index]; }
@ -645,7 +645,7 @@ Application.Controllers.controller('EditEventController', ['$scope', '$state', '
// open a choice edit-mode dialog // open a choice edit-mode dialog
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/events/editRecurrent.html'), templateUrl: '../../../../templates/events/editRecurrent.html',
size: 'md', size: 'md',
controller: 'EditRecurrentEventController', controller: 'EditRecurrentEventController',
resolve: { resolve: {

View File

@ -220,7 +220,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
$scope.generateAvoirForInvoice = function (invoice) { $scope.generateAvoirForInvoice = function (invoice) {
// open modal // open modal
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
template: require('../../../../templates/admin/invoices/avoirModal.html'), templateUrl: '../../../../templates/admin/invoices/avoirModal.html',
controller: 'AvoirModalController', controller: 'AvoirModalController',
resolve: { resolve: {
invoice () { return invoice; }, invoice () { return invoice; },
@ -578,7 +578,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
$scope.closeAnAccountingPeriod = function () { $scope.closeAnAccountingPeriod = function () {
// open modal // open modal
$uibModal.open({ $uibModal.open({
template: require('../../../../templates/admin/invoices/closePeriodModal.html'), templateUrl: '../../../../templates/admin/invoices/closePeriodModal.html',
controller: 'ClosePeriodModalController', controller: 'ClosePeriodModalController',
backdrop: 'static', backdrop: 'static',
keyboard: false, keyboard: false,
@ -592,7 +592,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
$scope.toggleExportModal = function () { $scope.toggleExportModal = function () {
$uibModal.open({ $uibModal.open({
template: require('../../../../templates/admin/invoices/accountingExportModal.html'), templateUrl: '../../../../templates/admin/invoices/accountingExportModal.html',
controller: 'AccountingExportModalController', controller: 'AccountingExportModalController',
size: 'xl' size: 'xl'
}); });

View File

@ -236,7 +236,7 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce',
$scope.openPartnerNewModal = function () { $scope.openPartnerNewModal = function () {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/shared/_partner_new_modal.html'), templateUrl: '../../../../templates/shared/_partner_new_modal.html',
size: 'lg', size: 'lg',
controller: ['$scope', '$uibModalInstance', 'User', function ($scope, $uibModalInstance, User) { controller: ['$scope', '$uibModalInstance', 'User', function ($scope, $uibModalInstance, User) {
$scope.partner = {}; $scope.partner = {};
@ -702,7 +702,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
$scope.changeUserRole = function() { $scope.changeUserRole = function() {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/admin/members/change_role_modal.html'), templateUrl: '../../../../templates/admin/members/change_role_modal.html',
size: 'lg', size: 'lg',
resolve: { resolve: {
user() { return $scope.user; } user() { return $scope.user; }
@ -750,7 +750,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
$scope.updateSubscriptionModal = function (subscription, free) { $scope.updateSubscriptionModal = function (subscription, free) {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/admin/subscriptions/expired_at_modal.html'), templateUrl: '../../../../templates/admin/subscriptions/expired_at_modal.html',
size: 'lg', size: 'lg',
controller: ['$scope', '$uibModalInstance', 'Subscription', function ($scope, $uibModalInstance, Subscription) { controller: ['$scope', '$uibModalInstance', 'Subscription', function ($scope, $uibModalInstance, Subscription) {
$scope.new_expired_at = angular.copy(subscription.expired_at); $scope.new_expired_at = angular.copy(subscription.expired_at);
@ -797,7 +797,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
$scope.createSubscriptionModal = function (user, plans) { $scope.createSubscriptionModal = function (user, plans) {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/admin/subscriptions/create_modal.html'), templateUrl: '../../../../templates/admin/subscriptions/create_modal.html',
size: 'lg', size: 'lg',
controller: ['$scope', '$uibModalInstance', 'Subscription', 'Group', function ($scope, $uibModalInstance, Subscription, Group) { controller: ['$scope', '$uibModalInstance', 'Subscription', 'Group', function ($scope, $uibModalInstance, Subscription, Group) {
// selected user // selected user
@ -845,7 +845,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
$scope.createWalletCreditModal = function (user, wallet) { $scope.createWalletCreditModal = function (user, wallet) {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/wallet/credit_modal.html'), templateUrl: '../../../../templates/wallet/credit_modal.html',
controller: ['$scope', '$uibModalInstance', 'Wallet', function ($scope, $uibModalInstance, Wallet) { controller: ['$scope', '$uibModalInstance', 'Wallet', function ($scope, $uibModalInstance, Wallet) {
// default: do not generate a refund invoice // default: do not generate a refund invoice
$scope.generate_avoir = false; $scope.generate_avoir = false;

View File

@ -106,7 +106,7 @@ Application.Controllers.controller('NewPlanController', ['$scope', '$uibModal',
$scope.openPartnerNewModal = function (subscription) { $scope.openPartnerNewModal = function (subscription) {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../../templates/shared/_partner_new_modal.html'), templateUrl: '../../../../templates/shared/_partner_new_modal.html',
size: 'lg', size: 'lg',
controller: ['$scope', '$uibModalInstance', 'User', function ($scope, $uibModalInstance, User) { controller: ['$scope', '$uibModalInstance', 'User', function ($scope, $uibModalInstance, User) {
$scope.partner = {}; $scope.partner = {};

View File

@ -570,7 +570,7 @@ Application.Controllers.controller('EditPricingController', ['$scope', '$state',
*/ */
$scope.sendCouponToUser = function (coupon) { $scope.sendCouponToUser = function (coupon) {
$uibModal.open({ $uibModal.open({
template: require('../../../../templates/admin/pricing/sendCoupon.html'), templateUrl: '../../../../templates/admin/pricing/sendCoupon.html',
resolve: { resolve: {
coupon () { return coupon; } coupon () { return coupon; }
}, },

View File

@ -173,7 +173,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$rootScope'
$scope.savePrivacyPolicy = function () { $scope.savePrivacyPolicy = function () {
// open modal // open modal
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
template: require('../../../../templates/admin/settings/save_policy.html'), templateUrl: '../../../../templates/admin/settings/save_policy.html',
controller: 'SavePolicyController', controller: 'SavePolicyController',
resolve: { resolve: {
saveCb () { return $scope.save; }, saveCb () { return $scope.save; },
@ -274,7 +274,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$rootScope'
*/ */
$scope.analyticsModal = function() { $scope.analyticsModal = function() {
$uibModal.open({ $uibModal.open({
template: require('../../../../templates/admin/settings/analyticsModal.html'), templateUrl: '../../../../templates/admin/settings/analyticsModal.html',
controller: 'AnalyticsModalController', controller: 'AnalyticsModalController',
size: 'lg', size: 'lg',
resolve: { resolve: {

View File

@ -311,7 +311,7 @@ Application.Controllers.controller('StatisticsController', ['$scope', '$state',
*/ */
$scope.exportToExcel = function () { $scope.exportToExcel = function () {
const options = { const options = {
template: require('../../../../templates/admin/statistics/export.html'), templateUrl: '../../../../templates/admin/statistics/export.html',
size: 'sm', size: 'sm',
controller: 'ExportStatisticsController', controller: 'ExportStatisticsController',
resolve: { resolve: {

View File

@ -221,7 +221,7 @@ Application.Controllers.controller('TrainingsAdminController', ['$scope', '$stat
*/ */
$scope.showReservations = function (training, availability) { $scope.showReservations = function (training, availability) {
$uibModal.open({ $uibModal.open({
template: require('../../../../templates/admin/trainings/validTrainingModal.html'), templateUrl: '../../../../templates/admin/trainings/validTrainingModal.html',
controller: ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) { controller: ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) {
$scope.availability = availability; $scope.availability = availability;

View File

@ -89,7 +89,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
<% else %> <% else %>
return $uibModal.open({ return $uibModal.open({
template: require('../../../templates/shared/signupModal.html'), templateUrl: '../../../templates/shared/signupModal.html',
size: 'md', size: 'md',
resolve: { resolve: {
settingsPromise: ['Setting', function (Setting) { return Setting.query({ names: "['phone_required', 'recaptcha_site_key', 'confirmation_required']" }).$promise; }] settingsPromise: ['Setting', function (Setting) { return Setting.query({ names: "['phone_required', 'recaptcha_site_key', 'confirmation_required']" }).$promise; }]
@ -192,7 +192,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
*/ */
$scope.editPassword = function (token) { $scope.editPassword = function (token) {
$uibModal.open({ $uibModal.open({
template: require('../../../templates/shared/passwordEditModal.html'), templateUrl: '../../../templates/shared/passwordEditModal.html',
size: 'md', size: 'md',
controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
$scope.user = { reset_password_token: token }; $scope.user = { reset_password_token: token };
@ -282,7 +282,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
if ($rootScope.currentUser.role !== 'admin') return; if ($rootScope.currentUser.role !== 'admin') return;
$uibModal.open({ $uibModal.open({
template: require('../../../templates/admin/versions/upgradeModal.html'), templateUrl: '../../../templates/admin/versions/upgradeModal.html',
controller: 'VersionModalController', controller: 'VersionModalController',
resolve: { resolve: {
version() { return $scope.version; } version() { return $scope.version; }
@ -407,7 +407,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
$window.location.href = '/sso-redirect'; $window.location.href = '/sso-redirect';
<% else %> <% else %>
return $uibModal.open({ return $uibModal.open({
template: require('../../../templates/shared/deviseModal.html'), templateUrl: '../../../templates/shared/deviseModal.html',
size: 'sm', size: 'sm',
resolve: { resolve: {
settingsPromise: ['Setting', function (Setting) { return Setting.query({ names: "['confirmation_required']" }).$promise; }] settingsPromise: ['Setting', function (Setting) { return Setting.query({ names: "['confirmation_required']" }).$promise; }]
@ -470,7 +470,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
} else if (reason === 'resetPassword') { } else if (reason === 'resetPassword') {
// open the 'reset password' modal // open the 'reset password' modal
return $uibModal.open({ return $uibModal.open({
template: require('../../../templates/shared/passwordNewModal.html'), templateUrl: '../../../templates/shared/passwordNewModal.html',
size: 'sm', size: 'sm',
controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
$scope.user = { email: '' }; $scope.user = { email: '' };
@ -488,7 +488,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
} else if (reason === 'confirmationNew') { } else if (reason === 'confirmationNew') {
// open the 'reset password' modal // open the 'reset password' modal
return $uibModal.open({ return $uibModal.open({
template: require('../../../templates/shared/ConfirmationNewModal.html'), templateUrl: '../../../templates/shared/ConfirmationNewModal.html',
size: 'sm', size: 'sm',
controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
$scope.user = { email: '' }; $scope.user = { email: '' };

View File

@ -186,7 +186,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
// open a confirmation dialog // open a confirmation dialog
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../templates/events/deleteRecurrent.html'), templateUrl: '../../../templates/events/deleteRecurrent.html',
size: 'md', size: 'md',
controller: 'DeleteRecurrentEventController', controller: 'DeleteRecurrentEventController',
resolve: { resolve: {
@ -416,7 +416,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
$scope.modifyReservation = function (reservation) { $scope.modifyReservation = function (reservation) {
const index = $scope.reservations.indexOf(reservation); const index = $scope.reservations.indexOf(reservation);
return $uibModal.open({ return $uibModal.open({
template: require('../../../templates/events/modify_event_reservation_modal.html'), templateUrl: '../../../templates/events/modify_event_reservation_modal.html',
resolve: { resolve: {
event () { return $scope.event; }, event () { return $scope.event; },
reservation () { return reservation; } reservation () { return reservation; }
@ -671,7 +671,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
*/ */
const payByStripe = function (reservation) { const payByStripe = function (reservation) {
$uibModal.open({ $uibModal.open({
template: require('../../../templates/stripe/payment_modal.html'), templateUrl: '../../../templates/stripe/payment_modal.html',
size: 'md', size: 'md',
resolve: { resolve: {
reservation () { reservation () {
@ -739,7 +739,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
*/ */
const payOnSite = function (reservation) { const payOnSite = function (reservation) {
$uibModal.open({ $uibModal.open({
template: require('../../../templates/shared/valid_reservation_modal.html'), templateUrl: '../../../templates/shared/valid_reservation_modal.html',
size: 'sm', size: 'sm',
resolve: { resolve: {
reservation () { reservation () {
@ -858,7 +858,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
const showReserveSlotSameTimeModal = function(sameTimeReservations, callback) { const showReserveSlotSameTimeModal = function(sameTimeReservations, callback) {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../templates/shared/_reserve_slot_same_time.html'), templateUrl: '../../../templates/shared/_reserve_slot_same_time.html',
size: 'md', size: 'md',
controller: 'ReserveSlotSameTimeController', controller: 'ReserveSlotSameTimeController',
resolve: { resolve: {

View File

@ -121,7 +121,7 @@ const _reserveMachine = function (machine, e) {
// the training before he can book the reservation // the training before he can book the reservation
if (machine.current_user_training_reservation) { if (machine.current_user_training_reservation) {
return _this.$uibModal.open({ return _this.$uibModal.open({
template: require('../../../templates/machines/training_reservation_modal.html'), templateUrl: '../../../templates/machines/training_reservation_modal.html',
controller: ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) { controller: ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) {
$scope.machine = machine; $scope.machine = machine;
return $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); }; return $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); };
@ -136,7 +136,7 @@ const _reserveMachine = function (machine, e) {
// otherwise open the information modal // otherwise open the information modal
} else { } else {
return _this.$uibModal.open({ return _this.$uibModal.open({
template: require('../../../templates/machines/request_training_modal.html'), templateUrl: '../../../templates/machines/request_training_modal.html',
controller: ['$scope', '$uibModalInstance', '$state', function ($scope, $uibModalInstance, $state) { controller: ['$scope', '$uibModalInstance', '$state', function ($scope, $uibModalInstance, $state) {
$scope.machine = machine; $scope.machine = machine;
$scope.member = _this.$scope.currentUser; $scope.member = _this.$scope.currentUser;

View File

@ -235,7 +235,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop
*/ */
const payByStripe = function () { const payByStripe = function () {
$uibModal.open({ $uibModal.open({
template: require('../../../templates/stripe/payment_modal.html'), templateUrl: '../../../templates/stripe/payment_modal.html',
size: 'md', size: 'md',
resolve: { resolve: {
selectedPlan () { return $scope.selectedPlan; }, selectedPlan () { return $scope.selectedPlan; },
@ -299,7 +299,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop
*/ */
const payOnSite = function () { const payOnSite = function () {
$uibModal.open({ $uibModal.open({
template: require('../../../templates/plans/payment_modal.html'), templateUrl: '../../../templates/plans/payment_modal.html',
size: 'sm', size: 'sm',
resolve: { resolve: {
selectedPlan () { return $scope.selectedPlan; }, selectedPlan () { return $scope.selectedPlan; },

View File

@ -167,7 +167,7 @@ Application.Controllers.controller('CompleteProfileController', ['$scope', '$roo
event.stopPropagation(); event.stopPropagation();
dialogs.confirm( dialogs.confirm(
{ {
template: require('../../../templates/profile/resend_code_modal.html'), templateUrl: '../../../templates/profile/resend_code_modal.html',
resolve: { resolve: {
object () { object () {
return { email: memberPromise.email }; return { email: memberPromise.email };

View File

@ -587,7 +587,7 @@ Application.Controllers.controller('ShowProjectController', ['$scope', '$state',
if (e) { e.preventDefault(); } if (e) { e.preventDefault(); }
$uibModal.open({ $uibModal.open({
template: require('../../../templates/shared/signalAbuseModal.html'), templateUrl: '../../../templates/shared/signalAbuseModal.html',
size: 'md', size: 'md',
resolve: { resolve: {
project () { return $scope.project; } project () { return $scope.project; }

View File

@ -39,7 +39,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
reservableName: '@', reservableName: '@',
limitToOneSlot: '@' limitToOneSlot: '@'
}, },
template: require('../../../templates/shared/_cart.html'), templateUrl: '../../../templates/shared/_cart.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// will store the user's plan if he choosed to buy one // will store the user's plan if he choosed to buy one
$scope.selectedPlan = null; $scope.selectedPlan = null;
@ -174,7 +174,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
} else { } else {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../templates/shared/_reserve_slot_without_plan.html'), templateUrl: '../../../templates/shared/_reserve_slot_without_plan.html',
size: 'md', size: 'md',
controller: 'ReserveSlotWithoutPlanController', controller: 'ReserveSlotWithoutPlanController',
resolve: { resolve: {
@ -318,7 +318,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
// ask confirmation // ask confirmation
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../templates/shared/_reserve_slot_tags_mismatch.html'), templateUrl: '../../../templates/shared/_reserve_slot_tags_mismatch.html',
size: 'md', size: 'md',
controller: 'ReserveSlotTagsMismatchController', controller: 'ReserveSlotTagsMismatchController',
resolve: { resolve: {
@ -357,7 +357,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
if (sameTimeReservations.length > 0) { if (sameTimeReservations.length > 0) {
const modalInstance = $uibModal.open({ const modalInstance = $uibModal.open({
animation: true, animation: true,
template: require('../../../templates/shared/_reserve_slot_same_time.html'), templateUrl: '../../../templates/shared/_reserve_slot_same_time.html',
size: 'md', size: 'md',
controller: 'ReserveSlotSameTimeController', controller: 'ReserveSlotSameTimeController',
resolve: { resolve: {
@ -447,7 +447,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
$scope.slot.cancelable = slotCanBeCanceled($scope.slot); $scope.slot.cancelable = slotCanBeCanceled($scope.slot);
// -> then, we open a dialog to ask to the user to choose an action // -> then, we open a dialog to ask to the user to choose an action
return dialogs.confirm({ return dialogs.confirm({
template: require('../../../templates/shared/confirm_modify_slot_modal.html'), templateUrl: '../../../templates/shared/confirm_modify_slot_modal.html',
resolve: { resolve: {
object () { return $scope.slot; } object () { return $scope.slot; }
} }
@ -612,7 +612,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
*/ */
const payByStripe = function (reservation) { const payByStripe = function (reservation) {
$uibModal.open({ $uibModal.open({
template: require('../../../templates/stripe/payment_modal.html'), templateUrl: '../../../templates/stripe/payment_modal.html',
size: 'md', size: 'md',
resolve: { resolve: {
reservation () { reservation () {
@ -673,7 +673,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
*/ */
const payOnSite = function (reservation) { const payOnSite = function (reservation) {
$uibModal.open({ $uibModal.open({
template: require('../../../templates/shared/valid_reservation_modal.html'), templateUrl: '../../../templates/shared/valid_reservation_modal.html',
size: 'sm', size: 'sm',
resolve: { resolve: {
reservation () { reservation () {

View File

@ -18,7 +18,7 @@ Application.Directives.directive('coupon', [ '$rootScope', 'Coupon', '_t', funct
total: '=', total: '=',
userId: '@' userId: '@'
}, },
template: require('../../../templates/shared/_coupon.html'), templateUrl: '../../../templates/shared/_coupon.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// Whether code input is shown or not (ie. the link 'I have a coupon' is shown) // Whether code input is shown or not (ie. the link 'I have a coupon' is shown)
$scope.code = $scope.code =

View File

@ -15,6 +15,6 @@ Application.Directives.directive('fabUserAvatar', [ function () {
userAvatar: '=ngModel', userAvatar: '=ngModel',
avatarClass: '@' avatarClass: '@'
}, },
template: require('../../../templates/shared/_user_avatar.html') templateUrl: '../../../templates/shared/_user_avatar.html'
}); });
}]); }]);

View File

@ -2,7 +2,7 @@ Application.Directives.directive('events', [ 'Event',
function (Event) { function (Event) {
return ({ return ({
restrict: 'E', restrict: 'E',
template: require('../../../../templates/home/events.html'), templateUrl: '../../../../templates/home/events.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The closest upcoming events // The closest upcoming events
$scope.upcomingEvents = null; $scope.upcomingEvents = null;

View File

@ -2,7 +2,7 @@ Application.Directives.directive('news', [ 'Setting',
function (Setting) { function (Setting) {
return ({ return ({
restrict: 'E', restrict: 'E',
template: require('../../../../templates/home/news.html'), templateUrl: '../../../../templates/home/news.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The admin blogpost // The admin blogpost
$scope.homeBlogpost = null; $scope.homeBlogpost = null;

View File

@ -2,7 +2,7 @@ Application.Directives.directive('projects', [ 'Project',
function (Project) { function (Project) {
return ({ return ({
restrict: 'E', restrict: 'E',
template: require('../../../../templates/home/projects.html'), templateUrl: '../../../../templates/home/projects.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The last projects published/documented on the platform // The last projects published/documented on the platform
$scope.lastProjects = null; $scope.lastProjects = null;

View File

@ -8,7 +8,7 @@ Application.Directives.directive('twitter', ['Setting',
function (Setting) { function (Setting) {
return ({ return ({
restrict: 'E', restrict: 'E',
template: require('../../../../templates/home/twitter.html'), templateUrl: '../../../../templates/home/twitter.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// Twitter username // Twitter username
$scope.twitterName = null; $scope.twitterName = null;

View File

@ -2,7 +2,7 @@ Application.Directives.directive('members', [ 'Member',
function (Member) { function (Member) {
return ({ return ({
restrict: 'E', restrict: 'E',
template: require('../../../templates/home/members.html'), templateUrl: '../../../templates/home/members.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The last registered members who confirmed their addresses // The last registered members who confirmed their addresses
$scope.lastMembers = null; $scope.lastMembers = null;

View File

@ -11,7 +11,7 @@
Application.Directives.directive('selectMember', [ 'Diacritics', 'Member', function (Diacritics, Member) { Application.Directives.directive('selectMember', [ 'Diacritics', 'Member', function (Diacritics, Member) {
return ({ return ({
restrict: 'E', restrict: 'E',
template: require('../../../templates/shared/_member_select.html'), templateUrl: '../../../templates/shared/_member_select.html',
link (scope, element, attributes) { link (scope, element, attributes) {
return scope.autoCompleteName = function (nameLookup) { return scope.autoCompleteName = function (nameLookup) {
if (!nameLookup) { if (!nameLookup) {

View File

@ -11,7 +11,7 @@ Application.Directives.directive('booleanSetting', ['Setting', 'growl', '_t',
classes: '@', classes: '@',
onBeforeSave: '=' onBeforeSave: '='
}, },
template: require('../../../../templates/admin/settings/boolean.html'), templateUrl: '../../../../templates/admin/settings/boolean.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The setting // The setting
$scope.setting = { $scope.setting = {

View File

@ -12,7 +12,7 @@ Application.Directives.directive('numberSetting', ['Setting', 'growl', '_t',
min: '@', min: '@',
required: '<' required: '<'
}, },
template: require('../../../../templates/admin/settings/number.html'), templateUrl: '../../../../templates/admin/settings/number.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The setting // The setting
$scope.setting = { $scope.setting = {

View File

@ -12,7 +12,7 @@ Application.Directives.directive('selectMultipleSetting', ['Setting', 'growl', '
descriptionNew: '@', descriptionNew: '@',
beforeAdd: '=' beforeAdd: '='
}, },
template: require('../../../../templates/admin/settings/select-multiple.html'), templateUrl: '../../../../templates/admin/settings/select-multiple.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The setting // The setting
$scope.setting = { $scope.setting = {

View File

@ -14,7 +14,7 @@ Application.Directives.directive('selectSetting', ['Setting', 'growl', '_t',
option4: '<', option4: '<',
option5: '<' option5: '<'
}, },
template: require('../../../../templates/admin/settings/select.html'), templateUrl: '../../../../templates/admin/settings/select.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// The setting // The setting
$scope.setting = { $scope.setting = {

View File

@ -15,7 +15,7 @@ Application.Directives.directive('textSetting', ['Setting', 'growl', '_t',
minLength: '@', minLength: '@',
readOnly: '<' readOnly: '<'
}, },
template: require('../../../../templates/admin/settings/text.html'), templateUrl: '../../../../templates/admin/settings/text.html',
link ($scope, element, attributes) { link ($scope, element, attributes) {
// if type is not specified, use text as default // if type is not specified, use text as default
if (typeof $scope.type === 'undefined') { if (typeof $scope.type === 'undefined') {

View File

@ -16,7 +16,7 @@ Application.Directives.directive('socialLink', [ function () {
network: '@?', network: '@?',
user: '=' user: '='
}, },
template: require('../../../templates/shared/_social_link.html'), templateUrl: '../../../templates/shared/_social_link.html',
link (scope, element, attributes) { link (scope, element, attributes) {
if (scope.network === 'dailymotion') { if (scope.network === 'dailymotion') {
scope.image = "social/dailymotion.png"; scope.image = "social/dailymotion.png";

View File

@ -21,14 +21,14 @@ angular.module('application.router', ['ui.router'])
abstract: true, abstract: true,
views: { views: {
header: { header: {
template: require('../../templates/shared/header.html.erb') templateUrl: '../../templates/shared/header.html.erb'
}, },
leftnav: { leftnav: {
template: require('../../templates/shared/leftnav.html'), templateUrl: '../../templates/shared/leftnav.html',
controller: 'MainNavController' controller: 'MainNavController'
}, },
cookies: { cookies: {
template: require('../../templates/shared/cookies.html'), templateUrl: '../../templates/shared/cookies.html',
controller: 'CookiesController' controller: 'CookiesController'
}, },
main: {} main: {}
@ -92,7 +92,7 @@ angular.module('application.router', ['ui.router'])
url: '/about', url: '/about',
views: { views: {
'content@': { 'content@': {
template: require('../../templates/shared/about.html'), templateUrl: '../../templates/shared/about.html',
controller: 'AboutController' controller: 'AboutController'
} }
} }
@ -101,7 +101,7 @@ angular.module('application.router', ['ui.router'])
url: '/?reset_password_token', url: '/?reset_password_token',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/home.html'), templateUrl: '../../templates/home.html',
controller: 'HomeController' controller: 'HomeController'
} }
}, },
@ -113,7 +113,7 @@ angular.module('application.router', ['ui.router'])
url: '/privacy-policy', url: '/privacy-policy',
views: { views: {
'content@': { 'content@': {
template: require('../../templates/shared/privacy.html'), templateUrl: '../../templates/shared/privacy.html',
controller: 'PrivacyController' controller: 'PrivacyController'
} }
} }
@ -124,7 +124,7 @@ angular.module('application.router', ['ui.router'])
url: '/profile_completion', url: '/profile_completion',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/profile/complete.html'), templateUrl: '../../templates/profile/complete.html',
controller: 'CompleteProfileController' controller: 'CompleteProfileController'
} }
}, },
@ -150,7 +150,7 @@ angular.module('application.router', ['ui.router'])
url: '/profile', url: '/profile',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/dashboard/profile.html'), templateUrl: '../../templates/dashboard/profile.html',
controller: 'DashboardController' controller: 'DashboardController'
} }
} }
@ -159,7 +159,7 @@ angular.module('application.router', ['ui.router'])
url: '/settings', url: '/settings',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/dashboard/settings.html'), templateUrl: '../../templates/dashboard/settings.html',
controller: 'EditProfileController' controller: 'EditProfileController'
} }
}, },
@ -173,7 +173,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects', url: '/projects',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/dashboard/projects.html'), templateUrl: '../../templates/dashboard/projects.html',
controller: 'DashboardController' controller: 'DashboardController'
} }
} }
@ -182,7 +182,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings', url: '/trainings',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/dashboard/trainings.html'), templateUrl: '../../templates/dashboard/trainings.html',
controller: 'DashboardController' controller: 'DashboardController'
} }
} }
@ -191,7 +191,7 @@ angular.module('application.router', ['ui.router'])
url: '/events', url: '/events',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/dashboard/events.html'), templateUrl: '../../templates/dashboard/events.html',
controller: 'DashboardController' controller: 'DashboardController'
} }
} }
@ -200,7 +200,7 @@ angular.module('application.router', ['ui.router'])
url: '/invoices', url: '/invoices',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/dashboard/invoices.html'), templateUrl: '../../templates/dashboard/invoices.html',
controller: 'DashboardController' controller: 'DashboardController'
} }
} }
@ -210,7 +210,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.walletModule, abstract: !Fablab.walletModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/dashboard/wallet.html'), templateUrl: '../../templates/dashboard/wallet.html',
controller: 'WalletController' controller: 'WalletController'
} }
}, },
@ -225,7 +225,7 @@ angular.module('application.router', ['ui.router'])
url: '/members/:id', url: '/members/:id',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/members/show.html'), templateUrl: '../../templates/members/show.html',
controller: 'ShowProfileController' controller: 'ShowProfileController'
} }
}, },
@ -237,7 +237,7 @@ angular.module('application.router', ['ui.router'])
url: '/members', url: '/members',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/members/index.html'), templateUrl: '../../templates/members/index.html',
controller: 'MembersController' controller: 'MembersController'
} }
}, },
@ -251,7 +251,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects?q&page&theme_id&component_id&machine_id&from&whole_network', url: '/projects?q&page&theme_id&component_id&machine_id&from&whole_network',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/projects/index.html'), templateUrl: '../../templates/projects/index.html',
controller: 'ProjectsController' controller: 'ProjectsController'
} }
}, },
@ -267,7 +267,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects/new', url: '/projects/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/projects/new.html'), templateUrl: '../../templates/projects/new.html',
controller: 'NewProjectController' controller: 'NewProjectController'
} }
}, },
@ -279,7 +279,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects/:id', url: '/projects/:id',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/projects/show.html'), templateUrl: '../../templates/projects/show.html',
controller: 'ShowProjectController' controller: 'ShowProjectController'
} }
}, },
@ -292,7 +292,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects/:id/edit', url: '/projects/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/projects/edit.html'), templateUrl: '../../templates/projects/edit.html',
controller: 'EditProjectController' controller: 'EditProjectController'
} }
}, },
@ -307,7 +307,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines', url: '/machines',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/machines/index.html'), templateUrl: '../../templates/machines/index.html',
controller: 'MachinesController' controller: 'MachinesController'
} }
}, },
@ -320,7 +320,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/new', url: '/machines/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/machines/new.html'), templateUrl: '../../templates/machines/new.html',
controller: 'NewMachineController' controller: 'NewMachineController'
} }
} }
@ -329,7 +329,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/:id', url: '/machines/:id',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/machines/show.html'), templateUrl: '../../templates/machines/show.html',
controller: 'ShowMachineController' controller: 'ShowMachineController'
} }
}, },
@ -341,7 +341,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/:id/reserve', url: '/machines/:id/reserve',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/machines/reserve.html'), templateUrl: '../../templates/machines/reserve.html',
controller: 'ReserveMachineController' controller: 'ReserveMachineController'
} }
}, },
@ -362,7 +362,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/:id/edit', url: '/machines/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/machines/edit.html'), templateUrl: '../../templates/machines/edit.html',
controller: 'EditMachineController' controller: 'EditMachineController'
} }
}, },
@ -377,7 +377,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule, abstract: !Fablab.spacesModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/spaces/index.html'), templateUrl: '../../templates/spaces/index.html',
controller: 'SpacesController' controller: 'SpacesController'
} }
}, },
@ -391,7 +391,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule, abstract: !Fablab.spacesModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/spaces/new.html'), templateUrl: '../../templates/spaces/new.html',
controller: 'NewSpaceController' controller: 'NewSpaceController'
} }
} }
@ -401,7 +401,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule, abstract: !Fablab.spacesModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/spaces/show.html'), templateUrl: '../../templates/spaces/show.html',
controller: 'ShowSpaceController' controller: 'ShowSpaceController'
} }
}, },
@ -414,7 +414,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule, abstract: !Fablab.spacesModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/spaces/edit.html'), templateUrl: '../../templates/spaces/edit.html',
controller: 'EditSpaceController' controller: 'EditSpaceController'
} }
}, },
@ -427,7 +427,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule, abstract: !Fablab.spacesModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/spaces/reserve.html'), templateUrl: '../../templates/spaces/reserve.html',
controller: 'ReserveSpaceController' controller: 'ReserveSpaceController'
} }
}, },
@ -451,7 +451,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings', url: '/trainings',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/trainings/index.html'), templateUrl: '../../templates/trainings/index.html',
controller: 'TrainingsController' controller: 'TrainingsController'
} }
}, },
@ -463,7 +463,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings/:id', url: '/trainings/:id',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/trainings/show.html'), templateUrl: '../../templates/trainings/show.html',
controller: 'ShowTrainingController' controller: 'ShowTrainingController'
} }
}, },
@ -475,7 +475,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings/:id/reserve', url: '/trainings/:id/reserve',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/trainings/reserve.html'), templateUrl: '../../templates/trainings/reserve.html',
controller: 'ReserveTrainingController' controller: 'ReserveTrainingController'
} }
}, },
@ -501,7 +501,7 @@ angular.module('application.router', ['ui.router'])
url: '/notifications', url: '/notifications',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/notifications/index.html'), templateUrl: '../../templates/notifications/index.html',
controller: 'NotificationsController' controller: 'NotificationsController'
} }
} }
@ -513,7 +513,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.plansModule, abstract: !Fablab.plansModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/plans/index.html'), templateUrl: '../../templates/plans/index.html',
controller: 'PlansIndexController' controller: 'PlansIndexController'
} }
}, },
@ -530,7 +530,7 @@ angular.module('application.router', ['ui.router'])
url: '/events', url: '/events',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/events/index.html'), templateUrl: '../../templates/events/index.html',
controller: 'EventsController' controller: 'EventsController'
} }
}, },
@ -545,7 +545,7 @@ angular.module('application.router', ['ui.router'])
url: '/events/:id', url: '/events/:id',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/events/show.html'), templateUrl: '../../templates/events/show.html',
controller: 'ShowEventController' controller: 'ShowEventController'
} }
}, },
@ -561,7 +561,7 @@ angular.module('application.router', ['ui.router'])
url: '/calendar', url: '/calendar',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/calendar/calendar.html'), templateUrl: '../../templates/calendar/calendar.html',
controller: 'CalendarController' controller: 'CalendarController'
} }
}, },
@ -581,7 +581,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/calendar', url: '/admin/calendar',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/calendar/calendar.html'), templateUrl: '../../templates/admin/calendar/calendar.html',
controller: 'AdminCalendarController' controller: 'AdminCalendarController'
} }
}, },
@ -598,7 +598,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/calendar/icalendar', url: '/admin/calendar/icalendar',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/calendar/icalendar.html'), templateUrl: '../../templates/admin/calendar/icalendar.html',
controller: 'AdminICalendarController' controller: 'AdminICalendarController'
} }
}, },
@ -612,7 +612,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/projects', url: '/admin/projects',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/projects/index.html'), templateUrl: '../../templates/admin/projects/index.html',
controller: 'AdminProjectsController' controller: 'AdminProjectsController'
} }
}, },
@ -632,7 +632,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/abuses', url: '/admin/abuses',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/abuses/index.html'), templateUrl: '../../templates/admin/abuses/index.html',
controller: 'AbusesController' controller: 'AbusesController'
} }
}, },
@ -646,7 +646,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/trainings', url: '/admin/trainings',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/trainings/index.html'), templateUrl: '../../templates/admin/trainings/index.html',
controller: 'TrainingsAdminController' controller: 'TrainingsAdminController'
} }
}, },
@ -660,7 +660,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/trainings/new', url: '/admin/trainings/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/trainings/new.html'), templateUrl: '../../templates/admin/trainings/new.html',
controller: 'NewTrainingController' controller: 'NewTrainingController'
} }
}, },
@ -672,7 +672,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/trainings/:id/edit', url: '/admin/trainings/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/trainings/edit.html'), templateUrl: '../../templates/admin/trainings/edit.html',
controller: 'EditTrainingController' controller: 'EditTrainingController'
} }
}, },
@ -686,7 +686,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events', url: '/admin/events',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/events/index.html'), templateUrl: '../../templates/admin/events/index.html',
controller: 'AdminEventsController' controller: 'AdminEventsController'
} }
}, },
@ -703,7 +703,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events/new', url: '/admin/events/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/events/new.html'), templateUrl: '../../templates/events/new.html',
controller: 'NewEventController' controller: 'NewEventController'
} }
}, },
@ -718,7 +718,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events/:id/edit', url: '/admin/events/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/events/edit.html'), templateUrl: '../../templates/events/edit.html',
controller: 'EditEventController' controller: 'EditEventController'
} }
}, },
@ -734,7 +734,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events/:id/reservations', url: '/admin/events/:id/reservations',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/events/reservations.html'), templateUrl: '../../templates/admin/events/reservations.html',
controller: 'ShowEventReservationsController' controller: 'ShowEventReservationsController'
} }
}, },
@ -749,7 +749,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/pricing', url: '/admin/pricing',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/pricing/index.html'), templateUrl: '../../templates/admin/pricing/index.html',
controller: 'EditPricingController' controller: 'EditPricingController'
} }
}, },
@ -783,7 +783,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/plans/new', url: '/admin/plans/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/plans/new.html'), templateUrl: '../../templates/admin/plans/new.html',
controller: 'NewPlanController' controller: 'NewPlanController'
} }
} }
@ -792,7 +792,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/plans/:id/edit', url: '/admin/plans/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/plans/edit.html'), templateUrl: '../../templates/admin/plans/edit.html',
controller: 'EditPlanController' controller: 'EditPlanController'
} }
}, },
@ -809,7 +809,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/coupons/new', url: '/admin/coupons/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/coupons/new.html'), templateUrl: '../../templates/admin/coupons/new.html',
controller: 'NewCouponController' controller: 'NewCouponController'
} }
} }
@ -818,7 +818,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/coupons/:id/edit', url: '/admin/coupons/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/coupons/edit.html'), templateUrl: '../../templates/admin/coupons/edit.html',
controller: 'EditCouponController' controller: 'EditCouponController'
} }
}, },
@ -832,7 +832,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/invoices', url: '/admin/invoices',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/invoices/index.html'), templateUrl: '../../templates/admin/invoices/index.html',
controller: 'InvoicesController' controller: 'InvoicesController'
} }
}, },
@ -865,19 +865,19 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members', url: '/admin/members',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/members/index.html'), templateUrl: '../../templates/admin/members/index.html',
controller: 'AdminMembersController' controller: 'AdminMembersController'
}, },
'groups@app.admin.members': { 'groups@app.admin.members': {
template: require('../../templates/admin/groups/index.html'), templateUrl: '../../templates/admin/groups/index.html',
controller: 'GroupsController' controller: 'GroupsController'
}, },
'tags@app.admin.members': { 'tags@app.admin.members': {
template: require('../../templates/admin/tags/index.html'), templateUrl: '../../templates/admin/tags/index.html',
controller: 'TagsController' controller: 'TagsController'
}, },
'authentification@app.admin.members': { 'authentification@app.admin.members': {
template: require('../../templates/admin/authentications/index.html'), templateUrl: '../../templates/admin/authentications/index.html',
controller: 'AuthentificationController' controller: 'AuthentificationController'
} }
}, },
@ -896,7 +896,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/new', url: '/admin/members/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/members/new.html'), templateUrl: '../../templates/admin/members/new.html',
controller: 'NewMemberController' controller: 'NewMemberController'
} }
}, },
@ -908,7 +908,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/import', url: '/admin/members/import',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/members/import.html'), templateUrl: '../../templates/admin/members/import.html',
controller: 'ImportMembersController' controller: 'ImportMembersController'
} }
}, },
@ -920,7 +920,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/import/:id/results', url: '/admin/members/import/:id/results',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/members/import_result.html'), templateUrl: '../../templates/admin/members/import_result.html',
controller: 'ImportMembersResultController' controller: 'ImportMembersResultController'
} }
}, },
@ -932,7 +932,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/:id/edit', url: '/admin/members/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/members/edit.html'), templateUrl: '../../templates/admin/members/edit.html',
controller: 'EditMemberController' controller: 'EditMemberController'
} }
}, },
@ -949,7 +949,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/admins/new', url: '/admin/admins/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/admins/new.html'), templateUrl: '../../templates/admin/admins/new.html',
controller: 'NewAdminController' controller: 'NewAdminController'
} }
}, },
@ -961,7 +961,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/managers/new', url: '/admin/managers/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/managers/new.html'), templateUrl: '../../templates/admin/managers/new.html',
controller: 'NewManagerController' controller: 'NewManagerController'
} }
}, },
@ -976,7 +976,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/authentications/new', url: '/admin/authentications/new',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/authentications/new.html'), templateUrl: '../../templates/admin/authentications/new.html',
controller: 'NewAuthenticationController' controller: 'NewAuthenticationController'
} }
}, },
@ -989,7 +989,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/authentications/:id/edit', url: '/admin/authentications/:id/edit',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/authentications/edit.html'), templateUrl: '../../templates/admin/authentications/edit.html',
controller: 'EditAuthenticationController' controller: 'EditAuthenticationController'
} }
}, },
@ -1005,7 +1005,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.statisticsModule, abstract: !Fablab.statisticsModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/statistics/index.html'), templateUrl: '../../templates/admin/statistics/index.html',
controller: 'StatisticsController' controller: 'StatisticsController'
} }
}, },
@ -1020,7 +1020,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.statisticsModule, abstract: !Fablab.statisticsModule,
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/statistics/graphs.html'), templateUrl: '../../templates/admin/statistics/graphs.html',
controller: 'GraphsController' controller: 'GraphsController'
} }
} }
@ -1031,7 +1031,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/settings', url: '/admin/settings',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/settings/index.html'), templateUrl: '../../templates/admin/settings/index.html',
controller: 'SettingsController' controller: 'SettingsController'
} }
}, },
@ -1064,7 +1064,7 @@ angular.module('application.router', ['ui.router'])
url: '/open_api_clients', url: '/open_api_clients',
views: { views: {
'main@': { 'main@': {
template: require('../../templates/admin/open_api_clients/index.html.erb'), templateUrl: '../../templates/admin/open_api_clients/index.html.erb',
controller: 'OpenAPIClientsController' controller: 'OpenAPIClientsController'
} }
}, },

View File

@ -4,7 +4,7 @@ Application.Services.factory('dialogs', ['$uibModal', function ($uibModal) {
return ({ return ({
confirm (options, success, error) { confirm (options, success, error) {
const defaultOpts = { const defaultOpts = {
template: require('../../../templates/shared/confirm_modal.html'), templateUrl: '../../../templates/shared/confirm_modal.html',
size: 'sm', size: 'sm',
resolve: { resolve: {
object () { object () {

View File

@ -34,7 +34,7 @@ Application.Services.factory('Help', ['$rootScope', '$uibModal', '$state', 'Auth
$uibModal.open({ $uibModal.open({
animation: true, animation: true,
template: require('../../../templates/shared/help_modal.html'), templateUrl: '../../../templates/shared/help_modal.html',
resolve: { resolve: {
tourName: function () { return tourName; } tourName: function () { return tourName; }
}, },

View File

@ -1,12 +1,14 @@
const { environment } = require('@rails/webpacker'); const { environment } = require('@rails/webpacker');
const webpack = require('webpack');
const path = require('path');
const htmlErb = require('./loaders/html_erb'); const htmlErb = require('./loaders/html_erb');
const js = require('./loaders/js'); const js = require('./loaders/js');
const jsErb = require('./loaders/js_erb'); const jsErb = require('./loaders/js_erb');
const sass = require('./loaders/sass'); const sass = require('./loaders/sass');
const sassErb = require('./loaders/sass_erb'); const sassErb = require('./loaders/sass_erb');
const html = require('./loaders/html'); const html = require('./loaders/html');
const webpack = require('webpack'); const uiTour = require('./loaders/ui-tour');
const path = require('path');
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({ environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
$: 'jquery', $: 'jquery',
@ -25,6 +27,7 @@ environment.loaders.prepend('sass-erb', sassErb);
environment.loaders.prepend('js', js); environment.loaders.prepend('js', js);
environment.loaders.append('html', html); environment.loaders.append('html', html);
environment.loaders.append('sass', sass); environment.loaders.append('sass', sass);
environment.loaders.append('uiTour', uiTour);
environment.splitChunks(); environment.splitChunks();

View File

@ -5,7 +5,7 @@ module.exports = {
{ {
loader: 'auto-ngtemplate-loader', loader: 'auto-ngtemplate-loader',
options: { options: {
pathResolver: (p) => p.replace(/src\/javascript\/.*$/, 'templates') pathResolver: (p) => p.replace(/src\/javascript\/.*$/, 'templates/')
} }
} }
] ]

View File

@ -0,0 +1,17 @@
const path = require('path');
module.exports = {
test: /angular-ui-tour\/.*\.html$/i,
use: [
{
loader: 'ngtemplate-loader',
options: {
relativeTo: path.join(__dirname, '../../../node_modules/angular-ui-tour/app/templates'),
requireAngular: true
}
},
{
loader: 'html-loader'
}
]
};