1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

fix requiring templates from ngtemplate-loader

This commit is contained in:
Sylvain 2020-09-22 16:03:18 +02:00
parent a398ba8b8e
commit 562fb5d8d7
43 changed files with 77 additions and 83 deletions

View File

@ -20,7 +20,7 @@
<form role="form" name="adminForm" class="form-horizontal" novalidate>
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
<ng-include src="'shared/_admin_form.html'"></ng-include>
<ng-include src="'/shared/_admin_form.html'"></ng-include>
</div>

View File

@ -90,4 +90,4 @@
</div>
</div>
<ng-include src="'admin/authentications/_oauth2_mapping.html'"></ng-include>
<ng-include src="'/admin/authentications/_oauth2_mapping.html'"></ng-include>

View File

@ -35,8 +35,8 @@
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
<ng-include src="'admin/authentications/_form.html'"></ng-include>
<ng-include src="'admin/authentications/_oauth2.html'" ng-if="provider.providable_type == 'OAuth2Provider'"></ng-include>
<ng-include src="'/admin/authentications/_form.html'"></ng-include>
<ng-include src="'/admin/authentications/_oauth2.html'" ng-if="provider.providable_type == 'OAuth2Provider'"></ng-include>
</div> <!-- ./panel-body -->

View File

@ -36,8 +36,8 @@
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
<ng-include src="'admin/authentications/_form.html'"></ng-include>
<ng-include src="'admin/authentications/_oauth2.html'" ng-if="provider.providable_type == 'OAuth2Provider'"></ng-include>
<ng-include src="'/admin/authentications/_form.html'"></ng-include>
<ng-include src="'/admin/authentications/_oauth2.html'" ng-if="provider.providable_type == 'OAuth2Provider'"></ng-include>
</div> <!-- ./panel-body -->

View File

@ -28,7 +28,7 @@
<div id="couponForm">
<form name="couponForm" novalidate="novalidate" class="col-lg-7 col-lg-offset-2 m-t-lg form-group">
<ng-include src="'admin/coupons/_form.html'"></ng-include>
<ng-include src="'/admin/coupons/_form.html'"></ng-include>
<div class="panel-footer no-padder">
<input type="button" value="{{ 'app.shared.buttons.confirm_changes' | translate }}" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="couponForm.$invalid" ng-click="updateCoupon()"/>

View File

@ -20,7 +20,7 @@
<div id="couponForm">
<form name="couponForm" novalidate="novalidate" class="col-lg-10 col-lg-offset-2 m-t-lg form-group">
<ng-include src="'admin/coupons/_form.html'"></ng-include>
<ng-include src="'/admin/coupons/_form.html'"></ng-include>
<div class="panel-footer no-padder">
<input type="button" value="{{ 'app.shared.buttons.save' | translate }}" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="couponForm.$invalid" ng-click="saveCoupon()"/>

View File

@ -29,20 +29,20 @@
<div class="col-md-12" ng-if="isAuthorized('admin')">
<uib-tabset justified="true" active="tabs.active">
<uib-tab heading="{{ 'app.admin.events.events_monitoring' | translate }}" index="0">
<ng-include src="'admin/events/monitoring.html'"></ng-include>
<ng-include src="'/admin/events/monitoring.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.events.manage_filters' | translate }}" index="1">
<ng-include src="'admin/events/filters.html'"></ng-include>
<ng-include src="'/admin/events/filters.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.events.manage_prices_categories' | translate }}" index="2" class="prices-tab">
<ng-include src="'admin/events/prices.html'"></ng-include>
<ng-include src="'/admin/events/prices.html'"></ng-include>
</uib-tab>
</uib-tabset>
</div>
<div class="col-md-12" ng-if="isAuthorized('manager')">
<ng-include src="'admin/events/monitoring.html'"></ng-include>
<ng-include src="'/admin/events/monitoring.html'"></ng-include>
</div>
</div>
</section>

View File

