1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

Merge branch 'webpacker' into dev

This commit is contained in:
Sylvain 2020-10-19 14:40:34 +02:00
commit 540f5e361c
40 changed files with 163 additions and 142 deletions

View File

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

View File

@ -272,7 +272,7 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
// open a confirmation dialog
const modalInstance = $uibModal.open({
animation: true,
templateUrl: '../../../../templates/admin/calendar/deleteRecurrent.html',
templateUrl: '/admin/calendar/deleteRecurrent.html',
size: 'md',
controller: 'DeleteRecurrentAvailabilityController',
resolve: {
@ -418,7 +418,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: '../../../../templates/admin/calendar/eventModal.html',
templateUrl: '/admin/calendar/eventModal.html',
controller: 'CreateEventModalController',
backdrop: 'static',
keyboard: false,

View File

@ -279,7 +279,7 @@ Application.Controllers.controller('AdminEventsController', ['$scope', '$state',
*/
$scope.newPriceCategory = function () {
$uibModal.open({
templateUrl: '../../../../templates/admin/events/price_form.html',
templateUrl: '/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: '../../../../templates/admin/events/price_form.html',
templateUrl: '/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: '../../../../templates/events/editRecurrent.html',
templateUrl: '/events/editRecurrent.html',
size: 'md',
controller: 'EditRecurrentEventController',
resolve: {

View File

@ -58,7 +58,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
prefix: settings.invoice_prefix,
nextId: 40,
date: moment().format('DDMMYYYY'),
templateUrl: '../../../../templates/admin/invoices/settings/editPrefix.html'
templateUrl: '/admin/invoices/settings/editPrefix.html'
};
// Invoices parameters
@ -67,22 +67,22 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
reference: {
model: '',
help: null,
templateUrl: '../../../../templates/admin/invoices/settings/editReference.html'
templateUrl: '/admin/invoices/settings/editReference.html'
},
code: {
model: '',
active: true,
templateUrl: '../../../../templates/admin/invoices/settings/editCode.html'
templateUrl: '/admin/invoices/settings/editCode.html'
},
number: {
model: '',
help: null,
templateUrl: '../../../../templates/admin/invoices/settings/editNumber.html'
templateUrl: '/admin/invoices/settings/editNumber.html'
},
VAT: {
rate: 19.6,
active: false,
templateUrl: '../../../../templates/admin/invoices/settings/editVAT.html'
templateUrl: '/admin/invoices/settings/editVAT.html'
},
text: {
content: ''
@ -220,7 +220,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
$scope.generateAvoirForInvoice = function (invoice) {
// open modal
const modalInstance = $uibModal.open({
templateUrl: '../../../../templates/admin/invoices/avoirModal.html',
templateUrl: '/admin/invoices/avoirModal.html',
controller: 'AvoirModalController',
resolve: {
invoice () { return invoice; },
@ -578,7 +578,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
$scope.closeAnAccountingPeriod = function () {
// open modal
$uibModal.open({
templateUrl: '../../../../templates/admin/invoices/closePeriodModal.html',
templateUrl: '/admin/invoices/closePeriodModal.html',
controller: 'ClosePeriodModalController',
backdrop: 'static',
keyboard: false,
@ -592,7 +592,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
$scope.toggleExportModal = function () {
$uibModal.open({
templateUrl: '../../../../templates/admin/invoices/accountingExportModal.html',
templateUrl: '/admin/invoices/accountingExportModal.html',
controller: 'AccountingExportModalController',
size: 'xl'
});
@ -646,7 +646,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
// otherwise, open a modal to ask for the stripe keys
const modalInstance = $uibModal.open({
templateUrl: '../../../../templates/admin/invoices/settings/stripeKeys.html',
templateUrl: '/admin/invoices/settings/stripeKeys.html',
controller: 'StripeKeysModalController',
resolve: {
stripeKeys: ['Setting', function (Setting) { return Setting.query({ names: "['stripe_public_key', 'stripe_secret_key']" }).$promise; }]

View File

@ -236,7 +236,7 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce',
$scope.openPartnerNewModal = function () {
const modalInstance = $uibModal.open({
animation: true,
templateUrl: '../../../../templates/shared/_partner_new_modal.html',
templateUrl: '/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: '../../../../templates/admin/members/change_role_modal.html',
templateUrl: '/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: '../../../../templates/admin/subscriptions/expired_at_modal.html',
templateUrl: '/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: '../../../../templates/admin/subscriptions/create_modal.html',
templateUrl: '/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: '../../../../templates/wallet/credit_modal.html',
templateUrl: '/wallet/credit_modal.html',
controller: ['$scope', '$uibModalInstance', 'Wallet', function ($scope, $uibModalInstance, Wallet) {
// default: do not generate a refund invoice
$scope.generate_avoir = false;

View File

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

View File

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

View File

@ -173,7 +173,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$rootScope'
$scope.savePrivacyPolicy = function () {
// open modal
const modalInstance = $uibModal.open({
templateUrl: '../../../../templates/admin/settings/save_policy.html',
templateUrl: '/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: '../../../../templates/admin/settings/analyticsModal.html',
templateUrl: '/admin/settings/analyticsModal.html',
controller: 'AnalyticsModalController',
size: 'lg',
resolve: {

View File

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

View File

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

View File

@ -89,7 +89,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
<% else %>
return $uibModal.open({
templateUrl: '../../../templates/shared/signupModal.html',
templateUrl: '/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: '../../../templates/shared/passwordEditModal.html',
templateUrl: '/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: '../../../templates/admin/versions/upgradeModal.html',
templateUrl: '/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: '../../../templates/shared/deviseModal.html',
templateUrl: '/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: '../../../templates/shared/passwordNewModal.html',
templateUrl: '/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: '../../../templates/shared/ConfirmationNewModal.html',
templateUrl: '/shared/ConfirmationNewModal.html',
size: 'sm',
controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
$scope.user = { email: '' };

View File

@ -111,7 +111,7 @@ Application.Controllers.controller('CalendarController', ['$scope', '$state', '$
$scope.openFilterAside = () =>
$aside.open({
templateUrl: '../../../templates/calendar/filterAside.html',
templateUrl: '/calendar/filterAside.html',
placement: 'right',
size: 'md',
backdrop: false,

View File

@ -186,7 +186,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
// open a confirmation dialog
const modalInstance = $uibModal.open({
animation: true,
templateUrl: '../../../templates/events/deleteRecurrent.html',
templateUrl: '/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: '../../../templates/events/modify_event_reservation_modal.html',
templateUrl: '/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: '../../../templates/stripe/payment_modal.html',
templateUrl: '/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: '../../../templates/shared/valid_reservation_modal.html',
templateUrl: '/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: '../../../templates/shared/_reserve_slot_same_time.html',
templateUrl: '/shared/_reserve_slot_same_time.html',
size: 'md',
controller: 'ReserveSlotSameTimeController',
resolve: {

View File

@ -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: '../../../templates/machines/training_reservation_modal.html',
templateUrl: '/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: '../../../templates/machines/request_training_modal.html',
templateUrl: '/machines/request_training_modal.html',
controller: ['$scope', '$uibModalInstance', '$state', function ($scope, $uibModalInstance, $state) {
$scope.machine = machine;
$scope.member = _this.$scope.currentUser;

View File

@ -235,7 +235,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop
*/
const payByStripe = function () {
$uibModal.open({
templateUrl: '../../../templates/stripe/payment_modal.html',
templateUrl: '/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: '../../../templates/plans/payment_modal.html',
templateUrl: '/plans/payment_modal.html',
size: 'sm',
resolve: {
selectedPlan () { return $scope.selectedPlan; },

View File

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

View File

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

View File

@ -39,7 +39,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
reservableName: '@',
limitToOneSlot: '@'
},
templateUrl: '../../../templates/shared/_cart.html',
templateUrl: '/shared/_cart.html',
link ($scope, element, attributes) {
// will store the user's plan if he choosed to buy one
$scope.selectedPlan = null;
@ -173,7 +173,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
} else {
const modalInstance = $uibModal.open({
animation: true,
templateUrl: '../../../templates/shared/_reserve_slot_without_plan.html',
templateUrl: '/shared/_reserve_slot_without_plan.html',
size: 'md',
controller: 'ReserveSlotWithoutPlanController',
resolve: {
@ -317,7 +317,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
// ask confirmation
const modalInstance = $uibModal.open({
animation: true,
templateUrl: '../../../templates/shared/_reserve_slot_tags_mismatch.html',
templateUrl: '/shared/_reserve_slot_tags_mismatch.html',
size: 'md',
controller: 'ReserveSlotTagsMismatchController',
resolve: {
@ -356,7 +356,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
if (sameTimeReservations.length > 0) {
const modalInstance = $uibModal.open({
animation: true,
templateUrl: '../../../templates/shared/_reserve_slot_same_time.html',
templateUrl: '/shared/_reserve_slot_same_time.html',
size: 'md',
controller: 'ReserveSlotSameTimeController',
resolve: {
@ -450,7 +450,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: '../../../templates/shared/confirm_modify_slot_modal.html',
templateUrl: '/shared/confirm_modify_slot_modal.html',
resolve: {
object () { return $scope.slot; }
}
@ -615,7 +615,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
*/
const payByStripe = function (reservation) {
$uibModal.open({
templateUrl: '../../../templates/stripe/payment_modal.html',
templateUrl: '/stripe/payment_modal.html',
size: 'md',
resolve: {
reservation () {
@ -676,7 +676,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
*/
const payOnSite = function (reservation) {
$uibModal.open({
templateUrl: '../../../templates/shared/valid_reservation_modal.html',
templateUrl: '/shared/valid_reservation_modal.html',
size: 'sm',
resolve: {
reservation () {

View File

@ -18,7 +18,7 @@ Application.Directives.directive('coupon', [ '$rootScope', 'Coupon', '_t', funct
total: '=',
userId: '@'
},
templateUrl: '../../../templates/shared/_coupon.html',
templateUrl: '/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 =

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ Application.Directives.directive('selectMultipleSetting', ['Setting', 'growl', '
descriptionNew: '@',
beforeAdd: '='
},
templateUrl: '../../../../templates/admin/settings/select-multiple.html',
templateUrl: '/admin/settings/select-multiple.html',
link ($scope, element, attributes) {
// The setting
$scope.setting = {
@ -44,7 +44,7 @@ Application.Directives.directive('selectMultipleSetting', ['Setting', 'growl', '
*/
$scope.addItem = function () {
$uibModal.open({
templateUrl: '../../../../templates/admin/settings/newSelectOption.html',
templateUrl: '/admin/settings/newSelectOption.html',
resolve: {
titleNew: function () { return $scope.titleNew; },
descriptionNew: function () { return $scope.descriptionNew; }

View File

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

View File

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

View File

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

View File

@ -28,7 +28,7 @@
}
if (!promise) {
promise = $uibModal.open({
templateUrl: '../../../templates/shared/deviseModal.html',
templateUrl: '/shared/deviseModal.html',
controller: function ($scope, $uibModalInstance) {
const user = $scope.user = {};
$scope.login = function () {

View File

@ -21,14 +21,14 @@ angular.module('application.router', ['ui.router'])
abstract: true,
views: {
header: {
templateUrl: '../../templates/shared/header.html.erb'
templateUrl: '/shared/header.html.erb'
},
leftnav: {
templateUrl: '../../templates/shared/leftnav.html',
templateUrl: '/shared/leftnav.html',
controller: 'MainNavController'
},
cookies: {
templateUrl: '../../templates/shared/cookies.html',
templateUrl: '/shared/cookies.html',
controller: 'CookiesController'
},
main: {}
@ -92,7 +92,7 @@ angular.module('application.router', ['ui.router'])
url: '/about',
views: {
'content@': {
templateUrl: '../../templates/shared/about.html',
templateUrl: '/shared/about.html',
controller: 'AboutController'
}
}
@ -101,7 +101,7 @@ angular.module('application.router', ['ui.router'])
url: '/?reset_password_token',
views: {
'main@': {
templateUrl: '../../templates/home.html',
templateUrl: '/home.html',
controller: 'HomeController'
}
},
@ -113,7 +113,7 @@ angular.module('application.router', ['ui.router'])
url: '/privacy-policy',
views: {
'content@': {
templateUrl: '../../templates/shared/privacy.html',
templateUrl: '/shared/privacy.html',
controller: 'PrivacyController'
}
}
@ -124,7 +124,7 @@ angular.module('application.router', ['ui.router'])
url: '/profile_completion',
views: {
'main@': {
templateUrl: '../../templates/profile/complete.html',
templateUrl: '/profile/complete.html',
controller: 'CompleteProfileController'
}
},
@ -150,7 +150,7 @@ angular.module('application.router', ['ui.router'])
url: '/profile',
views: {
'main@': {
templateUrl: '../../templates/dashboard/profile.html',
templateUrl: '/dashboard/profile.html',
controller: 'DashboardController'
}
}
@ -159,7 +159,7 @@ angular.module('application.router', ['ui.router'])
url: '/settings',
views: {
'main@': {
templateUrl: '../../templates/dashboard/settings.html',
templateUrl: '/dashboard/settings.html',
controller: 'EditProfileController'
}
},
@ -173,7 +173,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects',
views: {
'main@': {
templateUrl: '../../templates/dashboard/projects.html',
templateUrl: '/dashboard/projects.html',
controller: 'DashboardController'
}
}
@ -182,7 +182,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings',
views: {
'main@': {
templateUrl: '../../templates/dashboard/trainings.html',
templateUrl: '/dashboard/trainings.html',
controller: 'DashboardController'
}
}
@ -191,7 +191,7 @@ angular.module('application.router', ['ui.router'])
url: '/events',
views: {
'main@': {
templateUrl: '../../templates/dashboard/events.html',
templateUrl: '/dashboard/events.html',
controller: 'DashboardController'
}
}
@ -200,7 +200,7 @@ angular.module('application.router', ['ui.router'])
url: '/invoices',
views: {
'main@': {
templateUrl: '../../templates/dashboard/invoices.html',
templateUrl: '/dashboard/invoices.html',
controller: 'DashboardController'
}
}
@ -210,7 +210,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.walletModule,
views: {
'main@': {
templateUrl: '../../templates/dashboard/wallet.html',
templateUrl: '/dashboard/wallet.html',
controller: 'WalletController'
}
},
@ -225,7 +225,7 @@ angular.module('application.router', ['ui.router'])
url: '/members/:id',
views: {
'main@': {
templateUrl: '../../templates/members/show.html',
templateUrl: '/members/show.html',
controller: 'ShowProfileController'
}
},
@ -237,7 +237,7 @@ angular.module('application.router', ['ui.router'])
url: '/members',
views: {
'main@': {
templateUrl: '../../templates/members/index.html',
templateUrl: '/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: '../../templates/projects/index.html',
templateUrl: '/projects/index.html',
controller: 'ProjectsController'
}
},
@ -267,7 +267,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects/new',
views: {
'main@': {
templateUrl: '../../templates/projects/new.html',
templateUrl: '/projects/new.html',
controller: 'NewProjectController'
}
},
@ -279,7 +279,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects/:id',
views: {
'main@': {
templateUrl: '../../templates/projects/show.html',
templateUrl: '/projects/show.html',
controller: 'ShowProjectController'
}
},
@ -292,7 +292,7 @@ angular.module('application.router', ['ui.router'])
url: '/projects/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/projects/edit.html',
templateUrl: '/projects/edit.html',
controller: 'EditProjectController'
}
},
@ -307,7 +307,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines',
views: {
'main@': {
templateUrl: '../../templates/machines/index.html',
templateUrl: '/machines/index.html',
controller: 'MachinesController'
}
},
@ -320,7 +320,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/new',
views: {
'main@': {
templateUrl: '../../templates/machines/new.html',
templateUrl: '/machines/new.html',
controller: 'NewMachineController'
}
}
@ -329,7 +329,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/:id',
views: {
'main@': {
templateUrl: '../../templates/machines/show.html',
templateUrl: '/machines/show.html',
controller: 'ShowMachineController'
}
},
@ -341,7 +341,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/:id/reserve',
views: {
'main@': {
templateUrl: '../../templates/machines/reserve.html',
templateUrl: '/machines/reserve.html',
controller: 'ReserveMachineController'
}
},
@ -362,7 +362,7 @@ angular.module('application.router', ['ui.router'])
url: '/machines/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/machines/edit.html',
templateUrl: '/machines/edit.html',
controller: 'EditMachineController'
}
},
@ -377,7 +377,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule,
views: {
'main@': {
templateUrl: '../../templates/spaces/index.html',
templateUrl: '/spaces/index.html',
controller: 'SpacesController'
}
},
@ -391,7 +391,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule,
views: {
'main@': {
templateUrl: '../../templates/spaces/new.html',
templateUrl: '/spaces/new.html',
controller: 'NewSpaceController'
}
}
@ -401,7 +401,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule,
views: {
'main@': {
templateUrl: '../../templates/spaces/show.html',
templateUrl: '/spaces/show.html',
controller: 'ShowSpaceController'
}
},
@ -414,7 +414,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule,
views: {
'main@': {
templateUrl: '../../templates/spaces/edit.html',
templateUrl: '/spaces/edit.html',
controller: 'EditSpaceController'
}
},
@ -427,7 +427,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.spacesModule,
views: {
'main@': {
templateUrl: '../../templates/spaces/reserve.html',
templateUrl: '/spaces/reserve.html',
controller: 'ReserveSpaceController'
}
},
@ -450,7 +450,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings',
views: {
'main@': {
templateUrl: '../../templates/trainings/index.html',
templateUrl: '/trainings/index.html',
controller: 'TrainingsController'
}
},
@ -462,7 +462,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings/:id',
views: {
'main@': {
templateUrl: '../../templates/trainings/show.html',
templateUrl: '/trainings/show.html',
controller: 'ShowTrainingController'
}
},
@ -474,7 +474,7 @@ angular.module('application.router', ['ui.router'])
url: '/trainings/:id/reserve',
views: {
'main@': {
templateUrl: '../../templates/trainings/reserve.html',
templateUrl: '/trainings/reserve.html',
controller: 'ReserveTrainingController'
}
},
@ -499,7 +499,7 @@ angular.module('application.router', ['ui.router'])
url: '/notifications',
views: {
'main@': {
templateUrl: '../../templates/notifications/index.html',
templateUrl: '/notifications/index.html',
controller: 'NotificationsController'
}
}
@ -511,7 +511,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.plansModule,
views: {
'main@': {
templateUrl: '../../templates/plans/index.html',
templateUrl: '/plans/index.html',
controller: 'PlansIndexController'
}
},
@ -528,7 +528,7 @@ angular.module('application.router', ['ui.router'])
url: '/events',
views: {
'main@': {
templateUrl: '../../templates/events/index.html',
templateUrl: '/events/index.html',
controller: 'EventsController'
}
},
@ -543,7 +543,7 @@ angular.module('application.router', ['ui.router'])
url: '/events/:id',
views: {
'main@': {
templateUrl: '../../templates/events/show.html',
templateUrl: '/events/show.html',
controller: 'ShowEventController'
}
},
@ -559,7 +559,7 @@ angular.module('application.router', ['ui.router'])
url: '/calendar',
views: {
'main@': {
templateUrl: '../../templates/calendar/calendar.html',
templateUrl: '/calendar/calendar.html',
controller: 'CalendarController'
}
},
@ -579,7 +579,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/calendar',
views: {
'main@': {
templateUrl: '../../templates/admin/calendar/calendar.html',
templateUrl: '/admin/calendar/calendar.html',
controller: 'AdminCalendarController'
}
},
@ -596,7 +596,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/calendar/icalendar',
views: {
'main@': {
templateUrl: '../../templates/admin/calendar/icalendar.html',
templateUrl: '/admin/calendar/icalendar.html',
controller: 'AdminICalendarController'
}
},
@ -610,7 +610,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/projects',
views: {
'main@': {
templateUrl: '../../templates/admin/projects/index.html',
templateUrl: '/admin/projects/index.html',
controller: 'AdminProjectsController'
}
},
@ -630,7 +630,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/abuses',
views: {
'main@': {
templateUrl: '../../templates/admin/abuses/index.html',
templateUrl: '/admin/abuses/index.html',
controller: 'AbusesController'
}
},
@ -644,7 +644,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/trainings',
views: {
'main@': {
templateUrl: '../../templates/admin/trainings/index.html',
templateUrl: '/admin/trainings/index.html',
controller: 'TrainingsAdminController'
}
},
@ -658,7 +658,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/trainings/new',
views: {
'main@': {
templateUrl: '../../templates/admin/trainings/new.html',
templateUrl: '/admin/trainings/new.html',
controller: 'NewTrainingController'
}
},
@ -670,7 +670,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/trainings/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/admin/trainings/edit.html',
templateUrl: '/admin/trainings/edit.html',
controller: 'EditTrainingController'
}
},
@ -684,7 +684,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events',
views: {
'main@': {
templateUrl: '../../templates/admin/events/index.html',
templateUrl: '/admin/events/index.html',
controller: 'AdminEventsController'
}
},
@ -701,7 +701,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events/new',
views: {
'main@': {
templateUrl: '../../templates/events/new.html',
templateUrl: '/events/new.html',
controller: 'NewEventController'
}
},
@ -716,7 +716,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/events/edit.html',
templateUrl: '/events/edit.html',
controller: 'EditEventController'
}
},
@ -732,7 +732,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/events/:id/reservations',
views: {
'main@': {
templateUrl: '../../templates/admin/events/reservations.html',
templateUrl: '/admin/events/reservations.html',
controller: 'ShowEventReservationsController'
}
},
@ -747,7 +747,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/pricing',
views: {
'main@': {
templateUrl: '../../templates/admin/pricing/index.html',
templateUrl: '/admin/pricing/index.html',
controller: 'EditPricingController'
}
},
@ -781,7 +781,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/plans/new',
views: {
'main@': {
templateUrl: '../../templates/admin/plans/new.html',
templateUrl: '/admin/plans/new.html',
controller: 'NewPlanController'
}
}
@ -790,7 +790,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/plans/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/admin/plans/edit.html',
templateUrl: '/admin/plans/edit.html',
controller: 'EditPlanController'
}
},
@ -807,7 +807,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/coupons/new',
views: {
'main@': {
templateUrl: '../../templates/admin/coupons/new.html',
templateUrl: '/admin/coupons/new.html',
controller: 'NewCouponController'
}
}
@ -816,7 +816,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/coupons/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/admin/coupons/edit.html',
templateUrl: '/admin/coupons/edit.html',
controller: 'EditCouponController'
}
},
@ -830,7 +830,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/invoices',
views: {
'main@': {
templateUrl: '../../templates/admin/invoices/index.html',
templateUrl: '/admin/invoices/index.html',
controller: 'InvoicesController'
}
},
@ -863,19 +863,19 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members',
views: {
'main@': {
templateUrl: '../../templates/admin/members/index.html',
templateUrl: '/admin/members/index.html',
controller: 'AdminMembersController'
},
'groups@app.admin.members': {
templateUrl: '../../templates/admin/groups/index.html',
templateUrl: '/admin/groups/index.html',
controller: 'GroupsController'
},
'tags@app.admin.members': {
templateUrl: '../../templates/admin/tags/index.html',
templateUrl: '/admin/tags/index.html',
controller: 'TagsController'
},
'authentification@app.admin.members': {
templateUrl: '../../templates/admin/authentications/index.html',
templateUrl: '/admin/authentications/index.html',
controller: 'AuthentificationController'
}
},
@ -894,7 +894,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/new',
views: {
'main@': {
templateUrl: '../../templates/admin/members/new.html',
templateUrl: '/admin/members/new.html',
controller: 'NewMemberController'
}
},
@ -906,7 +906,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/import',
views: {
'main@': {
templateUrl: '../../templates/admin/members/import.html',
templateUrl: '/admin/members/import.html',
controller: 'ImportMembersController'
}
},
@ -918,7 +918,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/import/:id/results',
views: {
'main@': {
templateUrl: '../../templates/admin/members/import_result.html',
templateUrl: '/admin/members/import_result.html',
controller: 'ImportMembersResultController'
}
},
@ -930,7 +930,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/members/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/admin/members/edit.html',
templateUrl: '/admin/members/edit.html',
controller: 'EditMemberController'
}
},
@ -947,7 +947,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/admins/new',
views: {
'main@': {
templateUrl: '../../templates/admin/admins/new.html',
templateUrl: '/admin/admins/new.html',
controller: 'NewAdminController'
}
},
@ -959,7 +959,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/managers/new',
views: {
'main@': {
templateUrl: '../../templates/admin/managers/new.html',
templateUrl: '/admin/managers/new.html',
controller: 'NewManagerController'
}
},
@ -974,7 +974,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/authentications/new',
views: {
'main@': {
templateUrl: '../../templates/admin/authentications/new.html',
templateUrl: '/admin/authentications/new.html',
controller: 'NewAuthenticationController'
}
},
@ -987,7 +987,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/authentications/:id/edit',
views: {
'main@': {
templateUrl: '../../templates/admin/authentications/edit.html',
templateUrl: '/admin/authentications/edit.html',
controller: 'EditAuthenticationController'
}
},
@ -1003,7 +1003,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.statisticsModule,
views: {
'main@': {
templateUrl: '../../templates/admin/statistics/index.html',
templateUrl: '/admin/statistics/index.html',
controller: 'StatisticsController'
}
},
@ -1018,7 +1018,7 @@ angular.module('application.router', ['ui.router'])
abstract: !Fablab.statisticsModule,
views: {
'main@': {
templateUrl: '../../templates/admin/statistics/graphs.html',
templateUrl: '/admin/statistics/graphs.html',
controller: 'GraphsController'
}
}
@ -1029,7 +1029,7 @@ angular.module('application.router', ['ui.router'])
url: '/admin/settings',
views: {
'main@': {
templateUrl: '../../templates/admin/settings/index.html',
templateUrl: '/admin/settings/index.html',
controller: 'SettingsController'
}
},
@ -1062,7 +1062,7 @@ angular.module('application.router', ['ui.router'])
url: '/open_api_clients',
views: {
'main@': {
templateUrl: '../../templates/admin/open_api_clients/index.html.erb',
templateUrl: '/admin/open_api_clients/index.html.erb',
controller: 'OpenAPIClientsController'
}
},

View File

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

View File

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

View File

@ -32,6 +32,7 @@ environment.loaders.prepend('js', js);
environment.loaders.append('html', html);
environment.loaders.append('sass', sass);
environment.loaders.append('uiTour', uiTour);
environment.loaders.insert('foo', jsErb, { alter: 'bar' });
environment.splitChunks();

View File

@ -1,9 +1,14 @@
const path = require('path');
module.exports = {
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: 'auto-ngtemplate-loader'
loader: 'auto-ngtemplate-loader',
options: {
pathResolver: (templatePath) => path.join(__dirname, `../../../app/frontend/templates${templatePath}`)
}
}
]
};

View File

@ -1,10 +1,15 @@
const path = require('path');
module.exports = {
test: /\.js\.erb$/,
enforce: 'pre',
exclude: /node_modules/,
use: [
{
loader: 'auto-ngtemplate-loader'
loader: 'auto-ngtemplate-loader',
options: {
pathResolver: (templatePath) => path.join(__dirname, `../../../app/frontend/templates${templatePath}`)
}
},
{
loader: 'rails-erb-loader',

View File

@ -2,4 +2,14 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production';
const environment = require('./environment');
const js = environment.loaders.get('js');
delete js.use[0].options.pathResolver;
environment.loaders.delete('js');
environment.loaders.append('js', js);
const jsErb = environment.loaders.get('js-erb');
delete jsErb.use[0].options.pathResolver;
environment.loaders.delete('js-erb');
environment.loaders.prepend('js-erb', jsErb);
module.exports = environment.toWebpackConfig();