diff --git a/apps/user/templates/user/bonus-history.html b/apps/user/templates/user/bonus-history.html index 3c6af73e..0cffa466 100644 --- a/apps/user/templates/user/bonus-history.html +++ b/apps/user/templates/user/bonus-history.html @@ -30,7 +30,7 @@ - {% include 'templates/blocks/share.html' with share_object_name="ссылкой" share_url=referrer_url %} + {% include 'templates/blocks/share.html' with share_object_name="ссылкой" share_url=referrer_url share_tw_title=share_text share_tg_text=share_text %} diff --git a/apps/user/views.py b/apps/user/views.py index b564b5ec..a346380f 100644 --- a/apps/user/views.py +++ b/apps/user/views.py @@ -20,6 +20,7 @@ from django.utils.decorators import method_decorator from django.utils.timezone import now from apps.auth.tokens import verification_email_token +from apps.config.models import Config from apps.course.models import Course from apps.notification.utils import send_email from apps.school.models import SchoolSchedule @@ -298,6 +299,7 @@ class BonusHistoryView(TemplateView): template_name = 'user/bonus-history.html' def get(self, request, *args, **kwargs): + config = Config.load() context = self.get_context_data(**kwargs) context['bonuses'] = request.user.bonuses.filter( payment__isnull=False, @@ -306,4 +308,8 @@ class BonusHistoryView(TemplateView): context['referrer_url'] = '%s%s?referrer=%s' % ( settings.MAIN_HOST, reverse('index'), short_url.encode_url(request.user.id) ) + context['share_text'] = '%s приглашает вас и ваших детей в первую онлайн школу креативного мышления Lil School. ' \ + 'Занимайтесь с ребёнком творчеством, не выходя из дома. ' \ + 'Перейдите по ссылке и получите скидку %d%% на первую покупку' \ + % (request.user.get_full_name(), config.REFERRAL_BONUS) return self.render_to_response(context) diff --git a/project/templates/blocks/share.html b/project/templates/blocks/share.html index 0f0a360b..392261fb 100644 --- a/project/templates/blocks/share.html +++ b/project/templates/blocks/share.html @@ -6,11 +6,11 @@
-
+
-
+