@ -31,25 +31,25 @@
<div class="col-md-12" ng-if="isAuthorized('admin')">
<uib-tabset justified="true" active="tabs.active">
<uib-tab heading="{{ 'app.admin.invoices.invoices_list' | translate }}" ng-show="modules.invoicing" index="0">
<ng-include src="'admin/invoices/list.html'"></ng-include>
<ng-include src="'/admin/invoices/list.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.invoices.invoicing_settings' | translate }}" index="1" class="invoices-settings">
<ng-include src="'admin/invoices/settings.html'"></ng-include>
<ng-include src="'/admin/invoices/settings.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.invoices.accounting_codes' | translate }}" index="2" class="accounting-codes-tab">
<ng-include src="'admin/invoices/codes.html'"></ng-include>
<ng-include src="'/admin/invoices/codes.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.invoices.payment.payment_settings' | translate }}" index="3" class="payment-settings">
<ng-include src="'admin/invoices/payment.html'"></ng-include>
<ng-include src="'/admin/invoices/payment.html'"></ng-include>
</uib-tab>
</uib-tabset>
</div>
<div class="col-md-12" ng-if="isAuthorized('manager')">
<ng-include src="'admin/invoices/list.html'"></ng-include>
<ng-include src="'/admin/invoices/list.html'"></ng-include>
</div>
</div>
</section>

View File

@ -20,7 +20,7 @@
<form role="form" name="managerForm" class="form-horizontal" novalidate>
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
<ng-include src="'shared/_manager_form.html'"></ng-include>
<ng-include src="'/shared/_manager_form.html'"></ng-include>
</div>

View File

@ -46,9 +46,9 @@
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
<ng-include src="'shared/_member_form.html'"></ng-include>
<ng-include src="'/shared/_member_form.html'"></ng-include>
<ng-include src="'admin/members/_form.html'"></ng-include>
<ng-include src="'/admin/members/_form.html'"></ng-include>
</div> <!-- ./panel-body -->
@ -231,7 +231,7 @@
<uib-tab heading="{{ 'app.admin.members_edit.wallet' | translate }}" ng-show="modules.wallet">
<div class="col-md-12 m m-t-lg">
<ng-include src="'wallet/show.html'"></ng-include>
<ng-include src="'/wallet/show.html'"></ng-include>
<div class="clearfix"></div>
<div class="col-sm-4 text-center" ng-hide="user.id === currentUser.id">
@ -244,7 +244,7 @@
</div>
<div class="col-md-12 m m-t-lg">
<ng-include src="'wallet/transactions.html'"></ng-include>
<ng-include src="'/wallet/transactions.html'"></ng-include>
</div>
</uib-tab>
</uib-tabset>

View File

@ -33,7 +33,7 @@
<uib-tabset justified="true" active="tabs.active" ng-if="isAuthorized('admin')">
<uib-tab heading="{{ 'app.admin.members.users' | translate }}" index="0">
<ng-include src="'admin/members/users.html'"></ng-include>
<ng-include src="'/admin/members/users.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.members.groups' | translate }}" class="groups-tab" index="1">
@ -50,7 +50,7 @@
</uib-tabset>
<div ng-if="isAuthorized('manager')">
<ng-include src="'admin/members/users.html'"></ng-include>
<ng-include src="'/admin/members/users.html'"></ng-include>
</div>
</div>
</div>

View File

@ -50,9 +50,9 @@
</div>
</div>
<ng-include src="'shared/_member_form.html'"></ng-include>
<ng-include src="'/shared/_member_form.html'"></ng-include>
<ng-include src="'admin/members/_form.html'"></ng-include>
<ng-include src="'/admin/members/_form.html'"></ng-include>
</div> <!-- ./panel-body -->

View File

@ -1,19 +1,19 @@
<uib-tabset justified="true" active="tabs.sub" class="m-t">
<uib-tab classes="{{isAuthorized('admin') ? 'level-2-tab' : ''}}" heading="{{ 'app.admin.members.members' | translate }}" index="0">
<ng-include src="'admin/members/members.html'"></ng-include>
<ng-include src="'/admin/members/members.html'"></ng-include>
</uib-tab>
<uib-tab classes="{{isAuthorized('admin') ? 'level-2-tab' : ''}}" heading="{{ 'app.admin.members.administrators' | translate }}" class="admins-tab" index="1">
<ng-include src="'admin/members/administrators.html'"></ng-include>
<ng-include src="'/admin/members/administrators.html'"></ng-include>
</uib-tab>
<uib-tab classes="{{isAuthorized('admin') ? 'level-2-tab' : ''}}" heading="{{ 'app.admin.members.managers' | translate }}" class="admins-tab" index="2">
<ng-include src="'admin/members/managers.html'"></ng-include>
<ng-include src="'/admin/members/managers.html'"></ng-include>
</uib-tab>
<uib-tab classes="{{isAuthorized('admin') ? 'level-2-tab' : ''}}" heading="{{ 'app.admin.members.partners' | translate }}" class="admins-tab" index="3" ng-show="isAuthorized('admin')">
<ng-include src="'admin/members/partners.html'"></ng-include>
<ng-include src="'/admin/members/partners.html'"></ng-include>
</uib-tab>
</uib-tabset>

