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

change some texts in reservation on site

This commit is contained in:
Peng DU 2016-07-21 15:32:49 +02:00
parent 7650ec5a5a
commit c220678ea5
9 changed files with 42 additions and 17 deletions

View File

@ -542,10 +542,14 @@ Application.Controllers.controller "ShowEventController", ["$scope", "$state", "
$scope.numberFilter = $filter('number')
# Button label
confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_')
if $scope.amount > 0
$scope.validButtonName = _t('confirm_(payment_on_site)')
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}"
else
$scope.validButtonName = _t('confirm')
if price.price > 0 and $scope.walletAmount == 0
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}"
else
$scope.validButtonName = _t('confirm')
# Callback to validate the payment
$scope.ok = ->

View File

@ -831,11 +831,12 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", "$stat
$scope.numberFilter = $filter('number')
# Button label
confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_')
if $scope.amount > 0
$scope.validButtonName = "#{_t('confirm_my_payment_of_')} #{$filter('currency')($scope.amount)}"
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}"
else
if price.price > 0
$scope.validButtonName = "#{_t('confirm_my_payment_of_')} #{$filter('currency')(price.price)}"
if price.price > 0 and $scope.walletAmount == 0
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}"
else
$scope.validButtonName = _t('confirm')

View File

@ -236,11 +236,12 @@ Application.Controllers.controller "PlansIndexController", ["$scope", "$rootScop
$scope.member = member
# Button label
confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_')
if $scope.amount > 0
$scope.validButtonName = "#{_t('confirm_my_payment_of_')} #{$filter('currency')($scope.amount)}"
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}"
else
if $scope.price > 0
$scope.validButtonName = "#{_t('confirm_my_payment_of_')} #{$filter('currency')($scope.price)}"
if price.price > 0 and $scope.walletAmount == 0
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}"
else
$scope.validButtonName = _t('confirm')

View File

@ -556,11 +556,12 @@ Application.Controllers.controller "ReserveTrainingController", ["$scope", "$sta
$scope.numberFilter = $filter('number')
# Button label
confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_')
if $scope.amount > 0
$scope.validButtonName = "#{_t('confirm_my_payment_of_')} #{$filter('currency')($scope.amount)}"
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}"
else
if price.price > 0
$scope.validButtonName = "#{_t('confirm_my_payment_of_')} #{$filter('currency')(price.price)}"
if price.price > 0 and $scope.walletAmount == 0
$scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}"
else
$scope.validButtonName = _t('confirm')

View File

@ -3,9 +3,7 @@
<h1 translate>{{ 'subscription_confirmation' }}</h1>
</div>
<div class="modal-body">
<h3 class="m-t-xs" ng-if="walletAmount > 0 && price > 0">{{ 'you_have_amount_in_wallet' | translate:{ amount: numberFilter(walletAmount, 2), currency: currencySymbol } }}</h3>
<p ng-if="walletAmount > 0 && price > 0 && amount === 0" class="text-italic">{{'wallet_pay_reservation' | translate}}</p>
<p ng-if="walletAmount > 0 && amount !== 0" class="text-italic">{{'credit_amount_for_pay_reservation' | translate:{ amount: numberFilter(amount, 2), currency: currencySymbol } }}</p>
<ng-include src="'<%= asset_path 'shared/_wallet_amount_info.html' %>'"></ng-include>
<p>{{ 'here_is_the_NAME_subscription_summary' | translate:{NAME:member.name} }}</p>
<p>{{ plan | humanReadablePlanName }}</p>

View File

@ -0,0 +1,10 @@
<div ng-if="currentUser.role != 'admin'">
<h3 class="m-t-xs" ng-if="walletAmount > 0 && price > 0">{{ 'you_have_amount_in_wallet' | translate:{ amount: numberFilter(walletAmount, 2), currency: currencySymbol } }}</h3>
<p ng-if="walletAmount > 0 && price > 0 && amount === 0" class="text-italic">{{'wallet_pay_reservation' | translate}}</p>
<p ng-if="walletAmount > 0 && amount !== 0" class="text-italic">{{'credit_amount_for_pay_reservation' | translate:{ amount: numberFilter(amount, 2), currency: currencySymbol } }}</p>
</div>
<div ng-if="currentUser.role == 'admin'">
<h3 class="m-t-xs" ng-if="walletAmount > 0 && price > 0">{{ 'client_have_amount_in_wallet' | translate:{ amount: numberFilter(walletAmount, 2), currency: currencySymbol } }}</h3>
<p ng-if="walletAmount > 0 && price > 0 && amount === 0" class="text-italic">{{'client_wallet_pay_reservation' | translate}}</p>
<p ng-if="walletAmount > 0 && amount !== 0" class="text-italic">{{'client_credit_amount_for_pay_reservation' | translate:{ amount: numberFilter(amount, 2), currency: currencySymbol } }}</p>
</div>

