diff --git a/app/frontend/packs/application.js b/app/frontend/packs/application.js index 224b2b983..1c52fcabd 100644 --- a/app/frontend/packs/application.js +++ b/app/frontend/packs/application.js @@ -68,14 +68,13 @@ import 'tether/dist/js/tether'; import 'angular-bind-html-compile/angular-bind-html-compile'; import 'angular-ui-tour/dist/angular-ui-tour'; -import '../src/app.js'; -import '../src/router.js.erb'; -import '../src/controllers/*'; -import '../src/services/*'; -import '../src/directives/*'; -import '../src/filters/*'; +import '../src/javascript/app.js'; +import '../src/javascript/router.js.erb'; +import '../src/javascript/controllers/*'; +import '../src/javascript/services/*'; +import '../src/javascript/directives/*'; +import '../src/javascript/filters/*'; +import '../src/javascript/plugins.js.erb'; -import '../stylesheets/application.scss.erb'; - -const images = require.context('../images', true); -const imagePath = (name) => images(name, true); +require.context('../images', true); +require.context('../templates', true); diff --git a/app/frontend/packs/application.scss b/app/frontend/packs/application.scss index e69de29bb..f24c3331e 100644 --- a/app/frontend/packs/application.scss +++ b/app/frontend/packs/application.scss @@ -0,0 +1,18 @@ + +@import '~ui-select/dist/select'; +@import '~fullcalendar/dist/fullcalendar'; +@import '~jasny-bootstrap/dist/css/jasny-bootstrap'; +@import '~angular-growl-v2/build/angular-growl'; +@import '~angular-xeditable/dist/css/xeditable'; +@import '~angular-loading-bar/build/loading-bar'; +@import '~nvd3/build/nv.d3'; +@import '~font-awesome'; +@import '~medium-editor/dist/css/medium-editor'; +@import '~medium-editor/dist/css/themes/default'; +@import '~bootstrap-switch/dist/css/bootstrap3/bootstrap-switch'; +@import '~summernote/dist/summernote'; +@import '~jquery-minicolors/jquery.minicolors.css'; +@import '~angular-aside/dist/css/angular-aside'; +@import '~codemirror/lib/codemirror'; + +@import '../src/stylesheets/application.scss.erb'; diff --git a/app/frontend/packs/printer.scss b/app/frontend/packs/printer.scss index e69de29bb..3217d3129 100644 --- a/app/frontend/packs/printer.scss +++ b/app/frontend/packs/printer.scss @@ -0,0 +1,2 @@ + +@import '../src/stylesheets/app.printer'; diff --git a/app/frontend/src/javascript/controllers/admin/authentications.js.erb b/app/frontend/src/javascript/controllers/admin/authentications.js.erb index 9736b265d..dc5f39361 100644 --- a/app/frontend/src/javascript/controllers/admin/authentications.js.erb +++ b/app/frontend/src/javascript/controllers/admin/authentications.js.erb @@ -87,7 +87,7 @@ class AuthenticationController { */ $scope.defineDataMapping = function (mapping) { $uibModal.open({ - templateUrl: '<%= asset_path "admin/authentications/_data_mapping.html" %>', + templateUrl: '<%= asset_pack_path "admin/authentications/_data_mapping.html" %>', size: 'md', resolve: { field () { return mapping; }, diff --git a/app/frontend/src/javascript/controllers/admin/calendar.js.erb b/app/frontend/src/javascript/controllers/admin/calendar.js.erb index 012f497eb..d04904536 100644 --- a/app/frontend/src/javascript/controllers/admin/calendar.js.erb +++ b/app/frontend/src/javascript/controllers/admin/calendar.js.erb @@ -273,7 +273,7 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state // open a confirmation dialog const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "admin/calendar/deleteRecurrent.html" %>', + templateUrl: '<%= asset_pack_path "admin/calendar/deleteRecurrent.html" %>', size: 'md', controller: 'DeleteRecurrentAvailabilityController', 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 const modalInstance = $uibModal.open({ - templateUrl: '<%= asset_path "admin/calendar/eventModal.html" %>', + templateUrl: '<%= asset_pack_path "admin/calendar/eventModal.html" %>', controller: 'CreateEventModalController', backdrop: 'static', keyboard: false, diff --git a/app/frontend/src/javascript/controllers/admin/events.js.erb b/app/frontend/src/javascript/controllers/admin/events.js.erb index b57151086..4e4442176 100644 --- a/app/frontend/src/javascript/controllers/admin/events.js.erb +++ b/app/frontend/src/javascript/controllers/admin/events.js.erb @@ -279,7 +279,7 @@ Application.Controllers.controller('AdminEventsController', ['$scope', '$state', */ $scope.newPriceCategory = function () { $uibModal.open({ - templateUrl: '<%= asset_path "admin/events/price_form.html" %>', + templateUrl: '<%= asset_pack_path "admin/events/price_form.html" %>', size: 'md', resolve: { category () { return {}; } @@ -307,7 +307,7 @@ Application.Controllers.controller('AdminEventsController', ['$scope', '$state', return growl.error(_t('app.admin.events.unexpected_error_occurred_please_refresh')); } else { return $uibModal.open({ - templateUrl: '<%= asset_path "admin/events/price_form.html" %>', + templateUrl: '<%= asset_pack_path "admin/events/price_form.html" %>', size: 'md', resolve: { category () { return $scope.priceCategories[index]; } @@ -645,7 +645,7 @@ Application.Controllers.controller('EditEventController', ['$scope', '$state', ' // open a choice edit-mode dialog const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "events/editRecurrent.html" %>', + templateUrl: '<%= asset_pack_path "events/editRecurrent.html" %>', size: 'md', controller: 'EditRecurrentEventController', resolve: { diff --git a/app/frontend/src/javascript/controllers/admin/invoices.js.erb b/app/frontend/src/javascript/controllers/admin/invoices.js.erb index ecbc2017b..31ed3b71b 100644 --- a/app/frontend/src/javascript/controllers/admin/invoices.js.erb +++ b/app/frontend/src/javascript/controllers/admin/invoices.js.erb @@ -220,7 +220,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I $scope.generateAvoirForInvoice = function (invoice) { // open modal const modalInstance = $uibModal.open({ - templateUrl: '<%= asset_path "admin/invoices/avoirModal.html" %>', + templateUrl: '<%= asset_pack_path "admin/invoices/avoirModal.html" %>', controller: 'AvoirModalController', resolve: { invoice () { return invoice; }, @@ -579,7 +579,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I $scope.closeAnAccountingPeriod = function() { // open modal $uibModal.open({ - templateUrl: '<%= asset_path "admin/invoices/closePeriodModal.html" %>', + templateUrl: '<%= asset_pack_path "admin/invoices/closePeriodModal.html" %>', controller: 'ClosePeriodModalController', backdrop: 'static', keyboard: false, @@ -593,7 +593,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I $scope.toggleExportModal = function() { $uibModal.open({ - templateUrl: '<%= asset_path "admin/invoices/accountingExportModal.html" %>', + templateUrl: '<%= asset_pack_path "admin/invoices/accountingExportModal.html" %>', controller: 'AccountingExportModalController', size: 'xl' }); diff --git a/app/frontend/src/javascript/controllers/admin/members.js.erb b/app/frontend/src/javascript/controllers/admin/members.js.erb index b4dbd8333..add9bf212 100644 --- a/app/frontend/src/javascript/controllers/admin/members.js.erb +++ b/app/frontend/src/javascript/controllers/admin/members.js.erb @@ -236,7 +236,7 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce', $scope.openPartnerNewModal = function () { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "shared/_partner_new_modal.html" %>', + templateUrl: '<%= asset_pack_path "shared/_partner_new_modal.html" %>', size: 'lg', controller: ['$scope', '$uibModalInstance', 'User', function ($scope, $uibModalInstance, User) { $scope.partner = {}; @@ -702,7 +702,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state', $scope.changeUserRole = function() { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "admin/members/change_role_modal.html" %>', + templateUrl: '<%= asset_pack_path "admin/members/change_role_modal.html" %>', size: 'lg', resolve: { user() { return $scope.user; } @@ -750,7 +750,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state', $scope.updateSubscriptionModal = function (subscription, free) { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "admin/subscriptions/expired_at_modal.html" %>', + templateUrl: '<%= asset_pack_path "admin/subscriptions/expired_at_modal.html" %>', size: 'lg', controller: ['$scope', '$uibModalInstance', 'Subscription', function ($scope, $uibModalInstance, Subscription) { $scope.new_expired_at = angular.copy(subscription.expired_at); @@ -797,7 +797,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state', $scope.createSubscriptionModal = function (user, plans) { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "admin/subscriptions/create_modal.html" %>', + templateUrl: '<%= asset_pack_path "admin/subscriptions/create_modal.html" %>', size: 'lg', controller: ['$scope', '$uibModalInstance', 'Subscription', 'Group', function ($scope, $uibModalInstance, Subscription, Group) { // selected user @@ -845,7 +845,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state', $scope.createWalletCreditModal = function (user, wallet) { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "wallet/credit_modal.html" %>', + templateUrl: '<%= asset_pack_path "wallet/credit_modal.html" %>', controller: ['$scope', '$uibModalInstance', 'Wallet', function ($scope, $uibModalInstance, Wallet) { // default: do not generate a refund invoice $scope.generate_avoir = false; diff --git a/app/frontend/src/javascript/controllers/admin/plans.js.erb b/app/frontend/src/javascript/controllers/admin/plans.js.erb index a86ab8da8..d7c88a57c 100644 --- a/app/frontend/src/javascript/controllers/admin/plans.js.erb +++ b/app/frontend/src/javascript/controllers/admin/plans.js.erb @@ -106,7 +106,7 @@ Application.Controllers.controller('NewPlanController', ['$scope', '$uibModal', $scope.openPartnerNewModal = function (subscription) { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "shared/_partner_new_modal.html" %>', + templateUrl: '<%= asset_pack_path "shared/_partner_new_modal.html" %>', size: 'lg', controller: ['$scope', '$uibModalInstance', 'User', function ($scope, $uibModalInstance, User) { $scope.partner = {}; diff --git a/app/frontend/src/javascript/controllers/admin/pricing.js.erb b/app/frontend/src/javascript/controllers/admin/pricing.js.erb index c9dfebbb5..ba95a990a 100644 --- a/app/frontend/src/javascript/controllers/admin/pricing.js.erb +++ b/app/frontend/src/javascript/controllers/admin/pricing.js.erb @@ -570,7 +570,7 @@ Application.Controllers.controller('EditPricingController', ['$scope', '$state', */ $scope.sendCouponToUser = function (coupon) { $uibModal.open({ - templateUrl: '<%= asset_path "admin/pricing/sendCoupon.html" %>', + templateUrl: '<%= asset_pack_path "admin/pricing/sendCoupon.html" %>', resolve: { coupon () { return coupon; } }, diff --git a/app/frontend/src/javascript/controllers/admin/settings.js.erb b/app/frontend/src/javascript/controllers/admin/settings.js.erb index 4ad80dfe2..2b7aefc48 100644 --- a/app/frontend/src/javascript/controllers/admin/settings.js.erb +++ b/app/frontend/src/javascript/controllers/admin/settings.js.erb @@ -173,7 +173,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$rootScope' $scope.savePrivacyPolicy = function () { // open modal const modalInstance = $uibModal.open({ - templateUrl: '<%= asset_path "admin/settings/save_policy.html" %>', + templateUrl: '<%= asset_pack_path "admin/settings/save_policy.html" %>', controller: 'SavePolicyController', resolve: { saveCb () { return $scope.save; }, @@ -274,7 +274,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$rootScope' */ $scope.analyticsModal = function() { $uibModal.open({ - templateUrl: '<%= asset_path "admin/settings/analyticsModal.html" %>', + templateUrl: '<%= asset_pack_path "admin/settings/analyticsModal.html" %>', controller: 'AnalyticsModalController', size: 'lg', resolve: { diff --git a/app/frontend/src/javascript/controllers/admin/statistics.js.erb b/app/frontend/src/javascript/controllers/admin/statistics.js.erb index 5f7f55cf0..0841ea68f 100644 --- a/app/frontend/src/javascript/controllers/admin/statistics.js.erb +++ b/app/frontend/src/javascript/controllers/admin/statistics.js.erb @@ -311,7 +311,7 @@ Application.Controllers.controller('StatisticsController', ['$scope', '$state', */ $scope.exportToExcel = function () { const options = { - templateUrl: '<%= asset_path "admin/statistics/export.html" %>', + templateUrl: '<%= asset_pack_path "admin/statistics/export.html" %>', size: 'sm', controller: 'ExportStatisticsController', resolve: { diff --git a/app/frontend/src/javascript/controllers/admin/trainings.js.erb b/app/frontend/src/javascript/controllers/admin/trainings.js.erb index 5bc65349d..385897b36 100644 --- a/app/frontend/src/javascript/controllers/admin/trainings.js.erb +++ b/app/frontend/src/javascript/controllers/admin/trainings.js.erb @@ -221,7 +221,7 @@ Application.Controllers.controller('TrainingsAdminController', ['$scope', '$stat */ $scope.showReservations = function (training, availability) { $uibModal.open({ - templateUrl: '<%= asset_path "admin/trainings/validTrainingModal.html" %>', + templateUrl: '<%= asset_pack_path "admin/trainings/validTrainingModal.html" %>', controller: ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) { $scope.availability = availability; diff --git a/app/frontend/src/javascript/controllers/application.js.erb b/app/frontend/src/javascript/controllers/application.js.erb index 206e74a09..d76e085fa 100644 --- a/app/frontend/src/javascript/controllers/application.js.erb +++ b/app/frontend/src/javascript/controllers/application.js.erb @@ -89,7 +89,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco <% else %> return $uibModal.open({ - templateUrl: '<%= asset_path "shared/signupModal.html" %>', + templateUrl: '<%= asset_pack_path "shared/signupModal.html" %>', size: 'md', resolve: { 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) { $uibModal.open({ - templateUrl: '<%= asset_path "shared/passwordEditModal.html" %>', + templateUrl: '<%= asset_pack_path "shared/passwordEditModal.html" %>', size: 'md', controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { $scope.user = { reset_password_token: token }; @@ -282,7 +282,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco if ($rootScope.currentUser.role !== 'admin') return; $uibModal.open({ - templateUrl: '<%= asset_path "admin/versions/upgradeModal.html" %>', + templateUrl: '<%= asset_pack_path "admin/versions/upgradeModal.html" %>', controller: 'VersionModalController', resolve: { version() { return $scope.version; } @@ -407,7 +407,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco $window.location.href = '/sso-redirect'; <% else %> return $uibModal.open({ - templateUrl: '<%= asset_path "shared/deviseModal.html" %>', + templateUrl: '<%= asset_pack_path "shared/deviseModal.html" %>', size: 'sm', resolve: { 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') { // open the 'reset password' modal return $uibModal.open({ - templateUrl: '<%= asset_path "shared/passwordNewModal.html" %>', + templateUrl: '<%= asset_pack_path "shared/passwordNewModal.html" %>', size: 'sm', controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { $scope.user = { email: '' }; @@ -488,7 +488,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco } else if (reason === 'confirmationNew') { // open the 'reset password' modal return $uibModal.open({ - templateUrl: '<%= asset_path "shared/ConfirmationNewModal.html" %>', + templateUrl: '<%= asset_pack_path "shared/ConfirmationNewModal.html" %>', size: 'sm', controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) { $scope.user = { email: '' }; diff --git a/app/frontend/src/javascript/controllers/events.js.erb b/app/frontend/src/javascript/controllers/events.js.erb index 42c140a05..089c02f4b 100644 --- a/app/frontend/src/javascript/controllers/events.js.erb +++ b/app/frontend/src/javascript/controllers/events.js.erb @@ -186,7 +186,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', ' // open a confirmation dialog const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "events/deleteRecurrent.html" %>', + templateUrl: '<%= asset_pack_path "events/deleteRecurrent.html" %>', size: 'md', controller: 'DeleteRecurrentEventController', resolve: { @@ -416,7 +416,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', ' $scope.modifyReservation = function (reservation) { const index = $scope.reservations.indexOf(reservation); return $uibModal.open({ - templateUrl: '<%= asset_path "events/modify_event_reservation_modal.html" %>', + templateUrl: '<%= asset_pack_path "events/modify_event_reservation_modal.html" %>', resolve: { event () { return $scope.event; }, reservation () { return reservation; } @@ -671,7 +671,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', ' */ const payByStripe = function (reservation) { $uibModal.open({ - templateUrl: '<%= asset_path "stripe/payment_modal.html" %>', + templateUrl: '<%= asset_pack_path "stripe/payment_modal.html" %>', size: 'md', resolve: { reservation () { @@ -739,7 +739,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', ' */ const payOnSite = function (reservation) { $uibModal.open({ - templateUrl: '<%= asset_path "shared/valid_reservation_modal.html" %>', + templateUrl: '<%= asset_pack_path "shared/valid_reservation_modal.html" %>', size: 'sm', resolve: { reservation () { @@ -858,7 +858,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', ' const showReserveSlotSameTimeModal = function(sameTimeReservations, callback) { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "shared/_reserve_slot_same_time.html" %>', + templateUrl: '<%= asset_pack_path "shared/_reserve_slot_same_time.html" %>', size: 'md', controller: 'ReserveSlotSameTimeController', resolve: { diff --git a/app/frontend/src/javascript/controllers/machines.js.erb b/app/frontend/src/javascript/controllers/machines.js.erb index 831d891c1..dec6560c2 100644 --- a/app/frontend/src/javascript/controllers/machines.js.erb +++ b/app/frontend/src/javascript/controllers/machines.js.erb @@ -121,7 +121,7 @@ const _reserveMachine = function (machine, e) { // the training before he can book the reservation if (machine.current_user_training_reservation) { return _this.$uibModal.open({ - templateUrl: '<%= asset_path "machines/training_reservation_modal.html" %>', + templateUrl: '<%= asset_pack_path "machines/training_reservation_modal.html" %>', controller: ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) { $scope.machine = machine; return $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); }; @@ -136,7 +136,7 @@ const _reserveMachine = function (machine, e) { // otherwise open the information modal } else { return _this.$uibModal.open({ - templateUrl: '<%= asset_path "machines/request_training_modal.html" %>', + templateUrl: '<%= asset_pack_path "machines/request_training_modal.html" %>', controller: ['$scope', '$uibModalInstance', '$state', function ($scope, $uibModalInstance, $state) { $scope.machine = machine; $scope.member = _this.$scope.currentUser; diff --git a/app/frontend/src/javascript/controllers/plans.js.erb b/app/frontend/src/javascript/controllers/plans.js.erb index 2033d2ad4..21a1384f2 100644 --- a/app/frontend/src/javascript/controllers/plans.js.erb +++ b/app/frontend/src/javascript/controllers/plans.js.erb @@ -235,7 +235,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop */ const payByStripe = function () { $uibModal.open({ - templateUrl: '<%= asset_path "stripe/payment_modal.html" %>', + templateUrl: '<%= asset_pack_path "stripe/payment_modal.html" %>', size: 'md', resolve: { selectedPlan () { return $scope.selectedPlan; }, @@ -299,7 +299,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop */ const payOnSite = function () { $uibModal.open({ - templateUrl: '<%= asset_path "plans/payment_modal.html" %>', + templateUrl: '<%= asset_pack_path "plans/payment_modal.html" %>', size: 'sm', resolve: { selectedPlan () { return $scope.selectedPlan; }, diff --git a/app/frontend/src/javascript/controllers/profile.js.erb b/app/frontend/src/javascript/controllers/profile.js.erb index df7f6ea78..4a772c343 100644 --- a/app/frontend/src/javascript/controllers/profile.js.erb +++ b/app/frontend/src/javascript/controllers/profile.js.erb @@ -167,7 +167,7 @@ Application.Controllers.controller('CompleteProfileController', ['$scope', '$roo event.stopPropagation(); dialogs.confirm( { - templateUrl: '<%= asset_path "profile/resend_code_modal.html" %>', + templateUrl: '<%= asset_pack_path "profile/resend_code_modal.html" %>', resolve: { object () { return { email: memberPromise.email }; diff --git a/app/frontend/src/javascript/controllers/projects.js.erb b/app/frontend/src/javascript/controllers/projects.js.erb index 3a6946276..2edb41754 100644 --- a/app/frontend/src/javascript/controllers/projects.js.erb +++ b/app/frontend/src/javascript/controllers/projects.js.erb @@ -587,7 +587,7 @@ Application.Controllers.controller('ShowProjectController', ['$scope', '$state', if (e) { e.preventDefault(); } $uibModal.open({ - templateUrl: '<%= asset_path "shared/signalAbuseModal.html" %>', + templateUrl: '<%= asset_pack_path "shared/signalAbuseModal.html" %>', size: 'md', resolve: { project () { return $scope.project; } diff --git a/app/frontend/src/javascript/directives/cart.js.erb b/app/frontend/src/javascript/directives/cart.js.erb index f3085bb84..ae6010a17 100644 --- a/app/frontend/src/javascript/directives/cart.js.erb +++ b/app/frontend/src/javascript/directives/cart.js.erb @@ -39,7 +39,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs', reservableName: '@', limitToOneSlot: '@' }, - templateUrl: '<%= asset_path "shared/_cart.html" %>', + templateUrl: '<%= asset_pack_path "shared/_cart.html" %>', link ($scope, element, attributes) { // will store the user's plan if he choosed to buy one $scope.selectedPlan = null; @@ -174,7 +174,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs', } else { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "shared/_reserve_slot_without_plan.html" %>', + templateUrl: '<%= asset_pack_path "shared/_reserve_slot_without_plan.html" %>', size: 'md', controller: 'ReserveSlotWithoutPlanController', resolve: { @@ -318,7 +318,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs', // ask confirmation const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "shared/_reserve_slot_tags_mismatch.html" %>', + templateUrl: '<%= asset_pack_path "shared/_reserve_slot_tags_mismatch.html" %>', size: 'md', controller: 'ReserveSlotTagsMismatchController', resolve: { @@ -357,7 +357,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs', if (sameTimeReservations.length > 0) { const modalInstance = $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "shared/_reserve_slot_same_time.html" %>', + templateUrl: '<%= asset_pack_path "shared/_reserve_slot_same_time.html" %>', size: 'md', controller: 'ReserveSlotSameTimeController', resolve: { @@ -447,7 +447,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs', $scope.slot.cancelable = slotCanBeCanceled($scope.slot); // -> then, we open a dialog to ask to the user to choose an action return dialogs.confirm({ - templateUrl: '<%= asset_path "shared/confirm_modify_slot_modal.html" %>', + templateUrl: '<%= asset_pack_path "shared/confirm_modify_slot_modal.html" %>', resolve: { object () { return $scope.slot; } } @@ -612,7 +612,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs', */ const payByStripe = function (reservation) { $uibModal.open({ - templateUrl: '<%= asset_path "stripe/payment_modal.html" %>', + templateUrl: '<%= asset_pack_path "stripe/payment_modal.html" %>', size: 'md', resolve: { reservation () { @@ -673,7 +673,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs', */ const payOnSite = function (reservation) { $uibModal.open({ - templateUrl: '<%= asset_path "shared/valid_reservation_modal.html" %>', + templateUrl: '<%= asset_pack_path "shared/valid_reservation_modal.html" %>', size: 'sm', resolve: { reservation () { diff --git a/app/frontend/src/javascript/directives/coupon.js.erb b/app/frontend/src/javascript/directives/coupon.js.erb index 0d8e6316a..958889b34 100644 --- a/app/frontend/src/javascript/directives/coupon.js.erb +++ b/app/frontend/src/javascript/directives/coupon.js.erb @@ -18,7 +18,7 @@ Application.Directives.directive('coupon', [ '$rootScope', 'Coupon', '_t', funct total: '=', userId: '@' }, - templateUrl: '<%= asset_path "shared/_coupon.html" %>', + templateUrl: '<%= asset_pack_path "shared/_coupon.html" %>', link ($scope, element, attributes) { // Whether code input is shown or not (ie. the link 'I have a coupon' is shown) $scope.code = diff --git a/app/frontend/src/javascript/directives/fab_user_avatar.js.erb b/app/frontend/src/javascript/directives/fab_user_avatar.js.erb index 4fdac5c1e..9adcff5a7 100644 --- a/app/frontend/src/javascript/directives/fab_user_avatar.js.erb +++ b/app/frontend/src/javascript/directives/fab_user_avatar.js.erb @@ -15,6 +15,6 @@ Application.Directives.directive('fabUserAvatar', [ function () { userAvatar: '=ngModel', avatarClass: '@' }, - templateUrl: '<%= asset_path "shared/_user_avatar.html" %>' + templateUrl: '<%= asset_pack_path "shared/_user_avatar.html" %>' }); }]); diff --git a/app/frontend/src/javascript/directives/home/events.js.erb b/app/frontend/src/javascript/directives/home/events.js.erb index aca43325a..2557efa62 100644 --- a/app/frontend/src/javascript/directives/home/events.js.erb +++ b/app/frontend/src/javascript/directives/home/events.js.erb @@ -2,7 +2,7 @@ Application.Directives.directive('events', [ 'Event', function (Event) { return ({ restrict: 'E', - templateUrl: '<%= asset_path "home/events.html" %>', + templateUrl: '<%= asset_pack_path "home/events.html" %>', link ($scope, element, attributes) { // The closest upcoming events $scope.upcomingEvents = null; diff --git a/app/frontend/src/javascript/directives/home/news.js.erb b/app/frontend/src/javascript/directives/home/news.js.erb index 06b8f56d7..c72e291ab 100644 --- a/app/frontend/src/javascript/directives/home/news.js.erb +++ b/app/frontend/src/javascript/directives/home/news.js.erb @@ -2,7 +2,7 @@ Application.Directives.directive('news', [ 'Setting', function (Setting) { return ({ restrict: 'E', - templateUrl: '<%= asset_path "home/news.html" %>', + templateUrl: '<%= asset_pack_path "home/news.html" %>', link ($scope, element, attributes) { // The admin blogpost $scope.homeBlogpost = null; diff --git a/app/frontend/src/javascript/directives/home/projects.js.erb b/app/frontend/src/javascript/directives/home/projects.js.erb index 1b7812dc1..4b5b4d066 100644 --- a/app/frontend/src/javascript/directives/home/projects.js.erb +++ b/app/frontend/src/javascript/directives/home/projects.js.erb @@ -2,7 +2,7 @@ Application.Directives.directive('projects', [ 'Project', function (Project) { return ({ restrict: 'E', - templateUrl: '<%= asset_path "home/projects.html" %>', + templateUrl: '<%= asset_pack_path "home/projects.html" %>', link ($scope, element, attributes) { // The last projects published/documented on the platform $scope.lastProjects = null; diff --git a/app/frontend/src/javascript/directives/home/twitter.js.erb b/app/frontend/src/javascript/directives/home/twitter.js.erb index 914852e7b..b9ee48b0c 100644 --- a/app/frontend/src/javascript/directives/home/twitter.js.erb +++ b/app/frontend/src/javascript/directives/home/twitter.js.erb @@ -8,7 +8,7 @@ Application.Directives.directive('twitter', ['Setting', function (Setting) { return ({ restrict: 'E', - templateUrl: '<%= asset_path "home/twitter.html" %>', + templateUrl: '<%= asset_pack_path "home/twitter.html" %>', link ($scope, element, attributes) { // Twitter username $scope.twitterName = null; diff --git a/app/frontend/src/javascript/directives/members.js.erb b/app/frontend/src/javascript/directives/members.js.erb index 24b195efd..c0e7ffafa 100644 --- a/app/frontend/src/javascript/directives/members.js.erb +++ b/app/frontend/src/javascript/directives/members.js.erb @@ -2,7 +2,7 @@ Application.Directives.directive('members', [ 'Member', function (Member) { return ({ restrict: 'E', - templateUrl: '<%= asset_path "home/members.html" %>', + templateUrl: '<%= asset_pack_path "home/members.html" %>', link ($scope, element, attributes) { // The last registered members who confirmed their addresses $scope.lastMembers = null; diff --git a/app/frontend/src/javascript/directives/selectMember.js.erb b/app/frontend/src/javascript/directives/selectMember.js.erb index 760b2874c..86714c82b 100644 --- a/app/frontend/src/javascript/directives/selectMember.js.erb +++ b/app/frontend/src/javascript/directives/selectMember.js.erb @@ -11,7 +11,7 @@ Application.Directives.directive('selectMember', [ 'Diacritics', 'Member', function (Diacritics, Member) { return ({ restrict: 'E', - templateUrl: '<%= asset_path "shared/_member_select.html" %>', + templateUrl: '<%= asset_pack_path "shared/_member_select.html" %>', link (scope, element, attributes) { return scope.autoCompleteName = function (nameLookup) { if (!nameLookup) { diff --git a/app/frontend/src/javascript/directives/settings/boolean-setting.js.erb b/app/frontend/src/javascript/directives/settings/boolean-setting.js.erb index 942d9d8ab..80a50e26e 100644 --- a/app/frontend/src/javascript/directives/settings/boolean-setting.js.erb +++ b/app/frontend/src/javascript/directives/settings/boolean-setting.js.erb @@ -11,7 +11,7 @@ Application.Directives.directive('booleanSetting', ['Setting', 'growl', '_t', classes: '@', onBeforeSave: '=' }, - templateUrl: '<%= asset_path "admin/settings/boolean.html" %>', + templateUrl: '<%= asset_pack_path "admin/settings/boolean.html" %>', link ($scope, element, attributes) { // The setting $scope.setting = { diff --git a/app/frontend/src/javascript/directives/settings/number-setting.js.erb b/app/frontend/src/javascript/directives/settings/number-setting.js.erb index 0c5940bce..cb20dc34b 100644 --- a/app/frontend/src/javascript/directives/settings/number-setting.js.erb +++ b/app/frontend/src/javascript/directives/settings/number-setting.js.erb @@ -12,7 +12,7 @@ Application.Directives.directive('numberSetting', ['Setting', 'growl', '_t', min: '@', required: '<' }, - templateUrl: '<%= asset_path "admin/settings/number.html" %>', + templateUrl: '<%= asset_pack_path "admin/settings/number.html" %>', link ($scope, element, attributes) { // The setting $scope.setting = { diff --git a/app/frontend/src/javascript/directives/settings/select-multiple-setting.js.erb b/app/frontend/src/javascript/directives/settings/select-multiple-setting.js.erb index b28b0a89f..0e2a67fd0 100644 --- a/app/frontend/src/javascript/directives/settings/select-multiple-setting.js.erb +++ b/app/frontend/src/javascript/directives/settings/select-multiple-setting.js.erb @@ -12,7 +12,7 @@ Application.Directives.directive('selectMultipleSetting', ['Setting', 'growl', ' descriptionNew: '@', beforeAdd: '=' }, - templateUrl: '<%= asset_path "admin/settings/select-multiple.html" %>', + templateUrl: '<%= asset_pack_path "admin/settings/select-multiple.html" %>', link ($scope, element, attributes) { // The setting $scope.setting = { diff --git a/app/frontend/src/javascript/directives/settings/select-setting.js.erb b/app/frontend/src/javascript/directives/settings/select-setting.js.erb index 2c0d2ba91..4286116ab 100644 --- a/app/frontend/src/javascript/directives/settings/select-setting.js.erb +++ b/app/frontend/src/javascript/directives/settings/select-setting.js.erb @@ -14,7 +14,7 @@ Application.Directives.directive('selectSetting', ['Setting', 'growl', '_t', option4: '<', option5: '<' }, - templateUrl: '<%= asset_path "admin/settings/select.html" %>', + templateUrl: '<%= asset_pack_path "admin/settings/select.html" %>', link ($scope, element, attributes) { // The setting $scope.setting = { diff --git a/app/frontend/src/javascript/directives/settings/text-setting.js.erb b/app/frontend/src/javascript/directives/settings/text-setting.js.erb index 2631863f9..b9f4d967e 100644 --- a/app/frontend/src/javascript/directives/settings/text-setting.js.erb +++ b/app/frontend/src/javascript/directives/settings/text-setting.js.erb @@ -15,7 +15,7 @@ Application.Directives.directive('textSetting', ['Setting', 'growl', '_t', minLength: '@', readOnly: '<' }, - templateUrl: '<%= asset_path "admin/settings/text.html" %>', + templateUrl: '<%= asset_pack_path "admin/settings/text.html" %>', link ($scope, element, attributes) { // if type is not specified, use text as default if (typeof $scope.type === 'undefined') { diff --git a/app/frontend/src/javascript/directives/socialLink.js.erb b/app/frontend/src/javascript/directives/socialLink.js.erb index 3d656ef28..c2a7f26b5 100644 --- a/app/frontend/src/javascript/directives/socialLink.js.erb +++ b/app/frontend/src/javascript/directives/socialLink.js.erb @@ -16,7 +16,7 @@ Application.Directives.directive('socialLink', [ function () { network: '@?', user: '=' }, - templateUrl: '<%= asset_path "shared/_social_link.html" %>', + templateUrl: '<%= asset_pack_path "shared/_social_link.html" %>', link (scope, element, attributes) { if (scope.network === 'dailymotion') { scope.image = "<%= asset_pack_path('social/dailymotion.png') %>"; diff --git a/app/frontend/src/javascript/plugins.js.erb b/app/frontend/src/javascript/plugins.js.erb index e69de29bb..479d2cfdc 100644 --- a/app/frontend/src/javascript/plugins.js.erb +++ b/app/frontend/src/javascript/plugins.js.erb @@ -0,0 +1,3 @@ +<% +PluginRegistry.javascripts.each { |js| require_asset(js) } +%> diff --git a/app/frontend/src/javascript/router.js.erb b/app/frontend/src/javascript/router.js.erb index fe3e7aa14..1a7eddc70 100644 --- a/app/frontend/src/javascript/router.js.erb +++ b/app/frontend/src/javascript/router.js.erb @@ -21,14 +21,14 @@ angular.module('application.router', ['ui.router']) abstract: true, views: { 'header': { - templateUrl: '<%= asset_path "shared/header.html" %>' + templateUrl: '<%= asset_pack_path "shared/header.html" %>' }, 'leftnav': { - templateUrl: '<%= asset_path "shared/leftnav.html" %>', + templateUrl: '<%= asset_pack_path "shared/leftnav.html" %>', controller: 'MainNavController' }, 'cookies': { - templateUrl: '<%= asset_path "shared/cookies.html" %>', + templateUrl: '<%= asset_pack_path "shared/cookies.html" %>', controller: 'CookiesController' }, 'main': {} @@ -92,7 +92,7 @@ angular.module('application.router', ['ui.router']) url: '/about', views: { 'content@': { - templateUrl: '<%= asset_path "shared/about.html" %>', + templateUrl: '<%= asset_pack_path "shared/about.html" %>', controller: 'AboutController' } } @@ -101,7 +101,7 @@ angular.module('application.router', ['ui.router']) url: '/?reset_password_token', views: { 'main@': { - templateUrl: '<%= asset_path "home.html" %>', + templateUrl: '<%= asset_pack_path "home.html" %>', controller: 'HomeController' } }, @@ -113,7 +113,7 @@ angular.module('application.router', ['ui.router']) url: '/privacy-policy', views: { 'content@': { - templateUrl: '<%= asset_path "shared/privacy.html" %>', + templateUrl: '<%= asset_pack_path "shared/privacy.html" %>', controller: 'PrivacyController' } } @@ -124,7 +124,7 @@ angular.module('application.router', ['ui.router']) url: '/profile_completion', views: { 'main@': { - templateUrl: '<%= asset_path "profile/complete.html"%>', + templateUrl: '<%= asset_pack_path "profile/complete.html"%>', controller: 'CompleteProfileController' } }, @@ -150,7 +150,7 @@ angular.module('application.router', ['ui.router']) url: '/profile', views: { 'main@': { - templateUrl: '<%= asset_path "dashboard/profile.html" %>', + templateUrl: '<%= asset_pack_path "dashboard/profile.html" %>', controller: 'DashboardController' } } @@ -159,7 +159,7 @@ angular.module('application.router', ['ui.router']) url: '/settings', views: { 'main@': { - templateUrl: '<%= asset_path "dashboard/settings.html" %>', + templateUrl: '<%= asset_pack_path "dashboard/settings.html" %>', controller: 'EditProfileController' } }, @@ -173,7 +173,7 @@ angular.module('application.router', ['ui.router']) url: '/projects', views: { 'main@': { - templateUrl: '<%= asset_path "dashboard/projects.html" %>', + templateUrl: '<%= asset_pack_path "dashboard/projects.html" %>', controller: 'DashboardController' } } @@ -182,7 +182,7 @@ angular.module('application.router', ['ui.router']) url: '/trainings', views: { 'main@': { - templateUrl: '<%= asset_path "dashboard/trainings.html" %>', + templateUrl: '<%= asset_pack_path "dashboard/trainings.html" %>', controller: 'DashboardController' } } @@ -191,7 +191,7 @@ angular.module('application.router', ['ui.router']) url: '/events', views: { 'main@': { - templateUrl: '<%= asset_path "dashboard/events.html" %>', + templateUrl: '<%= asset_pack_path "dashboard/events.html" %>', controller: 'DashboardController' } } @@ -200,7 +200,7 @@ angular.module('application.router', ['ui.router']) url: '/invoices', views: { 'main@': { - templateUrl: '<%= asset_path "dashboard/invoices.html" %>', + templateUrl: '<%= asset_pack_path "dashboard/invoices.html" %>', controller: 'DashboardController' } } @@ -210,7 +210,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.walletModule, views: { 'main@': { - templateUrl: '<%= asset_path "dashboard/wallet.html" %>', + templateUrl: '<%= asset_pack_path "dashboard/wallet.html" %>', controller: 'WalletController' } }, @@ -225,7 +225,7 @@ angular.module('application.router', ['ui.router']) url: '/members/:id', views: { 'main@': { - templateUrl: '<%= asset_path "members/show.html" %>', + templateUrl: '<%= asset_pack_path "members/show.html" %>', controller: 'ShowProfileController' } }, @@ -237,7 +237,7 @@ angular.module('application.router', ['ui.router']) url: '/members', views: { 'main@': { - templateUrl: '<%= asset_path "members/index.html" %>', + templateUrl: '<%= asset_pack_path "members/index.html" %>', 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', views: { 'main@': { - templateUrl: '<%= asset_path "projects/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "projects/index.html.erb" %>', controller: 'ProjectsController' } }, @@ -267,7 +267,7 @@ angular.module('application.router', ['ui.router']) url: '/projects/new', views: { 'main@': { - templateUrl: '<%= asset_path "projects/new.html" %>', + templateUrl: '<%= asset_pack_path "projects/new.html" %>', controller: 'NewProjectController' } }, @@ -279,7 +279,7 @@ angular.module('application.router', ['ui.router']) url: '/projects/:id', views: { 'main@': { - templateUrl: '<%= asset_path "projects/show.html" %>', + templateUrl: '<%= asset_pack_path "projects/show.html" %>', controller: 'ShowProjectController' } }, @@ -292,7 +292,7 @@ angular.module('application.router', ['ui.router']) url: '/projects/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "projects/edit.html" %>', + templateUrl: '<%= asset_pack_path "projects/edit.html" %>', controller: 'EditProjectController' } }, @@ -307,7 +307,7 @@ angular.module('application.router', ['ui.router']) url: '/machines', views: { 'main@': { - templateUrl: '<%= asset_path "machines/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "machines/index.html.erb" %>', controller: 'MachinesController' } }, @@ -320,7 +320,7 @@ angular.module('application.router', ['ui.router']) url: '/machines/new', views: { 'main@': { - templateUrl: '<%= asset_path "machines/new.html" %>', + templateUrl: '<%= asset_pack_path "machines/new.html" %>', controller: 'NewMachineController' } } @@ -329,7 +329,7 @@ angular.module('application.router', ['ui.router']) url: '/machines/:id', views: { 'main@': { - templateUrl: '<%= asset_path "machines/show.html" %>', + templateUrl: '<%= asset_pack_path "machines/show.html" %>', controller: 'ShowMachineController' } }, @@ -341,7 +341,7 @@ angular.module('application.router', ['ui.router']) url: '/machines/:id/reserve', views: { 'main@': { - templateUrl: '<%= asset_path "machines/reserve.html" %>', + templateUrl: '<%= asset_pack_path "machines/reserve.html" %>', controller: 'ReserveMachineController' } }, @@ -362,7 +362,7 @@ angular.module('application.router', ['ui.router']) url: '/machines/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "machines/edit.html" %>', + templateUrl: '<%= asset_pack_path "machines/edit.html" %>', controller: 'EditMachineController' } }, @@ -377,7 +377,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.spacesModule, views: { 'main@': { - templateUrl: '<%= asset_path "spaces/index.html" %>', + templateUrl: '<%= asset_pack_path "spaces/index.html" %>', controller: 'SpacesController' } }, @@ -391,7 +391,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.spacesModule, views: { 'main@': { - templateUrl: '<%= asset_path "spaces/new.html" %>', + templateUrl: '<%= asset_pack_path "spaces/new.html" %>', controller: 'NewSpaceController' } } @@ -401,7 +401,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.spacesModule, views: { 'main@': { - templateUrl: '<%= asset_path "spaces/show.html" %>', + templateUrl: '<%= asset_pack_path "spaces/show.html" %>', controller: 'ShowSpaceController' } }, @@ -414,7 +414,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.spacesModule, views: { 'main@': { - templateUrl: '<%= asset_path "spaces/edit.html" %>', + templateUrl: '<%= asset_pack_path "spaces/edit.html" %>', controller: 'EditSpaceController' } }, @@ -427,7 +427,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.spacesModule, views: { 'main@': { - templateUrl: '<%= asset_path "spaces/reserve.html" %>', + templateUrl: '<%= asset_pack_path "spaces/reserve.html" %>', controller: 'ReserveSpaceController' } }, @@ -450,7 +450,7 @@ angular.module('application.router', ['ui.router']) url: '/trainings', views: { 'main@': { - templateUrl: '<%= asset_path "trainings/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "trainings/index.html.erb" %>', controller: 'TrainingsController' } }, @@ -462,7 +462,7 @@ angular.module('application.router', ['ui.router']) url: '/trainings/:id', views: { 'main@': { - templateUrl: '<%= asset_path "trainings/show.html" %>', + templateUrl: '<%= asset_pack_path "trainings/show.html" %>', controller: 'ShowTrainingController' } }, @@ -474,7 +474,7 @@ angular.module('application.router', ['ui.router']) url: '/trainings/:id/reserve', views: { 'main@': { - templateUrl: '<%= asset_path "trainings/reserve.html" %>', + templateUrl: '<%= asset_pack_path "trainings/reserve.html" %>', controller: 'ReserveTrainingController' } }, @@ -499,7 +499,7 @@ angular.module('application.router', ['ui.router']) url: '/notifications', views: { 'main@': { - templateUrl: '<%= asset_path "notifications/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "notifications/index.html.erb" %>', controller: 'NotificationsController' } } @@ -511,7 +511,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.plansModule, views: { 'main@': { - templateUrl: '<%= asset_path "plans/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "plans/index.html.erb" %>', controller: 'PlansIndexController' } }, @@ -528,7 +528,7 @@ angular.module('application.router', ['ui.router']) url: '/events', views: { 'main@': { - templateUrl: '<%= asset_path "events/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "events/index.html.erb" %>', controller: 'EventsController' } }, @@ -543,7 +543,7 @@ angular.module('application.router', ['ui.router']) url: '/events/:id', views: { 'main@': { - templateUrl: '<%= asset_path "events/show.html" %>', + templateUrl: '<%= asset_pack_path "events/show.html" %>', controller: 'ShowEventController' } }, @@ -559,7 +559,7 @@ angular.module('application.router', ['ui.router']) url: '/calendar', views: { 'main@': { - templateUrl: '<%= asset_path "calendar/calendar.html" %>', + templateUrl: '<%= asset_pack_path "calendar/calendar.html" %>', controller: 'CalendarController' } }, @@ -579,7 +579,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/calendar', views: { 'main@': { - templateUrl: '<%= asset_path "admin/calendar/calendar.html" %>', + templateUrl: '<%= asset_pack_path "admin/calendar/calendar.html" %>', controller: 'AdminCalendarController' } }, @@ -596,7 +596,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/calendar/icalendar', views: { 'main@': { - templateUrl: '<%= asset_path "admin/calendar/icalendar.html" %>', + templateUrl: '<%= asset_pack_path "admin/calendar/icalendar.html" %>', controller: 'AdminICalendarController' } }, @@ -610,7 +610,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/projects', views: { 'main@': { - templateUrl: '<%= asset_path "admin/projects/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/projects/index.html.erb" %>', controller: 'AdminProjectsController' } }, @@ -628,7 +628,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/abuses', views: { 'main@': { - templateUrl: '<%= asset_path "admin/abuses/index.html" %>', + templateUrl: '<%= asset_pack_path "admin/abuses/index.html" %>', controller: 'AbusesController' } }, @@ -642,7 +642,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/trainings', views: { 'main@': { - templateUrl: '<%= asset_path "admin/trainings/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/trainings/index.html.erb" %>', controller: 'TrainingsAdminController' } }, @@ -656,7 +656,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/trainings/new', views: { 'main@': { - templateUrl: '<%= asset_path "admin/trainings/new.html" %>', + templateUrl: '<%= asset_pack_path "admin/trainings/new.html" %>', controller: 'NewTrainingController' } }, @@ -668,7 +668,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/trainings/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "admin/trainings/edit.html" %>', + templateUrl: '<%= asset_pack_path "admin/trainings/edit.html" %>', controller: 'EditTrainingController' } }, @@ -682,7 +682,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/events', views: { 'main@': { - templateUrl: '<%= asset_path "admin/events/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/events/index.html.erb" %>', controller: 'AdminEventsController' } }, @@ -699,7 +699,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/events/new', views: { 'main@': { - templateUrl: '<%= asset_path "events/new.html" %>', + templateUrl: '<%= asset_pack_path "events/new.html" %>', controller: 'NewEventController' } }, @@ -714,7 +714,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/events/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "events/edit.html" %>', + templateUrl: '<%= asset_pack_path "events/edit.html" %>', controller: 'EditEventController' } }, @@ -730,7 +730,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/events/:id/reservations', views: { 'main@': { - templateUrl: '<%= asset_path "admin/events/reservations.html" %>', + templateUrl: '<%= asset_pack_path "admin/events/reservations.html" %>', controller: 'ShowEventReservationsController' } }, @@ -745,7 +745,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/pricing', views: { 'main@': { - templateUrl: '<%= asset_path "admin/pricing/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/pricing/index.html.erb" %>', controller: 'EditPricingController' } }, @@ -779,7 +779,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/plans/new', views: { 'main@': { - templateUrl: '<%= asset_path "admin/plans/new.html" %>', + templateUrl: '<%= asset_pack_path "admin/plans/new.html" %>', controller: 'NewPlanController' } } @@ -788,7 +788,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/plans/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "admin/plans/edit.html" %>', + templateUrl: '<%= asset_pack_path "admin/plans/edit.html" %>', controller: 'EditPlanController' } }, @@ -805,7 +805,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/coupons/new', views: { 'main@': { - templateUrl: '<%= asset_path "admin/coupons/new.html" %>', + templateUrl: '<%= asset_pack_path "admin/coupons/new.html" %>', controller: 'NewCouponController' } } @@ -814,7 +814,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/coupons/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "admin/coupons/edit.html" %>', + templateUrl: '<%= asset_pack_path "admin/coupons/edit.html" %>', controller: 'EditCouponController' } }, @@ -828,7 +828,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/invoices', views: { 'main@': { - templateUrl: '<%= asset_path "admin/invoices/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/invoices/index.html.erb" %>', controller: 'InvoicesController' } }, @@ -860,19 +860,19 @@ angular.module('application.router', ['ui.router']) url: '/admin/members', views: { 'main@': { - templateUrl: '<%= asset_path "admin/members/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/members/index.html.erb" %>', controller: 'AdminMembersController' }, 'groups@app.admin.members': { - templateUrl: '<%= asset_path "admin/groups/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/groups/index.html.erb" %>', controller: 'GroupsController' }, 'tags@app.admin.members': { - templateUrl: '<%= asset_path "admin/tags/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/tags/index.html.erb" %>', controller: 'TagsController' }, 'authentification@app.admin.members': { - templateUrl: '<%= asset_path "admin/authentications/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/authentications/index.html.erb" %>', controller: 'AuthentificationController' } }, @@ -891,7 +891,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/members/new', views: { 'main@': { - templateUrl: '<%= asset_path "admin/members/new.html" %>', + templateUrl: '<%= asset_pack_path "admin/members/new.html" %>', controller: 'NewMemberController' } }, @@ -903,7 +903,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/members/import', views: { 'main@': { - templateUrl: '<%= asset_path "admin/members/import.html" %>', + templateUrl: '<%= asset_pack_path "admin/members/import.html" %>', controller: 'ImportMembersController' } }, @@ -915,7 +915,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/members/import/:id/results', views: { 'main@': { - templateUrl: '<%= asset_path "admin/members/import_result.html" %>', + templateUrl: '<%= asset_pack_path "admin/members/import_result.html" %>', controller: 'ImportMembersResultController' } }, @@ -927,7 +927,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/members/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "admin/members/edit.html" %>', + templateUrl: '<%= asset_pack_path "admin/members/edit.html" %>', controller: 'EditMemberController' } }, @@ -944,7 +944,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/admins/new', views: { 'main@': { - templateUrl: '<%= asset_path "admin/admins/new.html" %>', + templateUrl: '<%= asset_pack_path "admin/admins/new.html" %>', controller: 'NewAdminController' } }, @@ -956,7 +956,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/managers/new', views: { 'main@': { - templateUrl: '<%= asset_path "admin/managers/new.html" %>', + templateUrl: '<%= asset_pack_path "admin/managers/new.html" %>', controller: 'NewManagerController' } }, @@ -971,7 +971,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/authentications/new', views: { 'main@': { - templateUrl: '<%= asset_path "admin/authentications/new.html" %>', + templateUrl: '<%= asset_pack_path "admin/authentications/new.html" %>', controller: 'NewAuthenticationController' } }, @@ -984,7 +984,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/authentications/:id/edit', views: { 'main@': { - templateUrl: '<%= asset_path "admin/authentications/edit.html" %>', + templateUrl: '<%= asset_pack_path "admin/authentications/edit.html" %>', controller: 'EditAuthenticationController' } }, @@ -1000,7 +1000,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.statisticsModule, views: { 'main@': { - templateUrl: '<%= asset_path "admin/statistics/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/statistics/index.html.erb" %>', controller: 'StatisticsController' } }, @@ -1015,7 +1015,7 @@ angular.module('application.router', ['ui.router']) abstract: !Fablab.statisticsModule, views: { 'main@': { - templateUrl: '<%= asset_path "admin/statistics/graphs.html" %>', + templateUrl: '<%= asset_pack_path "admin/statistics/graphs.html" %>', controller: 'GraphsController' } } @@ -1026,7 +1026,7 @@ angular.module('application.router', ['ui.router']) url: '/admin/settings', views: { 'main@': { - templateUrl: '<%= asset_path "admin/settings/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/settings/index.html.erb" %>', controller: 'SettingsController' } }, @@ -1058,7 +1058,7 @@ angular.module('application.router', ['ui.router']) url: '/open_api_clients', views: { 'main@': { - templateUrl: '<%= asset_path "admin/open_api_clients/index.html.erb" %>', + templateUrl: '<%= asset_pack_path "admin/open_api_clients/index.html.erb" %>', controller: 'OpenAPIClientsController' } }, diff --git a/app/frontend/src/javascript/services/dialogs.js.erb b/app/frontend/src/javascript/services/dialogs.js.erb index a35eb5a85..a0669951f 100644 --- a/app/frontend/src/javascript/services/dialogs.js.erb +++ b/app/frontend/src/javascript/services/dialogs.js.erb @@ -4,7 +4,7 @@ Application.Services.factory('dialogs', ['$uibModal', function ($uibModal) { return ({ confirm (options, success, error) { const defaultOpts = { - templateUrl: '<%= asset_path "shared/confirm_modal.html" %>', + templateUrl: '<%= asset_pack_path "shared/confirm_modal.html" %>', size: 'sm', resolve: { object () { diff --git a/app/frontend/src/javascript/services/help.js.erb b/app/frontend/src/javascript/services/help.js.erb index 15be24121..3013a2178 100644 --- a/app/frontend/src/javascript/services/help.js.erb +++ b/app/frontend/src/javascript/services/help.js.erb @@ -34,7 +34,7 @@ Application.Services.factory('Help', ['$rootScope', '$uibModal', '$state', 'Auth $uibModal.open({ animation: true, - templateUrl: '<%= asset_path "shared/help_modal.html" %>', + templateUrl: '<%= asset_pack_path "shared/help_modal.html" %>', resolve: { tourName: function () { return tourName; } }, diff --git a/app/frontend/src/stylesheets/application.scss.erb b/app/frontend/src/stylesheets/application.scss.erb index 96b307415..20c094b16 100644 --- a/app/frontend/src/stylesheets/application.scss.erb +++ b/app/frontend/src/stylesheets/application.scss.erb @@ -1,22 +1,3 @@ -/* - *= require_self - *= require ui-select/dist/select - *= require fullcalendar/dist/fullcalendar - *= require jasny-bootstrap/dist/css/jasny-bootstrap - *= require angular-growl-v2/build/angular-growl - *= require angular-xeditable/dist/css/xeditable - *= require angular-loading-bar/build/loading-bar - *= require nvd3/build/nv.d3 - *= require font-awesome - *= require medium-editor/dist/css/medium-editor - *= require medium-editor/dist/css/themes/default - *= require bootstrap-switch/dist/css/bootstrap3/bootstrap-switch - *= require summernote/dist/summernote - *= require jquery-minicolors/jquery.minicolors.css - *= require angular-aside/dist/css/angular-aside - *= require codemirror/lib/codemirror - */ - @import "app.functions"; @import "bootstrap-compass"; @import "bootstrap-sprockets"; diff --git a/app/frontend/templates/admin/admins/new.html.erb b/app/frontend/templates/admin/admins/new.html.erb index 4164626ab..1116ea647 100644 --- a/app/frontend/templates/admin/admins/new.html.erb +++ b/app/frontend/templates/admin/admins/new.html.erb @@ -20,7 +20,7 @@
diff --git a/app/frontend/templates/projects/new.html.erb b/app/frontend/templates/projects/new.html.erb index 933cf918c..9ec8ccc87 100644 --- a/app/frontend/templates/projects/new.html.erb +++ b/app/frontend/templates/projects/new.html.erb @@ -18,7 +18,7 @@{{ 'app.shared.valid_reservation_modal.here_is_the_summary_of_the_slots_to_book_for_the_current_user' }}