View File

@ -26,7 +26,7 @@
<div id="planForm">
<form name="planForm" novalidate="novalidate" class="col-lg-7 col-lg-offset-2 m-t-lg form-group" action="{{ actionUrl }}" ng-upload="afterSubmit(content)" upload-options-enable-rails-csrf="true">
<ng-include src="'admin/plans/_form.html'"></ng-include>
<ng-include src="'/admin/plans/_form.html'"></ng-include>
<div class="input-group m-t-md">
<label for="plan[disabled]" class="control-label m-r-md">{{ 'app.shared.plan.disabled' | translate }}</label>

View File

@ -20,7 +20,7 @@
<div id="planForm">
<form name="planForm" novalidate="novalidate" class="col-lg-10 col-lg-offset-2 m-t-lg form-group" action="{{ actionUrl }}" ng-upload="afterSubmit(content)" upload-options-enable-rails-csrf="true">
<ng-include src="'admin/plans/_form.html'"></ng-include>
<ng-include src="'/admin/plans/_form.html'"></ng-include>
<div class="panel-footer no-padder">
<input type="submit" value="{{ 'app.shared.buttons.save' | translate }}" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="planForm.$invalid || !partnerIsValid()"/>

View File

@ -28,27 +28,27 @@
<uib-tabset justified="true" active="tabs.active">
<uib-tab heading="{{ 'app.admin.pricing.subscriptions' | translate }}" index="0">
<ng-include src="'admin/pricing/subscriptions.html'"></ng-include>
<ng-include src="'/admin/pricing/subscriptions.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.pricing.trainings' | translate }}" index="1" class="trainings-tab">
<ng-include src="'admin/pricing/trainings.html'"></ng-include>
<ng-include src="'/admin/pricing/trainings.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.pricing.machine_hours' | translate }}" index="2" class="machines-tab">
<ng-include src="'admin/pricing/machine_hours.html'"></ng-include>
<ng-include src="'/admin/pricing/machine_hours.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.pricing.spaces' | translate }}" ng-show="modules.spaces" index="3" class="spaces-tab">
<ng-include src="'admin/pricing/spaces.html'"></ng-include>
<ng-include src="'/admin/pricing/spaces.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.pricing.credits' | translate }}" index="4" class="credits-tab">
<ng-include src="'admin/pricing/credits.html'"></ng-include>
<ng-include src="'/admin/pricing/credits.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.pricing.coupons' | translate }}" index="5" class="coupons-tab">
<ng-include src="'admin/pricing/coupons.html'"></ng-include>
<ng-include src="'/admin/pricing/coupons.html'"></ng-include>
</uib-tab>
</uib-tabset>
</div>

View File

@ -31,16 +31,16 @@
<div class="col-md-12">
<uib-tabset justified="true" active="tabs.active">
<uib-tab heading="{{ 'app.admin.projects.materials' | translate }}" index="0">
<ng-include src="'admin/projects/materials.html'"></ng-include>
<ng-include src="'/admin/projects/materials.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.projects.themes' | translate }}" index="1">
<ng-include src="'admin/projects/themes.html'"></ng-include>
<ng-include src="'/admin/projects/themes.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.projects.licences' | translate }}" index="2">
<ng-include src="'admin/projects/licences.html'"></ng-include>
<ng-include src="'/admin/projects/licences.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.projects.settings.title' | translate }}" index="3" class="settings-tab">
<ng-include src="'admin/projects/settings.html'"></ng-include>
<ng-include src="'/admin/projects/settings.html'"></ng-include>
</uib-tab>
</uib-tabset>
</div>

View File

@ -27,23 +27,23 @@
<uib-tabset justified="true" active="tabs.active">
<uib-tab heading="{{ 'app.admin.settings.general.general' | translate }}" index="0" class="general-page-tab">
<ng-include src="'admin/settings/general.html'"></ng-include>
<ng-include src="'/admin/settings/general.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.settings.home_page' | translate }}" index="1">
<ng-include src="'admin/settings/home_page.html'"></ng-include>
<ng-include src="'/admin/settings/home_page.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.settings.about' | translate }}" index="2" class="about-page-tab">
<ng-include src="'admin/settings/about.html'"></ng-include>
<ng-include src="'/admin/settings/about.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.settings.privacy.title' | translate }}" index="3" class="privacy-page-tab">
<ng-include src="'admin/settings/privacy.html'"></ng-include>
<ng-include src="'/admin/settings/privacy.html'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'app.admin.settings.reservations' | translate }}" index="4" class="reservations-page-tab">
<ng-include src="'admin/settings/reservations.html'"></ng-include>
<ng-include src="'/admin/settings/reservations.html'"></ng-include>
</uib-tab>
</uib-tabset>
</div>