View File

@ -3,9 +3,7 @@
<h1 translate>{{ 'booking_confirmation' }}</h1>
</div>
<div class="modal-body">
<h3 class="m-t-xs" ng-if="walletAmount > 0 && price > 0">{{ 'you_have_amount_in_wallet' | translate:{ amount: numberFilter(walletAmount, 2), currency: currencySymbol } }}</h3>
<p ng-if="walletAmount > 0 && price > 0 && amount === 0" class="text-italic">{{'wallet_pay_reservation' | translate}}</p>
<p ng-if="walletAmount > 0 && amount !== 0" class="text-italic">{{'credit_amount_for_pay_reservation' | translate:{ amount: numberFilter(amount, 2), currency: currencySymbol } }}</p>
<ng-include src="'<%= asset_path 'shared/_wallet_amount_info.html' %>'"></ng-include>
<p translate>{{ 'here_is_the_summary_of_the_slots_to_book_for_the_current_user' }}</p>
<ul ng-repeat="slot in reservation.slots_attributes">

View File

@ -161,11 +161,13 @@ en:
enter_your_card_number: "Enter your card number"
confirm_my_payment_of_: "Confirm my payment of" # context: confirm my payment of $20.00
credit_amount_for_pay_reservation: "{{amount}} {{currency}} remains to be paid to confirm your reservation"
client_credit_amount_for_pay_reservation: "{{amount}} {{currency}} remains to be paid to confirm reservation of client"
valid_reservation_modal:
# dialog of on site payment for reservations
booking_confirmation: "Booking confirmation"
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Here is the summary of the slots to book for the current user:"
confirm_client_payment_of_: "Confirm (Payment on site) of {{amount}} {{currency}}"
event:
# event edition form
@ -312,6 +314,12 @@ en:
to_credit: 'Credit'
wallet_credit_successfully: "Wallet of user is credited successfully."
a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet"
amount_is_required: "The amount is required"
amount_minimum_1: "The amount minimum is 1"
you_have_amount_in_wallet: "You have {{amount}} {{currency}} in your wallet"
client_have_amount_in_wallet: "Client has {{amount}} {{currency}} in wallet"
wallet_pay_reservation: "You can pay direct your reservation"
client_wallet_pay_reservation: "Client can pay direct reservation"
debit_subscription: "Debit by subscription"
debit_reservation_training: "Debit by reservation of training"
debit_reservation_machine: "Debit by reservation of machine"

View File

@ -161,11 +161,13 @@ fr:
enter_your_card_number: "Saisissez votre numéro de carte"
confirm_my_payment_of_: "Valider mon paiement de" # contexte : valider mon paiement de 20,00 €
credit_amount_for_pay_reservation: "Il vous reste {{amount}} {{currency}} à payer pour valider votre réservation"
client_credit_amount_for_pay_reservation: "Il reste {{amount}} {{currency}} à payer pour valider la réservation"
valid_reservation_modal:
# fenêtre de paiement sur place d'une réservation
booking_confirmation: "Validation réservation"
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Voici le récapitulatif des créneaux à réserver pour l'utilisateur courant :"
confirm_client_payment_of_: "Valider (Paiement sur place) de {{amount}} {{currency}}"
event:
# formulaire d'édition d'un événement
@ -315,7 +317,9 @@ fr:
amount_is_required: "Le montant est obligatoire"
amount_minimum_1: "Le montant minimum est d'1"
you_have_amount_in_wallet: "Vous avez {{amount}} {{currency}} sur votre porte-monnaie"
client_have_amount_in_wallet: "Le client a {{amount}} {{currency}} sur son porte-monnaie"
wallet_pay_reservation: "Vous pouvez effectuer directement votre paiement de réservation"
client_wallet_pay_reservation: "Le client pouvez effectuer directement son paiement de réservation"
debit_subscription: "Payer un abonnement"
debit_reservation_training: "Payer un reservation de formation"
debit_reservation_machine: "Payer un reservation de machine"