mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +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";
|
||||
|
||||
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) {
|
||||
if (!group.quest || !group.quest.members) return false;
|
||||
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.')
|
||||
}
|
||||
|
||||
var sendInviteText = window.env.t('sendInvitations');
|
||||
if(group.purchased.plan.customerId) sendInviteText += window.env.t('groupAdditionalUserCost');
|
||||
group.sendInviteText = sendInviteText;
|
||||
|
||||
$rootScope.openModal('invite-' + group.type, {
|
||||
controller:'InviteToGroupCtrl',
|
||||
resolve: {
|
||||
injectedGroup: function(){
|
||||
return group;
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -226,6 +226,7 @@
|
||||
"approvalTitle": "<%= text %> for user: <%= userName %>",
|
||||
"confirmTaskApproval": "Do you want to reward <%= username %> for completing this task?",
|
||||
"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",
|
||||
"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
|
||||
tr
|
||||
td
|
||||
.col-sm-4.col-sm-offset-8
|
||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
||||
.col-sm-6.col-sm-offset-6
|
||||
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||
hr
|
||||
p.alert.alert-info=env.t('inviteByEmail')
|
||||
form.form-horizontal(ng-submit='inviteNewUsers("email")')
|
||||
@@ -41,10 +41,10 @@ script(type='text/ng-template', id='modals/invite-guild.html')
|
||||
tr
|
||||
td.form-group(colspan=2)
|
||||
label.col-sm-1.control-label=env.t('byColon')
|
||||
.col-sm-7
|
||||
.col-sm-5
|
||||
input.form-control(type='text', ng-model='inviter')
|
||||
.col-sm-4
|
||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
||||
.col-sm-6
|
||||
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||
.modal-footer
|
||||
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
|
||||
td.form-group(colspan=2)
|
||||
label.col-sm-1.control-label=env.t('byColon')
|
||||
.col-sm-7
|
||||
.col-sm-5
|
||||
input.form-control(type='text', ng-model='inviter')
|
||||
.col-sm-4
|
||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
||||
.col-sm-6
|
||||
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||
tab(heading=env.t('inviteExistUser'))
|
||||
p.alert.alert-info!=env.t('inviteAlertInfo')
|
||||
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
|
||||
tr
|
||||
td
|
||||
.col-sm-4.col-sm-offset-8
|
||||
button.btn.btn-primary.btn-block(type='submit')=env.t('sendInvitations')
|
||||
.col-sm-6.col-sm-offset-6
|
||||
button.btn.btn-primary.btn-block(type='submit') {{group.sendInviteText}}
|
||||
.row
|
||||
.quest_basilist.pull-left
|
||||
p(style='margin:2em')=env.t('exclusiveQuestScroll')
|
||||
|
||||
Reference in New Issue
Block a user