View File

@ -22,6 +22,6 @@
<div class="row no-gutter">
<div class="col-sm-12 col-md-12 col-lg-9 b-r-lg nopadding">
<ng-include src="'admin/trainings/_form.html'"></ng-include>
<ng-include src="'/admin/trainings/_form.html'"></ng-include>
</div>
</div>

View File

@ -26,7 +26,7 @@
{{ 'app.admin.trainings_new.dont_forget_to_change_them_before_creating_slots_for_this_training' | translate }}
</div>
<ng-include src="'admin/trainings/_form.html'"></ng-include>
<ng-include src="'/admin/trainings/_form.html'"></ng-include>
</div>
<div class="col-md-3">

View File

@ -41,7 +41,7 @@
<h3 translate>{{ 'app.public.calendar.filter_calendar' }}</h3>
</div>
<div class="widget-content no-bg auto wrapper calendar-filter">
<ng-include src="'calendar/filter.html'"></ng-include>
<ng-include src="'/calendar/filter.html'"></ng-include>
</div>
</div>
</div>

View File

@ -4,6 +4,6 @@
<h1 class="modal-title" translate>{{ 'app.public.calendar.filter_calendar' }}</h1>
</div>
<div class="modal-body widget-content calendar-filter calendar-filter-aside">
<ng-include src="'calendar/filter.html'"></ng-include>
<ng-include src="'/calendar/filter.html'"></ng-include>
</div>
</div>

View File

@ -2,7 +2,7 @@
<section class="heading">
<div class="row no-gutter">
<ng-include src="'dashboard/nav.html'"></ng-include>
<ng-include src="'/dashboard/nav.html'"></ng-include>
</div>
</section>

View File

@ -2,7 +2,7 @@
<section class="heading">
<div class="row no-gutter">
<ng-include src="'dashboard/nav.html'"></ng-include>
<ng-include src="'/dashboard/nav.html'"></ng-include>
</div>
</section>

View File

@ -2,7 +2,7 @@
<section class="heading">
<div class="row no-gutter">
<ng-include src="'dashboard/nav.html'"></ng-include>
<ng-include src="'/dashboard/nav.html'"></ng-include>
</div>
</section>
@ -10,7 +10,7 @@
<div class="row no-gutter">
<div class="col-md-12 m m-t-lg">
<ng-include src="'shared/publicProfile.html'"></ng-include>
<ng-include src="'/shared/publicProfile.html.erb'"></ng-include>
</div>
</div>
</div>

View File

@ -2,7 +2,7 @@
<section class="heading">
<div class="row no-gutter">
<ng-include src="'dashboard/nav.html'"></ng-include>
<ng-include src="'/dashboard/nav.html'"></ng-include>
</div>
</section>

View File

@ -1,6 +1,6 @@
<div>
<ng-include src="'dashboard/nav.html'"></ng-include>
<ng-include src="'/dashboard/nav.html'"></ng-include>
@ -121,7 +121,7 @@
</section>
<section class="panel panel-default bg-light m">
<div class="panel-body m-r">
<ng-include src="'shared/_member_form.html'"></ng-include>
<ng-include src="'/shared/_member_form.html'"></ng-include>
</div> <!-- ./panel-body -->
</section>
</div>

View File

@ -2,7 +2,7 @@
<section class="heading">
<div class="row no-gutter">
<ng-include src="'dashboard/nav.html'"></ng-include>
<ng-include src="'/dashboard/nav.html'"></ng-include>
</div>
</section>

View File

@ -1,18 +1,18 @@
<div>
<section class="heading">
<div class="row no-gutter">
<ng-include src="'dashboard/nav.html'"></ng-include>
<ng-include src="'/dashboard/nav.html'"></ng-include>
</div>
</section>
<div class="row no-gutter">
<div class="col-md-12 m m-t-lg">
<ng-include src="'wallet/show.html'"></ng-include>
<ng-include src="'/wallet/show.html'"></ng-include>
</div>
<div class="col-md-12 m m-t-lg">
<ng-include src="'wallet/transactions.html'"></ng-include>
<ng-include src="'/wallet/transactions.html'"></ng-include>
</div>
</div>
</div>

View File

@ -18,7 +18,7 @@
<form role="form" name="eventForm" class="form-horizontal" novalidate action="{{ actionUrl }}" ng-upload="submited(content)" upload-options-enable-rails-csrf="true" upload-options-convert-hidden="true">
<ng-include src="'events/_form.html'"></ng-include>
<ng-include src="'/events/_form.html'"></ng-include>
</form>

