mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
Added per user cost message if group has subscription (#8328)
* Added per user cost message if group has subscription * Added user specification to cost
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '$http', '$q', 'User', 'Members', '$state', 'Notification',
|
habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '$http', '$q', 'User', 'Members', '$state', 'Notification',
|
||||||
function($scope, $rootScope, Shared, Groups, $http, $q, User, Members, $state, Notification) {
|
function($scope, $rootScope, Shared, Groups, $http, $q, User, Members, $state, Notification) {
|
||||||
$scope.isMemberOfPendingQuest = function (userid, group) {
|
$scope.isMemberOfPendingQuest = function (userid, group) {
|
||||||
if (!group.quest || !group.quest.members) return false;
|
if (!group.quest || !group.quest.members) return false;
|
||||||
if (group.quest.active) return false; // quest is started, not pending
|
if (group.quest.active) return false; // quest is started, not pending
|
||||||
@@ -125,12 +125,16 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
|||||||
return console.log('Invalid group type.')
|
return console.log('Invalid group type.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var sendInviteText = window.env.t('sendInvitations');
|
||||||
|
if(group.purchased.plan.customerId) sendInviteText += window.env.t('groupAdditionalUserCost');
|
||||||
|
group.sendInviteText = sendInviteText;
|
||||||
|
|
||||||
$rootScope.openModal('invite-' + group.type, {
|
$rootScope.openModal('invite-' + group.type, {
|
||||||
controller:'InviteToGroupCtrl',
|
controller:'InviteToGroupCtrl',
|
||||||
resolve: {
|
resolve: {
|
||||||
injectedGroup: function(){
|
injectedGroup: function(){
|
||||||
return group;
|
return group;
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -226,6 +226,7 @@
|
|||||||
"approvalTitle": "<%= text %> for user: <%= userName %>",
|
"approvalTitle": "<%= text %> for user: <%= userName %>",
|
||||||
"confirmTaskApproval": "Do you want to reward <%= username %> for completing this task?",
|
"confirmTaskApproval": "Do you want to reward <%= username %> for completing this task?",
|
||||||
"groupSubscriptionPrice": "$9 every month + $3 a month for every additional group member",
|
"groupSubscriptionPrice": "$9 every month + $3 a month for every additional group member",
|
||||||
|
"groupAdditionalUserCost": " +$3.00/month/user",
|
||||||
|
|
||||||
"groupBenefitsTitle": "How a group plan can help you",
|
"groupBenefitsTitle": "How a group plan can help you",
|
||||||
"groupBenefitsDescription": "We've just launched the beta version of our group plans! Upgrading to a group plan unlocks some unique features to optimize the social side of Habitica.",
|
"groupBenefitsDescription": "We've just launched the beta version of our group plans! Upgrading to a group plan unlocks some unique features to optimize the social side of Habitica.",
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ script(type='text/ng-template', id='modals/invite-guild.html')
|
|||||||
i.glyphicon.glyphicon-plus
|
i.glyphicon.glyphicon-plus
|
||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
.col-sm-4.col-sm-offset-8
|
.col-sm-6.col-sm-offset-6
|
||||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||||
hr
|
hr
|
||||||
p.alert.alert-info=env.t('inviteByEmail')
|
p.alert.alert-info=env.t('inviteByEmail')
|
||||||
form.form-horizontal(ng-submit='inviteNewUsers("email")')
|
form.form-horizontal(ng-submit='inviteNewUsers("email")')
|
||||||
@@ -41,10 +41,10 @@ script(type='text/ng-template', id='modals/invite-guild.html')
|
|||||||
tr
|
tr
|
||||||
td.form-group(colspan=2)
|
td.form-group(colspan=2)
|
||||||
label.col-sm-1.control-label=env.t('byColon')
|
label.col-sm-1.control-label=env.t('byColon')
|
||||||
.col-sm-7
|
.col-sm-5
|
||||||
input.form-control(type='text', ng-model='inviter')
|
input.form-control(type='text', ng-model='inviter')
|
||||||
.col-sm-4
|
.col-sm-6
|
||||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||||
.modal-footer
|
.modal-footer
|
||||||
button.btn.btn-default(ng-click='$close()')=env.t('close')
|
button.btn.btn-default(ng-click='$close()')=env.t('close')
|
||||||
|
|
||||||
@@ -75,10 +75,10 @@ script(type='text/ng-template', id='modals/invite-party.html')
|
|||||||
tr
|
tr
|
||||||
td.form-group(colspan=2)
|
td.form-group(colspan=2)
|
||||||
label.col-sm-1.control-label=env.t('byColon')
|
label.col-sm-1.control-label=env.t('byColon')
|
||||||
.col-sm-7
|
.col-sm-5
|
||||||
input.form-control(type='text', ng-model='inviter')
|
input.form-control(type='text', ng-model='inviter')
|
||||||
.col-sm-4
|
.col-sm-6
|
||||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||||
tab(heading=env.t('inviteExistUser'))
|
tab(heading=env.t('inviteExistUser'))
|
||||||
p.alert.alert-info!=env.t('inviteAlertInfo')
|
p.alert.alert-info!=env.t('inviteAlertInfo')
|
||||||
form.form-horizontal(ng-submit='inviteNewUsers("uuid")')
|
form.form-horizontal(ng-submit='inviteNewUsers("uuid")')
|
||||||
@@ -96,8 +96,8 @@ script(type='text/ng-template', id='modals/invite-party.html')
|
|||||||
i.glyphicon.glyphicon-plus
|
i.glyphicon.glyphicon-plus
|
||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
.col-sm-4.col-sm-offset-8
|
.col-sm-6.col-sm-offset-6
|
||||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||||
.row
|
.row
|
||||||
.quest_basilist.pull-left
|
.quest_basilist.pull-left
|
||||||
p(style='margin:2em')=env.t('exclusiveQuestScroll')
|
p(style='margin:2em')=env.t('exclusiveQuestScroll')
|
||||||
|
|||||||
Reference in New Issue
Block a user