View File

@ -18,7 +18,7 @@
<form role="form" name="eventForm" class="form-horizontal" novalidate action="{{ actionUrl }}" ng-upload="submited(content)" upload-options-enable-rails-csrf="true">
<ng-include src="'events/_form.html'"></ng-include>
<ng-include src="'/events/_form.html'"></ng-include>
</form>

View File

@ -24,7 +24,7 @@
<div class="row no-gutter">
<div class="col-sm-12 col-md-12 col-lg-9 b-r-lg nopadding">
<ng-include src="'machines/_form.html'"></ng-include>
<ng-include src="'/machines/_form.html'"></ng-include>
</div>
</div>
</div>

View File

@ -26,6 +26,6 @@
{{ 'app.admin.machines_new.consider_changing_them_before_creating_any_reservation_slot' | translate }}
</div>
<ng-include src="'machines/_form.html'"></ng-include>
<ng-include src="'/machines/_form.html'"></ng-include>
</div>
</div>

View File

@ -21,5 +21,5 @@
</div>
</section>
<ng-include src="'shared/publicProfile.html'"></ng-include>
<ng-include src="'/shared/publicProfile.html.erb'"></ng-include>
</div>

View File

@ -4,7 +4,7 @@
</div>
<div class="modal-body">
<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
<ng-include src="'shared/_wallet_amount_info.html'"></ng-include>
<ng-include src="'/shared/_wallet_amount_info.html'"></ng-include>
<p>{{ 'app.public.plans.here_is_the_NAME_subscription_summary' | translate:{NAME:member.name} }}</p>
<p>{{ plan | humanReadablePlanName }}</p>

View File

@ -63,7 +63,7 @@
<div class="panel-body m-r">
<!-- common fields -->
<ng-include src="'shared/_member_form.html'"></ng-include>
<ng-include src="'/shared/_member_form.html'"></ng-include>
<div class="row">
<div class="col-sm-3 col-sm-offset-1"></div>
@ -151,7 +151,7 @@
</p>
</div>
<div class="col-md-6 m-t-3xl-on-md" ng-hide="user.merged_at">
<ng-include src="'profile/_token.html'"></ng-include>
<ng-include src="'/profile/_token.html'"></ng-include>
</div>
</div>
</div>

View File

@ -29,7 +29,7 @@
<ng-include src="'projects/_form.html'"></ng-include>
<ng-include src="'/projects/_form.html'"></ng-include>
</form>

View File

@ -18,7 +18,7 @@
<form role="form" name="projectForm" class="form-horizontal" novalidate action="{{ actionUrl }}" ng-upload="submited(content)" upload-options-enable-rails-csrf="true" unsaved-warning-form>
<ng-include src="'projects/_form.html'"></ng-include>
<ng-include src="'/projects/_form.html'"></ng-include>
</form>

View File

@ -4,7 +4,7 @@
</div>
<div class="modal-body">
<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
<ng-include src="'shared/_wallet_amount_info.html'"></ng-include>
<ng-include src="'/shared/_wallet_amount_info.html'"></ng-include>
<p translate>{{ 'app.shared.valid_reservation_modal.here_is_the_summary_of_the_slots_to_book_for_the_current_user' }}</p>
<ul ng-repeat="slot in reservation.slots_attributes">

View File

@ -33,7 +33,7 @@
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
<ng-include src="'spaces/_form.html'"></ng-include>
<ng-include src="'/spaces/_form.html'"></ng-include>
</div>
<div class="panel-footer no-padder">

View File

@ -39,7 +39,7 @@
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
<ng-include src="'spaces/_form.html'"></ng-include>
<ng-include src="'/spaces/_form.html'"></ng-include>
</div>
<div class="panel-footer no-padder">

View File

@ -3,10 +3,7 @@ module.exports = {
exclude: /node_modules/,
use: [
{
loader: 'auto-ngtemplate-loader',
options: {
pathResolver: (p) => p.replace(/src\/javascript\/.*$/, 'templates/')
}
loader: 'auto-ngtemplate-loader'
}
]
};

View File

@ -4,10 +4,7 @@ module.exports = {
exclude: /node_modules/,
use: [
{
loader: 'auto-ngtemplate-loader',
options: {
pathResolver: (p) => p.replace(/src\/javascript\/.*$/, 'templates')
}
loader: 'auto-ngtemplate-loader'
},
{
loader: 'rails-erb-loader',